Created
May 4, 2019 17:44
-
-
Save eloylp/ecf634a327ca3ed82bd8794c649d7c75 to your computer and use it in GitHub Desktop.
Force delete stuck kubernetes namespaces
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
#!/bin/bash | |
NAMESPACE=$1 | |
kubectl proxy & | |
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json | |
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json 127.0.0.1:8001/api/v1/namespaces/$NAMESPACE/finalize | |
rm temp.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment