You need to update an existing regional Managed Instance Group named `frontend-mig` to use a new instance template named `frontend-v2` without incurring application downtime. Which sequence represents the correct chronological order of `gcloud` operations to execute this update and verify system stability?
- 1Create the new instance template `frontend-v2` with updated VM configuration parameters using `gcloud compute instance-templates create`.
- 2Set the target instance template of `frontend-mig` to `frontend-v2` using `gcloud compute instance-groups managed set-instance-template`.
- 3Trigger the incremental instance replacement process using `gcloud compute instance-groups managed rolling-action start-update`.
- 4Verify that all instances have completed update tasks and the group status displays `isStable: true` using `gcloud compute instance-groups managed describe`.
Answer
The correct operational sequence is: 1) Create the new instance template (`frontend-v2`), 2) Associate the template with the Managed Instance Group (`frontend-mig`), 3) Initiate the rolling update action, and 4) Confirm the instance group has returned to a stable state (`isStable: true`).
The standard operational lifecycle for updating a GCP Managed Instance Group requires creating a new instance template first, as instance templates are immutable. Next, the target Managed Instance Group must be updated to reference this new template. After updating the group's template assignment, the engineer starts a rolling update to replace running VM instances gradually. Finally, running a describe command allows the engineer to confirm that the group has reached a stable status (`isStable: true`) and all instances pass health checks.
Step-by-Step Solution
Key Concept
Sequence of operations for updating Managed Instance Group (MIG) templates and performing rolling updates.