How do I force delete kubernetes pods?

前端 未结 7 1965
渐次进展
渐次进展 2021-01-31 07:58

I have the following pods:

NAME                                                 READY     STATUS        RESTARTS   AGE
xxx-myactivities-79f49cdfb4-nwg22                  


        
7条回答
  •  梦毁少年i
    2021-01-31 08:15

    To delete all pods in terminating state with one command do:

    for p in $(kubectl get pods | grep Terminating | awk '{print $1}'); do kubectl delete pod $p --grace-period=0 --force;done
    

提交回复
热议问题