remove brackets
parent
5837e6796d
commit
70a48c92f7
|
@ -379,33 +379,31 @@ In this section you will provision an external load balancer to front the Kubern
|
||||||
Create the external load balancer network resources:
|
Create the external load balancer network resources:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
KUBERNETES_PUBLIC_ADDRESS=$(gcloud compute addresses describe kubernetes-the-hard-way \
|
||||||
KUBERNETES_PUBLIC_ADDRESS=$(gcloud compute addresses describe kubernetes-the-hard-way \
|
|
||||||
--region $(gcloud config get-value compute/region) \
|
--region $(gcloud config get-value compute/region) \
|
||||||
--format 'value(address)')
|
--format 'value(address)')
|
||||||
|
|
||||||
gcloud compute http-health-checks create kubernetes \
|
gcloud compute http-health-checks create kubernetes \
|
||||||
--description "Kubernetes Health Check" \
|
--description "Kubernetes Health Check" \
|
||||||
--host "kubernetes.default.svc.cluster.local" \
|
--host "kubernetes.default.svc.cluster.local" \
|
||||||
--request-path "/healthz"
|
--request-path "/healthz"
|
||||||
|
|
||||||
gcloud compute firewall-rules create kubernetes-the-hard-way-allow-health-check \
|
gcloud compute firewall-rules create kubernetes-the-hard-way-allow-health-check \
|
||||||
--network kubernetes-the-hard-way \
|
--network kubernetes-the-hard-way \
|
||||||
--source-ranges 209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 \
|
--source-ranges 209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 \
|
||||||
--allow tcp
|
--allow tcp
|
||||||
|
|
||||||
gcloud compute target-pools create kubernetes-target-pool \
|
gcloud compute target-pools create kubernetes-target-pool \
|
||||||
--http-health-check kubernetes
|
--http-health-check kubernetes
|
||||||
|
|
||||||
gcloud compute target-pools add-instances kubernetes-target-pool \
|
gcloud compute target-pools add-instances kubernetes-target-pool \
|
||||||
--instances controller-0,controller-1,controller-2
|
--instances controller-0,controller-1,controller-2
|
||||||
|
|
||||||
gcloud compute forwarding-rules create kubernetes-forwarding-rule \
|
gcloud compute forwarding-rules create kubernetes-forwarding-rule \
|
||||||
--address ${KUBERNETES_PUBLIC_ADDRESS} \
|
--address ${KUBERNETES_PUBLIC_ADDRESS} \
|
||||||
--ports 6443 \
|
--ports 6443 \
|
||||||
--region $(gcloud config get-value compute/region) \
|
--region $(gcloud config get-value compute/region) \
|
||||||
--target-pool kubernetes-target-pool
|
--target-pool kubernetes-target-pool
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
|
|
Loading…
Reference in New Issue