强制删除 Terminating 状态的pod

[root@k8s-master coredns]# kubectl get pod
NAME                     READY   STATUS        RESTARTS   AGE
nginx-7bb7cd8db5-5c7z9   1/1     Terminating   0          70m
nginx-7bb7cd8db5-t24hf   1/1     Running       0          57m


[root@k8s-master coredns]# kubectl delete pod nginx-7bb7cd8db5-5c7z9 --grace-period=0 --force

warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
pod "nginx-7bb7cd8db5-5c7z9" force deleted


[root@k8s-master coredns]# kubectl get pod
NAME                     READY   STATUS    RESTARTS   AGE
nginx-7bb7cd8db5-t24hf   1/1     Running   0          60m


posted @ 2019-08-06 15:01  #赵程#  阅读(676)  评论(0编辑  收藏  举报