From c4bc4e26becbbb1c58b4b57e6c691fe6ea9e7f40 Mon Sep 17 00:00:00 2001 From: He Simei Date: Sat, 19 Sep 2015 18:36:03 +0800 Subject: [PATCH] kube-down gracefully when api-server is no longer accessible --- cluster/common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index 3b86bfb1b8a..9df764ae791 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -120,10 +120,10 @@ function clear-kubeconfig() { function tear_down_alive_resources() { local kubectl="${KUBE_ROOT}/cluster/kubectl.sh" - "${kubectl}" delete rc --all - "${kubectl}" delete pods --all - "${kubectl}" delete svc --all - "${kubectl}" delete pvc --all + "${kubectl}" delete rc --all || true + "${kubectl}" delete pods --all || true + "${kubectl}" delete svc --all || true + "${kubectl}" delete pvc --all || true } # Gets username, password for the current-context in kubeconfig, if they exist.