「Kubernetes」- Namespace 卡在 Terminating 状态

  CREATED BY JENKINSBOT

解决方案

kubectl get namespace <terminating-namespace> -o json >tmp.json

  {
      "apiVersion": "v1",
      "kind": "Namespace",
      "metadata": {
          "creationTimestamp": "2018-11-19T18:48:30Z",
          "deletionTimestamp": "2018-11-19T18:59:36Z",
          "name": "<terminating-namespace>",
          "resourceVersion": "1385077",
          "selfLink": "/api/v1/namespaces/<terminating-namespace>",
          "uid": "b50c9ea4-ec2b-11e8-a0be-fa163eeb47a5"
      },
      "spec": {
         "finalizers": []
      },
      "status": {
          "phase": "Terminating"
      }
  }
  
kubectl proxy

 curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/<terminating-namespace>/finalize

参考文献

A namespace is stuck in the Terminating state – IBM Documentation