Update delete_evicted.sh

This commit is contained in:
Torma Kristóf 2019-04-26 19:51:52 +02:00 committed by GitHub
parent 44482b1bb3
commit 4b81ed0800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,3 @@
#!/bin/bash #!/bin/bash
for each in $(kubectl get pods|grep Evicted|awk '{print $1}');
do kubectl get po --all-namespaces | awk '{if ($4 ~ /Evicted/) system ("kubectl -n " $1 " delete pods " $2)}'
kubectl delete pods $each
done