Last active
February 4, 2021 15:31
-
-
Save jpclipffel/e3dba9c56d9af9e0c68984be05bc5d6c to your computer and use it in GitHub Desktop.
Delete stale PVC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for pvc in $(kubectl get pvc | tail -n+2 | awk '{print $1}'); do | |
kubectl patch pvc ${pvc} -p '{"metadata":{"finalizers": []}}' --type=merge | |
kubectl delete pvc ${pvc} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment