强制删除 pvc
kubectl patch pvc pvc-9cd01e19-93b4-4bd8-bfc8-9d96cbe03f46 -p '{"metadata":{"finalizers":null}}' -n NAMESPACENAME
强制删除 pod
kubectl delete pod PODNAME --force --grace-period=0 -n NAMESPACENAME
强制删除 namespace
kubectl delete namespace NAMESPACENAME --force --grace-period=0 -n NAMESPACENAME
强制删除 ns
kubectl delete namespace kubesphere-logging-system --grace-period=0 --force
查看ns
[root@master1 ~]# kubectl get ns
NAME STATUS AGE
default Active 2d22h
istio-system Active 109m
kube-node-lease Active 2d22h
kube-public Active 2d22h
kube-system Active 2d22h
kubesphere-alerting-system Active 109m
kubesphere-logging-system Terminating 109m
openpitrix-system Active 109m
出现上述中Terminating状态的可以这样解决:
kubectl patch namespace NS -p '{"metadata":{"finalizers":[]}}' --type='merge' -n NS
kubectl delete namespace NS --grace-period=0 --force