k8s namspaces always in Terminating

6/25/2019

Kubernetes is "unable to delete namespace", always in "Terminating" state.

How do I resolve this?

-- liangchengcheng
kubernetes
namespaces

2 Answers

6/25/2019

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

-- Harsh Manvar
Source: StackOverflow

6/25/2019

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.

-- EntangledLoops
Source: StackOverflow