Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Last active December 15, 2016 22:26
Show Gist options
  • Save fijimunkii/99cc43beb15143f3710e79d176236c63 to your computer and use it in GitHub Desktop.
Save fijimunkii/99cc43beb15143f3710e79d176236c63 to your computer and use it in GitHub Desktop.
remove all kubernetes namespaces and associated items (except kube-system)
for each in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}" | sed -e 's/kube-system//g'); do
kubectl delete ns $each
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment