Google Cloud Professional Cloud Network Engineer — Question 104
You have deployed an HTTP(s) load balancer, but health checks to port 80 on the Compute Engine virtual machine instance are failing, and no traffic is sent to your instances. You want to resolve the problem. Which commands should you run?
Answer options
- A. gcloud compute instances add-access-config instance-1
- B. gcloud compute firewall-rules create allow-lb --network load-balancer --allow tcp --destination-ranges 130.211.0.0/22,35.191.0.0/16 --direction EGRESS
- C. 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
- D. gcloud compute health-checks update http health-check --unhealthy-threshold 10
Correct answer: C
Explanation
The correct answer is C because it allows incoming traffic from the specified IP ranges to the load balancer, which is essential for the health checks to pass. Option A is incorrect as it pertains to access configuration, and Option B focuses on egress traffic, which is not relevant here. Option D modifies the health check parameters but does not address the underlying issue of firewall rules blocking traffic.