From 045e398c0883e88650c8740b55468afcde2d62a4 Mon Sep 17 00:00:00 2001 From: Ivan Font Date: Fri, 20 Jan 2017 10:42:53 -0800 Subject: [PATCH] Default to use the us-central1 region --- scripts/bootstrap-controllers.sh | 8 +------- scripts/cleanup.sh | 2 +- scripts/start-infra-gcp.sh | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/bootstrap-controllers.sh b/scripts/bootstrap-controllers.sh index bc4b827..a221eb4 100755 --- a/scripts/bootstrap-controllers.sh +++ b/scripts/bootstrap-controllers.sh @@ -78,8 +78,6 @@ RestartSec=5 [Install] WantedBy=multi-user.target' > kube-apiserver.service" - - #gcloud compute ssh controller${i} --command 'INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip); sed -i s/INTERNAL_IP/${INTERNAL_IP}/g kube-apiserver.service' gcloud compute ssh controller${i} --command "sudo mv kube-apiserver.service /etc/systemd/system/" gcloud compute ssh controller${i} --command "sudo systemctl daemon-reload" gcloud compute ssh controller${i} --command "sudo systemctl enable kube-apiserver" @@ -87,7 +85,6 @@ WantedBy=multi-user.target' > kube-apiserver.service" gcloud compute ssh controller${i} --command "sudo systemctl status kube-apiserver --no-pager" # kube-controller-manager - #gcloud compute copy-files kube-controller-manager.service controller${i}:~/ gcloud compute ssh controller${i} --command "echo '[Unit] Description=Kubernetes Controller Manager Documentation=https://github.com/GoogleCloudPlatform/kubernetes @@ -109,7 +106,6 @@ RestartSec=5 [Install] WantedBy=multi-user.target' > kube-controller-manager.service" - #gcloud compute ssh controller${i} --command 'INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip); sed -i s/INTERNAL_IP/${INTERNAL_IP}/g kube-controller-manager.service' gcloud compute ssh controller${i} --command "sudo mv kube-controller-manager.service /etc/systemd/system/" gcloud compute ssh controller${i} --command "sudo systemctl daemon-reload" gcloud compute ssh controller${i} --command "sudo systemctl enable kube-controller-manager" @@ -117,7 +113,6 @@ WantedBy=multi-user.target' > kube-controller-manager.service" gcloud compute ssh controller${i} --command "sudo systemctl status kube-controller-manager --no-pager" # kube-scheduler - #gcloud compute copy-files kube-scheduler.service controller${i}:~/ gcloud compute ssh controller${i} --command "echo '[Unit] Description=Kubernetes Scheduler Documentation=https://github.com/GoogleCloudPlatform/kubernetes @@ -133,7 +128,6 @@ RestartSec=5 [Install] WantedBy=multi-user.target' > kube-scheduler.service" - #gcloud compute ssh controller${i} --command 'INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip); sed -i s/INTERNAL_IP/${INTERNAL_IP}/g kube-scheduler.service' gcloud compute ssh controller${i} --command "sudo mv kube-scheduler.service /etc/systemd/system/" gcloud compute ssh controller${i} --command "sudo systemctl daemon-reload" gcloud compute ssh controller${i} --command "sudo systemctl enable kube-scheduler" @@ -168,4 +162,4 @@ gcloud compute forwarding-rules create kubernetes-rule \ --address ${KUBERNETES_PUBLIC_ADDRESS} \ --ports 6443 \ --target-pool kubernetes-pool \ - --region us-west1 + --region us-central1 diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index fa5de17..74be874 100755 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -19,7 +19,7 @@ done gcloud -q compute instances delete ${hosts} -gcloud -q compute forwarding-rules delete kubernetes-rule --region us-west1 +gcloud -q compute forwarding-rules delete kubernetes-rule --region us-central1 gcloud -q compute target-pools delete kubernetes-pool diff --git a/scripts/start-infra-gcp.sh b/scripts/start-infra-gcp.sh index fb616c0..c19c634 100755 --- a/scripts/start-infra-gcp.sh +++ b/scripts/start-infra-gcp.sh @@ -52,7 +52,7 @@ gcloud compute firewall-rules create kubernetes-allow-api-server \ gcloud compute firewall-rules list --filter "network=kubernetes" -gcloud compute addresses create kubernetes --region=us-west1 +gcloud compute addresses create kubernetes --region=us-central1 gcloud compute addresses list kubernetes