kubernetes清除状态为Evicted的pod

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod

  

清除脚本

#!/bin/bash
for pod in $(kubectl get pods|grep Evicted|awk '{print $1}');
do
  kubectl delete pods $pod
done

 

posted @ 2019-01-04 16:56  fansik  阅读(4999)  评论(1编辑  收藏  举报