Created
June 26, 2017 16:55
-
-
Save kelseyhightower/61ce324db5639f95c77c686cc0d11fa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute instance-groups unmanaged create taiwan \ | |
--zone asia-east1-a | |
gcloud compute instance-groups unmanaged add-instances taiwan \ | |
--instances $(kubectl get nodes \ | |
--context taiwan \ | |
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
--zone asia-east1-a | |
gcloud compute instance-groups set-named-ports taiwan \ | |
--named-ports=http:30080 \ | |
--zone asia-east1-a | |
gcloud compute instance-groups unmanaged create belgium \ | |
--zone europe-west1-b | |
gcloud compute instance-groups unmanaged add-instances belgium \ | |
--instances $(kubectl get nodes \ | |
--context belgium \ | |
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
--zone europe-west1-b | |
gcloud compute instance-groups set-named-ports belgium \ | |
--named-ports=http:30080 \ | |
--zone europe-west1-b | |
gcloud compute instance-groups unmanaged create oregon \ | |
--zone us-west1-b | |
gcloud compute instance-groups unmanaged add-instances oregon \ | |
--instances $(kubectl get nodes \ | |
--context oregon \ | |
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
--zone us-west1-b | |
gcloud compute instance-groups set-named-ports oregon \ | |
--named-ports=http:30080 \ | |
--zone us-west1-b | |
gcloud compute health-checks create tcp ping-health-check --port 30080 | |
gcloud compute backend-services create ping-backend-services \ | |
--health-checks ping-health-check \ | |
--global | |
gcloud compute backend-services add-backend ping-backend-services \ | |
--instance-group taiwan \ | |
--instance-group-zone asia-east1-a \ | |
--global | |
gcloud compute backend-services add-backend ping-backend-services \ | |
--instance-group belgium \ | |
--instance-group-zone europe-west1-b \ | |
--global | |
gcloud compute backend-services add-backend ping-backend-services \ | |
--instance-group oregon \ | |
--instance-group-zone us-west1-b \ | |
--global | |
gcloud compute url-maps create ping-url-map \ | |
--default-service ping-backend-services | |
gcloud compute target-http-proxies create ping-http-proxy \ | |
--url-map ping-url-map | |
gcloud compute forwarding-rules create ping-forwarding-rules \ | |
--target-http-proxy ping-http-proxy \ | |
--ports 80 \ | |
--global | |
gcloud compute firewall-rules create ping-backend-services \ | |
--allow tcp:30080 \ | |
--source-ranges 130.211.0.0/22,35.191.0.0/16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment