[root@master01 kube-prometheus]# kubectl get ns
NAME STATUS AGE
default Active 46d
ingress-nginx Active 7d4h
ingress-traefik Active 11d
kube-mon Active 39d
kube-node-lease Active 46d
kube-ops Active 25d
kube-public Active 46d
kube-system Active 46d
kubernetes-dashboard Active 46d
monitoring Terminating 6d6h
[root@master01 kube-prometheus]# kubectl get ns monitoring -o json >/root/tmp.json
第一个终端:
[root@master01 ~]# kubectl proxy --port=8081
第二个终端:
[root@master01 ~]# curl -k -H "Content-Type: application/json" -X PUT --data-binary @tmp.json http://127.0.0.1:8081/api/v1/namespaces/monitoring/finalize
原文:https://www.cnblogs.com/Applogize/p/14826885.html