Created
January 15, 2024 15:07
-
-
Save JoooostB/5e5216f073c6da4ad525b088c8ed7923 to your computer and use it in GitHub Desktop.
You've tried anything, and still can't delete one or multiple namespaces that are stuck in Terminating? Try this after starting a kubectl proxy instead:
This file contains 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
for NAMESPACE in list of namespaces; do kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >${NAMESPACE}.json; curl -k -H "Content-Type: application/json" -X PUT --data-binary @${NAMESPACE}.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment