Last active
May 20, 2022 06:35
-
-
Save cristiklein/3bce78782f7ca473e78c89acfa624532 to your computer and use it in GitHub Desktop.
How to delete all resources in a Kubernetes namespace
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
# 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