Difference between revisions of "K8s cleanup"
Jump to navigation
Jump to search
(Created page with "``` kubectl get pv | grep Released | awk '$1 {print$1}' | while read vol; do kubectl delete pv/${vol}; done ```") |
|||
Line 1: | Line 1: | ||
``` | ``` | ||
kubectl get pv | grep Released | awk '$1 {print$1}' | while read vol; do kubectl delete pv/${vol}; done | kubectl get pv | grep Released | awk '$1 {print$1}' | while read vol; do kubectl delete pv/${vol}; done | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | for i in $(kubectl get pv --no-headers | awk '{print $1}'); do node=$(kubectl get pv $i -o yaml | grep hostPathProvisionerIdentity | xargs); echo "$i $node"; done | ||
``` | ``` |
Revision as of 15:41, 16 July 2023
kubectl get pv | grep Released | awk '$1 {print$1}' | while read vol; do kubectl delete pv/${vol}; done
for i in $(kubectl get pv --no-headers | awk '{print $1}'); do node=$(kubectl get pv $i -o yaml | grep hostPathProvisionerIdentity | xargs); echo "$i $node"; done