An Associate Cloud Engineer needs to deploy a new version of a stateless web application running on an existing regional Managed Instance Group (MIG) with zero downtime using the gcloud CLI. Order the steps required to execute this deployment correctly from first to last.
- 1Create a new Instance Template incorporating the updated application disk image and startup configuration using 'gcloud compute instance-templates create'.
- 2Update the Managed Instance Group configuration to reference the newly created Instance Template using 'gcloud compute instance-groups managed set-instance-template'.
- 3Initiate a rolling replacement of existing instances across the group using 'gcloud compute instance-groups managed rolling-action start-update'.
- 4Monitor the health status and deployment progress of the replacement instances using 'gcloud compute instance-groups managed list-instances'.
Cevap
The correct operational sequence is: first, create the updated Instance Template; second, assign the template to the Managed Instance Group; third, launch the rolling update action; and fourth, monitor instance health and deployment completion.
The Google Cloud recommended workflow for updating a Managed Instance Group requires creating an immutable Instance Template first, attaching that template to the target MIG, triggering the rolling update action to replace existing VMs, and finally verifying instance health.
Adım Adım Çözüm
Anahtar Kavram
Managed Instance Group Rolling Updates via gcloud CLI