Created
February 3, 2020 14:47
-
-
Save klesouza/d7a3f82aef395f19bd991211401fc567 to your computer and use it in GitHub Desktop.
Find all resources in Kubernetes for deletion
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
kubectl api-resources --verbs="get" --no-headers=true | awk '{ print $1; }' | xargs -I {} sh -c 'for i in `kubectl get $1`; do echo "$1\t$i"; done' sh {} | awk '{ print "kubectl delete " $1 " " $2; }' | grep WHAT_YOUR_ARE_LOOKING_FOR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment