kubernetes 批量删除失败pod

删除default namespace下的失败pod
kubectl  get pods | grep calico | awk '{print$1}'| xargs kubectl delete pods
 
删除指定namespace下的失败pod
kubectl  get pods -n kube-system | grep calico | awk '{print$1}'| xargs kubectl delete -n kube-system pods

  

posted @ 2024-05-17 16:09  lucky_tomato  阅读(72)  评论(0编辑  收藏  举报