diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 085efa3c1df..5fac25689e6 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -241,17 +241,6 @@ function kube-up { echo "Please run ./cluster/kube-down.sh and re-create the cluster. (sorry!)" exit 1 fi - - # Make sure the kubelet is healthy - if [ "$(curl --insecure --user ${user}:${passwd} https://${KUBE_MASTER_IP}/proxy/minion/${MINION_NAMES[$i]}/healthz)" != "ok" ]; then - echo "Kubelet failed to install on ${MINION_NAMES[$i]}. Your cluster is unlikely to work correctly." - echo "Please run ./cluster/kube-down.sh and re-create the cluster. (sorry!)" - exit 1 - else - echo "Kubelet is successfully installed on ${MINION_NAMES[$i]}" - - fi - done echo diff --git a/cluster/validate-cluster.sh b/cluster/validate-cluster.sh index 3a4db6b5de2..85d74bc3de4 100755 --- a/cluster/validate-cluster.sh +++ b/cluster/validate-cluster.sh @@ -26,6 +26,8 @@ set -e source $(dirname $0)/kube-env.sh source $(dirname $0)/$KUBERNETES_PROVIDER/util.sh +get-password +detect-master > /dev/null detect-minions > /dev/null MINIONS_FILE=/tmp/minions @@ -37,6 +39,16 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do echo "Failed to find ${MINION_NAMES[i]}, cluster is probably broken." exit 1 fi + + # Make sure the kubelet is healthy + if [ "$(curl --insecure -sw '%{http_code}' --user ${user}:${passwd} https://${KUBE_MASTER_IP}/proxy/minion/${MINION_NAMES[$i]}/healthz)" != "200" ]; then + echo "Kubelet failed to install on ${MINION_NAMES[$i]}. Your cluster is unlikely to work correctly." + echo "Please run ./cluster/kube-down.sh and re-create the cluster. (sorry!)" + exit 1 + else + echo "Kubelet is successfully installed on ${MINION_NAMES[$i]}" + + fi done echo "Cluster validation succeeded"