Kubernetes Namespace Stuck in Terminating State

Photo by Daniel Tausis on Unsplash

Solution:

Delete the namespace manually

  1. Get the namespace that is stuck in terminating state
kubectl get namespaces
kubectl get namespace aaa -o json >tmp.json
"spec": {
"finalizers": [ "kubernetes" ]
},
kubectl proxy
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/aaa/finalize
kubectl get namespaces

--

--

Clojure | Golang | Python | Cloud

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store