Kubernetes is "unable to delete namespace", always in "Terminating" state.
How do I resolve this?
You can try this way
Replace {NAMESPACE_NAME}
with namespace name
kubectl get namespace {NAMESPACE_NAME} -o json > tmp.json
edit tmp.json
file and remove"kubernetes
" from
spec:
finalizers:
- kubernetes
Open new terminal and run command
kubectl proxy
In another terminal run this command
curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json https://localhost:8001/api/v1/namespaces/{NAMESPACE_NAME}/finalize
This looks like a bug:
https://github.com/kubernetes/kubernetes/issues/60807
It seems you'll have to try one of the suggested options there or downgrade to an earlier version.