Last active
May 25, 2019 18:47
-
-
Save jengo/2080cb07228a0b8aafb9ea54858e70c5 to your computer and use it in GitHub Desktop.
Modify all Kubernetes Persistent Volume to Retain policy
This file contains hidden or 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 f in $(kubectl get pv --no-headers -o custom-columns=NAME:.metadata.name); \ | |
do kubectl patch pv $f -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment