Soru

Zorluk: ZorManaging Compute Engine Resources

An enterprise e-commerce platform relies on a Regional Managed Instance Group (RMIG) named `checkout-rmig` deployed in `us-east1` to handle production API traffic. The operations team created a updated Compute Engine instance template named `checkout-v2` containing critical software updates. To ensure zero downtime and maintain full serving capacity during the rollout, the deployment must guarantee that no active instances are terminated before replacement instances are provisioned and verified healthy. Which `gcloud` CLI command should you execute to accomplish this rolling update?

  1. gcloud compute instance-groups managed rolling-action start-update checkout-rmig --version=template=checkout-v2 --max-surge=3 --max-unavailable=0 --region=us-east1Cevap
  2. B
    gcloud compute instance-groups managed set-autoscaling checkout-rmig --target-cpu-utilization=0.80 --version=template=checkout-v2 --region=us-east1
  3. C
    gcloud compute instance-groups managed update checkout-rmig --template=checkout-v2 --zone=us-east1-a --force
  4. D
    gcloud compute instance-groups managed rolling-action start-update checkout-rmig --version=template=checkout-v2 --provisioning-model=SPOT --region=us-east1

Cevap

Execute 'gcloud compute instance-groups managed rolling-action start-update checkout-rmig --version=template=checkout-v2 --max-surge=3 --max-unavailable=0 --region=us-east1'. Setting max-unavailable to 0 guarantees zero capacity reduction during the update.
The correct command uses 'gcloud compute instance-groups managed rolling-action start-update' targeted at the regional group with '--region=us-east1'. Setting '--max-unavailable=0' guarantees that no existing running instances are taken offline before new replacement instances created via '--max-surge=3' are fully provisioned and report healthy.

Adım Adım Çözüm

1
Identify the proper gcloud command group for instance updates in Managed Instance Groups.
Recognize that updating instances to a new template requires 'gcloud compute instance-groups managed rolling-action start-update'.
Managed Instance Groups handle rolling instance replacements through rolling-action start-update commands.
2
Analyze capacity requirements for the rolling update.
Determine that maintaining full serving capacity without terminating instances prematurely requires setting '--max-unavailable=0'.
Setting --max-unavailable=0 forces the MIG to launch surge instances first and wait until they pass health checks before deleting old instances.
3
Confirm resource scope parameters.
Specify '--region=us-east1' to target the Regional Managed Instance Group (RMIG).
Regional instance groups require explicit region flags rather than zone flags.

Anahtar Kavram

Compute Engine Regional Managed Instance Group Rolling Updates
Bu soruyu puanla