Your organization operates a high-availability production application running on a Compute Engine Regional Managed Instance Group (MIG). You need to perform a seamless software update by deploying a new instance template named `template-v2`. The deployment process must guarantee zero application downtime and ensure that replacement instances are fully booted, initialized, and verified healthy before any existing instances are taken offline. Which two actions should you take to achieve this?
- Perform a rolling update on the MIG referencing `template-v2` with the `maxUnavailable` parameter set to 0.Answer
- Configure a positive `minReadySec` value in the MIG update policy to enforce a delay after instance startup before marking the update of that instance as complete.Answer
- CModify the MIG autoscaling policy target CPU utilization to 100% during the update window to prevent instances from scaling down.
- DChange the MIG target provisioning model to Spot VMs prior to starting the update to reduce instance replacement costs.
- EAssign the primitive `Viewer` role to the Compute Engine default service account to grant permissions required for instance replacement.
Answer
To perform a zero-downtime update that validates instance readiness, initiate a rolling update referencing the new template with `maxUnavailable` set to 0 and configure `minReadySec` in the update policy.
Performing a rolling update with `maxUnavailable` set to 0 ensures that Compute Engine creates new instances before taking old ones down, preserving total capacity. Additionally, configuring `minReadySec` enforces a mandatory wait time after an instance starts up and passes health checks, guaranteeing that the new instance is serving traffic cleanly before the system moves on to replace the next instance.
Step-by-Step Solution
Key Concept
Compute Engine MIG Rolling Update Policy Configuration
Estimated Time:3m 0s