Why deletion of a STS application is not deleting OpenEBS Jiva volume pvc's also automatically?

9/14/2018

I am running one Mongo DB STS application which is consumed on OpenEBS 0.6.0 Jiva volume and I have deleted this app. But it is not deleting corresponding PVC. How can I clean up my system? Is this the default behavior?

-- Ranjith Raveendran
kubernetes-pvc
mongodb
openebs
persistent-volume-claims
statefulset

1 Answer

9/20/2018

This is because of the statefulset typically do not remove the PVCs when deleted. This is to ensure that the volumes are still available for physical backup kind of requirements. This can be deleted by manually by using below command

kubectl delete pvc <pvc name> -n <name space>

-- Chandan Sagar Pradhan
Source: StackOverflow