root@hello:~# kubectl get ns
NAME STATUS AGE
auth Terminating 34m
default Active 23h
kube-node-lease Active 23h
kube-public Active 23h
kube-system Active 23h
新开命令行窗口打开proxy
root@hello:~# kubectl proxy
Starting to serve on 127.0.0.1:8001
回到刚才窗口 将 terminating 状态的命名空间信息导出到 json 文件:
root@hello:~# kubectl get namespace
修改json文件中的 finalizers,将其设置为空
root@hello:~# vi tmp.json
root@hello:~# cat tmp.json | grep finalizers
"finalizers": []
在 temp.json 文件所在位置调下面的接口
root@hello:~# curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8001/api/v1/namespaces/auth/finalize
*auth 改为需要删除的 terminating 状态的命名空间的名字
验证
root@hello:~# kubectl get ns
NAME STATUS AGE
default Active 23h
kube-node-lease Active 23h
kube-public Active 23h
kube-system Active 23h
root@hello:~#
https://cby-chen.github.io/
https://weibo.com/u/5982474121
https://www.zhihu.com/people/chen-bu-yun-2
https://space.bilibili.com/352476552/article
https://cloud.tencent.com/developer/column/93230
https://www.jianshu.com/u/0f894314ae2c
https://www.toutiao.com/c/user/token/MS4wLjABAAAAeqOrhjsoRZSj7iBJbjLJyMwYT5D0mLOgCoo4pEmpr4A/
GitHub、知乎、思否、简书、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客、全网可搜《小陈运维》
标签:kubernetes,23hkube,json,Terminating,https,Active,k8s,com,hello From: https://blog.51cto.com/u_12212643/5746168