Update delete_evicted.sh

This commit is contained in:
Torma Kristóf 2019-04-30 12:30:22 +02:00 committed by GitHub
parent 24af65e1a4
commit da9091e70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,3 +1,3 @@
#!/bin/bash
kubectl get po --all-namespaces | awk '{if ($4 ~ /Evicted/) system ("kubectl -n " $1 " delete pods " $2)}'
kubectl get pods --all-namespaces --field-selector 'status.phase==Failed' -o json | kubectl delete -f -