- 命令
kubectl get pods -A |grep ${podStatus} |awk '{printf("kubectl delete pods %s -n %s\n", $2,$1)}' | /bin/bash
- 示例
kubectl get pods -A |grep UnexpectedAdmissionError |awk '{printf("kubectl delete pods %s -n %s\n", $2,$1)}' | /bin/bash
kubectl get pods -A |grep Evicted |awk '{printf("kubectl delete pods %s -n %s\n", $2,$1)}' | /bin/bash
- 注:请谨慎操作