Not the answer you need?
Register and ask your own question!

How to clean up PVCs.

I noticed that simply deleting the cr.yaml, which deletes the statefulset pods is not enough to delete the PVCs associated with it. Doing a manual kubectl delete pvc command is tedius.

I did a describe pvc command with the output:

Name: mongod-data-mongodb-trial-cluster-rs-0

Namespace: psmdb

StorageClass: standard

Status: Bound

Volume: pvc-593638eb-53c2-48db-a18d-2518ef977e76

Finalizers: []

Notice that this finalizer for pvc-protection is enabled which I assume is the reason why it doesn't get automatically deleted. How can we disable this so that pvc gets deleted along with the pods?


Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.