以下两条命令 直接复制执行即可
kubectl get pods -A |grep Evicted |awk '{print "kubectl delete pods -n " $1,$2}' | bash
for i in `kubectl get pods -A | grep Evicted | awk '{print $1}' |uniq`;do for j in `kubectl get pods -n $i |grep Evicted|awk '{print $1}'`; do kubectl delete pods -n $i $j; done; done
网友评论