
命名空间一直在termnating,导致无法有效删除.
解决办法: 1、查看命名空间: [root@zepc-jh-nginx home]# kubectl get ns NAMESTATUSAGE default Active 7d5h gitlab-sjfw Active 4d6h kube-node-lease Active 7d5h kube-public Active 7d5h kube-system Active 7d5h kuboard Terminating 7d4h skeleton Active 32h #强制删除也无法删除 [root@zepc-jh-nginx home]# kubectl delete ns kuboard –force –grace-period=0 warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely. namespace “kuboard” force deleted 2、查看kubernetes-dashboard的命名空间描述 kubectl get ns kuboard -o json > kuboard.json 3、编辑 sudo vim kuboard.json 删除spec 删除前 删除后
打开一个新窗口运行kubectl proxy跑一个API代理在本地的 8081端口 kubectl proxy –port=8081 5、curl删除 curl -k -H “Content-Type:application/json” -X PUT –data-binary @kuboard.json http://127.0.0.1:8081/api/v1/namespaces/kuboard/finalize 6、结果如下:


