k8s删除所有pod

kubectl delete --all deployments

kubectl delete all --all --all-namespaces

for each in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}" | grep -v kube-system);
do
  kubectl delete ns $each
done

 

 

 

kubectl delete pods --all --grace-period=0 --force

 

 

https://jhooq.com/kubernetes-delete-pod/

posted @ 2022-06-02 00:34  Shiyu_Huang  阅读(745)  评论(0编辑  收藏  举报