Another question: Is there any way to instruct in pulumi to also remove PV's created by statefulset? if not, do you recommend us to delete the statefulset, pv using kubectl and then execute pulumi destroy?
02/13/2020, 5:33 PM
We don’t have a built-in way of doing that. Unfortunately, k8s doesn’t currently expose a way to delete associated PVs automatically when you delete a StatefulSet. Easiest approach is probably cleaning leftover PVs with kubectl, but you could also write some code to handle orphaned PVs on update. Your program could either shell out to kubectl or use a k8s client library for your language.