How do I force delete kubernetes pods?

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

I have the following pods:

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


        
7条回答
  •  既然无缘
    2021-01-31 08:02

    I'm using this:

    kubectl get pods | grep part-of-the-pods-name|awk '{split($0,a," "); print a[1]}'|xargs -I {} kubectl delete pods {} --grace-period=0
    

    additional grep can be added if needed.

提交回复
热议问题