An Associate Cloud Engineer needs to update the container image running on a regional Managed Instance Group (MIG) without incurring downtime. Order the steps required to safely execute a rolling update of the MIG using the Google Cloud CLI.
- 1Create a new Compute Engine instance template specifying the updated container image.
- 2Update the Managed Instance Group configuration to reference the newly created instance template.
- 3Execute `gcloud compute instance-groups managed rolling-action start-update` targeting the Managed Instance Group.
- 4Execute `gcloud compute instance-groups managed wait-until --stable` to monitor progress until all instances are healthy.
Cevap
The correct operational sequence is: 1) Create a new instance template with the updated container image, 2) Update the Managed Instance Group to target the new instance template, 3) Issue the `gcloud compute instance-groups managed rolling-action start-update` command, and 4) Verify completion using `gcloud compute instance-groups managed wait-until --stable`.
To update a Managed Instance Group without downtime, you must first create a new instance template since templates are immutable. Next, update the MIG target template setting to point to the new version. Then, initiate the rolling update via `gcloud compute instance-groups managed rolling-action start-update`. Finally, execute `gcloud compute instance-groups managed wait-until --stable` to verify that all instances reach a healthy, updated state.
Adım Adım Çözüm
Anahtar Kavram
Managed Instance Group Rolling Updates and Instance Template Immutability