Skip to content

Instantly share code, notes, and snippets.

@uurtech
Created June 24, 2022 06:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uurtech/c22e0bfe7d01bb0d57a1f20ce6ce9f89 to your computer and use it in GitHub Desktop.
Save uurtech/c22e0bfe7d01bb0d57a1f20ce6ce9f89 to your computer and use it in GitHub Desktop.
Delete all Kubernetes resources in all namespaces
kubens | while read line ; do
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found --namespace $line
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment