diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 0d48c663fe0..4bcd38d5b9d 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -25,6 +25,7 @@ MASTER_DISK_TYPE=pd-ssd MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB} MINION_DISK_TYPE=pd-standard MINION_DISK_SIZE=${MINION_DISK_SIZE:-100GB} +KUBELET_PORT=10250 REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-false} KUBE_APISERVER_REQUEST_TIMEOUT=300 PREEMPTIBLE_MINION=${PREEMPTIBLE_MINION:-false} diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index fab6f6527bb..b6230cd748a 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -287,6 +287,7 @@ manifest_url: '$(echo "$MANIFEST_URL" | sed -e "s/'/''/g")' manifest_url_header: '$(echo "$MANIFEST_URL_HEADER" | sed -e "s/'/''/g")' num_nodes: $(echo "${NUM_MINIONS}") e2e_storage_test_environment: '$(echo "$E2E_STORAGE_TEST_ENVIRONMENT" | sed -e "s/'/''/g")' +kubelet_port: '$(echo "$KUBELET_PORT")' EOF if [ -n "${APISERVER_TEST_ARGS:-}" ]; then diff --git a/cluster/gce/debian/helper.sh b/cluster/gce/debian/helper.sh index 32a90f1cc10..f323a8ec5fb 100755 --- a/cluster/gce/debian/helper.sh +++ b/cluster/gce/debian/helper.sh @@ -16,7 +16,6 @@ # A library of helper functions and constant for debian os distro - # create-master-instance creates the master instance. If called with # an argument, the argument is used as the name to a reserved IP # address for the master. (In the case of upgrade/repair, we re-use diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index fde84c1e5b5..e57e609e59c 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -262,7 +262,8 @@ script echo "Docker daemon failed!" pkill docker fi - if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:10250/healthz > /dev/null; then + . /etc/kube-env + if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:${KUBELET_PORT:-10250}/healthz > /dev/null; then echo "Kubelet is unhealthy!" pkill kubelet fi diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 655221c9d16..d365c31ffa1 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1302,6 +1302,7 @@ OPENCONTRAIL_TAG: $(yaml-quote ${OPENCONTRAIL_TAG:-}) OPENCONTRAIL_KUBERNETES_TAG: $(yaml-quote ${OPENCONTRAIL_KUBERNETES_TAG:-}) OPENCONTRAIL_PUBLIC_SUBNET: $(yaml-quote ${OPENCONTRAIL_PUBLIC_SUBNET:-}) E2E_STORAGE_TEST_ENVIRONMENT: $(yaml-quote ${E2E_STORAGE_TEST_ENVIRONMENT:-}) +KUBELET_PORT: $(yaml-quote ${KUBELET_PORT:-}) EOF if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then cat >>$file < /dev/null; then + if ! curl --insecure -m ${max_seconds} -f -s https://127.0.0.1:{{kubelet_port}}/healthz > /dev/null; then echo "kubelet failed!" exit 2 fi