yum -y install jq
# kubernetes-dashboard 是要删除的namespace的名称
kubectl get ns
NAMESPACE=kubernetes-dashboard
kubectl proxy &
kubectl get namespace $NAMESPACE -o json |jq '.spec = {"finalizers":[]}' >temp.json
curl -k -H "Content-Type: application/json" -X PUT --data-binary @temp.json
原文链接:https://blog.csdn.net/xujiamin0022016/article/details/107676203