Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cristiklein/3bce78782f7ca473e78c89acfa624532 to your computer and use it in GitHub Desktop.
Save cristiklein/3bce78782f7ca473e78c89acfa624532 to your computer and use it in GitHub Desktop.
How to delete all resources in a Kubernetes namespace
# List of namespaced resources in a namespace
kubectl get $(kubectl api-resources --namespace=true -o name | paste -sd,)
# Actually delete them
kubectl delete $(kubectl api-resources --namespace=true -o name | paste -sd,) --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment