From da9091e70a93ab30ed3b8c8ea13f87b14156e082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Tue, 30 Apr 2019 12:30:22 +0200 Subject: [PATCH] Update delete_evicted.sh --- delete_evicted.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/delete_evicted.sh b/delete_evicted.sh index 4449816..8efc708 100644 --- a/delete_evicted.sh +++ b/delete_evicted.sh @@ -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 -