diff --git a/cluster/config-default.sh b/cluster/config-default.sh index 43336e5b96e..a44fe5dc3f2 100755 --- a/cluster/config-default.sh +++ b/cluster/config-default.sh @@ -19,6 +19,7 @@ MINION_SIZE=g1-small NUM_MINIONS=4 # gcloud will expand this to the latest supported image. IMAGE=debian-7-backports +NETWORK=default INSTANCE_PREFIX=kubernetes MASTER_NAME="${INSTANCE_PREFIX}-master" MASTER_TAG="${INSTANCE_PREFIX}-master" diff --git a/cluster/config-test.sh b/cluster/config-test.sh index dfaf3af06a0..d285b687237 100755 --- a/cluster/config-test.sh +++ b/cluster/config-test.sh @@ -19,6 +19,7 @@ MINION_SIZE=g1-small NUM_MINIONS=2 # gcloud will expand this to the latest supported image. IMAGE=debian-7-backports +NETWORK=default INSTANCE_PREFIX="e2e-test-${USER}" MASTER_NAME="${INSTANCE_PREFIX}-master" MASTER_TAG="${INSTANCE_PREFIX}-master" diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index a33ea45032d..46151cc414f 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -63,7 +63,8 @@ echo "Starting VMs and configuring firewalls" gcloud compute firewalls create --quiet ${MASTER_NAME}-https \ --project ${PROJECT} \ --target-tags ${MASTER_TAG} \ - --allow tcp:443 & + --allow tcp:443 \ + --network ${NETWORK} & gcloud compute instances create ${MASTER_NAME}\ --project ${PROJECT} \ @@ -73,7 +74,8 @@ gcloud compute instances create ${MASTER_NAME}\ --tags ${MASTER_TAG} \ --no-scopes \ --restart-on-failure \ - --metadata-from-file startup-script=${KUBE_TEMP}/master-start.sh & + --metadata-from-file startup-script=${KUBE_TEMP}/master-start.sh \ + --network ${NETWORK} & GCLOUD_VERSION=$(gcloud version | grep compute | cut -f 2 -d ' ') @@ -94,7 +96,8 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do --no-scopes \ --restart-on-failure \ --can-ip-forward \ - --metadata-from-file startup-script=${KUBE_TEMP}/minion-start-${i}.sh & + --metadata-from-file startup-script=${KUBE_TEMP}/minion-start-${i}.sh \ + --network ${NETWORK} & # 'gcloud compute' past 2014.06.11 breaks the way we are specifying # --next-hop-instance and there is no way to be compatible with both versions. @@ -102,13 +105,15 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do gcloud compute routes create ${MINION_NAMES[$i]} \ --project ${PROJECT} \ --destination-range ${MINION_IP_RANGES[$i]} \ - --next-hop-instance ${ZONE}/instances/${MINION_NAMES[$i]} & + --next-hop-instance ${ZONE}/instances/${MINION_NAMES[$i]} \ + --network ${NETWORK} & else gcloud compute routes create ${MINION_NAMES[$i]} \ --project ${PROJECT} \ --destination-range ${MINION_IP_RANGES[$i]} \ --next-hop-instance ${MINION_NAMES[$i]} \ - --next-hop-instance-zone ${ZONE} & + --next-hop-instance-zone ${ZONE} \ + --network ${NETWORK} & fi done