diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 9fd8d63b4e911..50417161c62f1 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -33,6 +33,7 @@ INSTANCE_PREFIX="${KUBE_GCE_INSTANCE_PREFIX:-kubernetes}" MASTER_NAME="${INSTANCE_PREFIX}-master" MASTER_TAG="${INSTANCE_PREFIX}-master" MINION_TAG="${INSTANCE_PREFIX}-minion" +MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}" # Compute IP addresses for nodes. function increment_ipv4 { diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 9b18221334144..96bd0bcb88a24 100644 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -271,6 +271,7 @@ function salt-master-role() { grains: roles: - kubernetes-master + cbr-cidr: ${MASTER_IP_RANGE} cloud: gce EOF } diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 88e786dd4525b..504017fcb57ac 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -453,6 +453,7 @@ DNS_SERVER_IP: $(yaml-quote ${DNS_SERVER_IP:-}) DNS_DOMAIN: $(yaml-quote ${DNS_DOMAIN:-}) MASTER_HTPASSWD: $(yaml-quote ${MASTER_HTPASSWD}) ADMISSION_CONTROL: $(yaml-quote ${ADMISSION_CONTROL:-}) +MASTER_IP_RANGE: $(yaml-quote ${MASTER_IP_RANGE}) EOF if [[ "${master}" != "true" ]]; then @@ -612,6 +613,7 @@ function kube-up { fi done + create-route "${MASTER_NAME}" "${MASTER_IP_RANGE}" # Wait for last batch of jobs. wait-for-jobs diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index cbca19b2331a7..63f0bc0f63d3b 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -48,6 +48,10 @@ base: - docker - sdn {% endif %} +{% if grains['cloud'] is defined and grains['cloud'] == 'gce' %} + - docker +{% endif %} + 'roles:kubernetes-pool-vsphere': - match: grain