Last active
January 15, 2023 13:16
-
-
Save renuka-fernando/2cf4420c5460cfd965f3b891091af4c2 to your computer and use it in GitHub Desktop.
Kubernetes - Force delete a Namespace with Invalid Finalizers
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
# namespace to be deleted in k8s | |
NAMESPACE=foo | |
# Terminal 1 | |
kubectl proxy | |
# Terminal 2 | |
kubectl get ns $NAMESPACE -o json | \ | |
jq '.spec.finalizers=[]' | \ | |
curl -X PUT "http://localhost:8001/api/v1/namespaces/${NAMESPACE}/finalize" -H "Content-Type: application/json" --data @- |
odselsevier
commented
Apr 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment