$ kubectl get pods [-n 可指定名稱空間] | grep Evicted | awk '{print $1}' | xargs kubectl delete pod # xargs: http://www.ruanyifeng.com/blog/2019/08/xargs-tutorial.html # 這裏的作用是將|管道左側輸出內容,將空行轉爲空格,繼而轉成參數傳入到xargs命令後,後半段類似於: kubectl delete pods a1 a2 a3