Google Professional Cloud Developer

Google Professional Cloud Developer

Get started today

Ultimate access to all questions.


You have deployed an HTTP(s) Load Balancer using the following gcloud commands:

export NAME=Load-balancer
# create network
gcloud compute networks create ${NAME}
# add instance
gcloud compute instances create ${NAME}-backend-instance-1 --subnet ${NAME} --no-address
# create the instance group
gcloud compute instance-groups unmanaged create ${NAME}-i
gcloud compute instance-groups unmanaged set-named-ports ${NAME}-i --named-ports http:80
gcloud compute instance-groups unmanaged add-instances ${NAME}-i --instances ${NAME}-backend-instance-1
# configure health checks
gcloud compute health-checks create http ${NAME}-http-hc --port 80
# create backend service
gcloud compute backend-services create ${NAME}-http-bes --health-checks ${NAME}-http-hc --protocol HTTP --port-name http --global
gcloud compute backend-services add-backend ${NAME}-http-bes --instance-group ${NAME}-i --balancing-mode RATE --max-rate 100000 --capacity-scaler 1.0 --global --instance-group-zone us-east1-d
# create url maps and forwarding rule
gcloud compute url-maps create ${NAME}-http-urlmap --default-service ${NAME}-http-bes
gcloud compute target-http-proxies create ${NAME}-http-proxy --url-map ${NAME}-http-urlmap
gcloud compute forwarding-rules create ${NAME}-http-fw --global --ip-protocol TCP --target-http-proxy ${NAME}-http-proxy --ports 80

Health checks to port 80 on the Compute Engine virtual machine instance are failing, and no traffic is being sent to your instances. You want to resolve the problem.

Which commands should you run?