Skip to content

Instantly share code, notes, and snippets.

@ams0
Last active November 13, 2019 08:13
Show Gist options
  • Select an option

  • Save ams0/f42e0774aa4f7ab5b764f75e5214c838 to your computer and use it in GitHub Desktop.

Select an option

Save ams0/f42e0774aa4f7ab5b764f75e5214c838 to your computer and use it in GitHub Desktop.
How to terminate a namespae stuck in "Terminating" state by removing the Kubernetes finalizer
NS=linkerd
kubectl get ns $NS -o json > tmp.json
sed -i '' '/kubernetes/d' tmp.json
kubectl proxy &
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/$NS/finalize
bg
<ctrl-c>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment