kubernetes清除狀態爲Evicted的pod

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

  

清除腳本bash

#!/bin/bash for pod in $(kubectl get pods|grep Evicted|awk '{print $1}'); do kubectl delete pods $pod done
相關文章
相關標籤/搜索