#!/bin/bash
for ns in `kubectl get ns | awk 'NR>1{print $1}'`
do
kubectl get pods -n ${ns} | grep Evicted | awk '{print $1}' | xargs kubectl delete pod -n ${ns}
done
#!/bin/bash
for ns in `kubectl get ns | awk 'NR>1{print $1}'`
do
kubectl get pods -n ${ns} | grep Evicted | awk '{print $1}' | xargs kubectl delete pod -n ${ns}
done