Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
Your enterprise runs a critical web application on regional Compute Engine Managed Instance Groups (MIGs) across staging and production environments. You are tasked with implementing an automated patching and lifecycle promotion pipeline that strictly adheres to immutable infrastructure principles and minimizes the blast radius of potential regressions.
The deployment strategy must satisfy the following requirements:
Which strategy should you implement?
Deploy the new instance template across both staging and production simultaneously, configure an internal HTTP(S) Load Balancer to route 10% of traffic to a separate canary MIG, and rely on Config Sync to reconcile the instance templates if drift occurs.
Bake a new VM image containing the applied patches, generate an updated instance template, and deploy it to the staging MIG. Upon successful staging tests, initiate a canary update on the production MIG specifying the current template and the new template with a 10% target size, and trigger an automated rollback script via Cloud Monitoring alerts if error thresholds are breached.
Create an instance template that executes dynamic package updates inside a startup script, apply it to the staging MIG, and update the production MIG directly to 100% while relying on Compute Engine auto-healing health checks to revert the template upon failure.
Configure VM Manager Patch Management to execute an in-place OS patch job across staging VMs, verify compliance in the Patch dashboard, and execute a simultaneous 100% patch rollout across all production VMs with a post-patch script that restores disk snapshots on error.
Deploy the new instance template across both staging and production simultaneously, configure an internal HTTP(S) Load Balancer to route 10% of traffic to a separate canary MIG, and rely on Config Sync to reconcile the instance templates if drift occurs.
Bake a new VM image containing the applied patches, generate an updated instance template, and deploy it to the staging MIG. Upon successful staging tests, initiate a canary update on the production MIG specifying the current template and the new template with a 10% target size, and trigger an automated rollback script via Cloud Monitoring alerts if error thresholds are breached.
This solution implements an immutable infrastructure pattern combined with canary deployments in Compute Engine Managed Instance Groups (MIGs) and automated remediation triggered by Cloud Monitoring alerts.
rolling-action start-update command with --version=template=CURRENT_INSTANCE_TEMPLATE and --canary-version=template=NEW_TEMPLATE,target-size=10%, the production MIG shifts only 10% of its capacity to the new template while keeping 90% on the baseline version.This approach aligns with Google Cloud site reliability engineering and DevOps best practices by separating artifact creation from environment promotion, employing progressive rollouts, and using metric thresholds for automated rollback decisions.
Create an instance template that executes dynamic package updates inside a startup script, apply it to the staging MIG, and update the production MIG directly to 100% while relying on Compute Engine auto-healing health checks to revert the template upon failure.
Configure VM Manager Patch Management to execute an in-place OS patch job across staging VMs, verify compliance in the Patch dashboard, and execute a simultaneous 100% patch rollout across all production VMs with a post-patch script that restores disk snapshots on error.