https://pulumi.com logo
#kubernetes
Title
# kubernetes
h

hundreds-portugal-17080

02/12/2020, 6:44 AM
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?
g

gorgeous-egg-16927

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.
h

hundreds-portugal-17080

02/14/2020, 11:19 PM
ok. Thank you.
3 Views