An operations engineer needs to update a regional internal HTTP(S) load balancer in Google Cloud. The team has deployed a new managed instance group named `ig-prod-backend` in region `us-central1` and wants to attach it as an additional backend to an existing regional backend service named `be-prod-service` in the same region. Which `gcloud` command should the engineer execute to achieve this configuration?
- gcloud compute backend-services add-backend be-prod-service --instance-group=ig-prod-backend --instance-group-region=us-central1 --region=us-central1Answer
- Bgcloud compute backend-services update be-prod-service --instance-group=ig-prod-backend --zone=us-central1-a
- Cgcloud compute target-pools add-instances be-prod-service --instances=ig-prod-backend --region=us-central1
- Dgcloud compute networks subnets update be-prod-service --add-secondary-ranges=ig-prod-backend=10.0.0.0/24 --region=us-central1
Answer
The correct command is `gcloud compute backend-services add-backend be-prod-service --instance-group=ig-prod-backend --instance-group-region=us-central1 --region=us-central1`.
To add an instance group to an existing regional backend service, you must use `gcloud compute backend-services add-backend` along with the `--instance-group`, `--instance-group-region`, and `--region` flags.
Step-by-Step Solution
Key Concept
Managing GCP Backend Services for Load Balancers
Estimated Time:1m 30s