k8s 关闭所有被驱逐(Evicted)的 pod
- 运维笔记
- 2021-04-17
- 323热度
- 0评论
命令如下:
kubectl get po -A | grep Evicted | awk '{print $1, $2}' | while read -r ns pod; do kubectl delete po $pod -n $ns; done
命令如下:
kubectl get po -A | grep Evicted | awk '{print $1, $2}' | while read -r ns pod; do kubectl delete po $pod -n $ns; done