确认namespace下没有资源
kubectl get all -n my-namespace
kubectl delete namespace my-namespace
调用kube-apiserver PUT接口去掉namespace中的finalizer
kubectl proxy &
PID=$!
curl -H "Content-Type: application/json" -XPUT -d '{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"my-namespace"},"spec":{"finalizers":[]}}' http://localhost:8001/api/v1/namespaces/my-namespace/finalize
kill $PID
标签:kubectl,PID,namespace,apiserver,kube,my From: https://www.cnblogs.com/WJQ2017/p/17704047.html