Skip to content

Instantly share code, notes, and snippets.

@clayrisser
Created April 2, 2020 14:23
Show Gist options
  • Save clayrisser/b2d3479c7ab15d0bc06928608947a5a7 to your computer and use it in GitHub Desktop.
Save clayrisser/b2d3479c7ab15d0bc06928608947a5a7 to your computer and use it in GitHub Desktop.
Rancher Kubernetes Force Delete Namespace
NAMESPACE=
CLUSTER_ID=
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/k8s/clusters/$CLUSTER_ID/api/v1/namespaces/$NAMESPACE/finalize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment