HTTP(S) load balancer health checks to port 80 are failing and no traffic reaches instances. Which command fixes the issue?
Choose an answer
Tap an option to check your answer.
Correct answer: gcloud compute firewall-rules create allow-lb --network load-balancer --allow tcp --source-ranges 130.211.0.0/22,35.191.0.0/16 --direction INGRESS.
Why this is the answer
The correct command creates an ingress firewall rule allowing traffic from the Google Cloud load balancer health check probe IP ranges (130.211.0.0/22 and 35.191.0.0/16) to reach the instances. Health checks originate from these specific IP ranges, and if a firewall blocks them, the load balancer will mark instances as unhealthy, preventing traffic. gcloud compute instances add-access-config is for assigning external IP addresses to instances, not for firewall issues. gcloud compute firewall-rules create allow-lb --direction EGRESS would allow traffic out of the network, but health checks need to come into the instances. gcloud compute health-checks update http health-check --unhealthy-threshold 10 modifies the health check's sensitivity but doesn't resolve a fundamental connectivity block caused by a firewall.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed