Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
A mission-critical e-commerce application is deployed across three zones using a regional Managed Instance Group (MIG) with a target size of 30 VM instances (10 instances per zone). During operational hours, the application cannot tolerate any reduction in its baseline serving capacity, as dropping below 30 active instances will cause immediate request latency spikes and service degradation. A security patch requires updating the operating system image across the fleet by rolling out a new instance template.
Which update policy configuration should you apply to execute an automated rolling update without dropping below the required 30 serving instances?
Setting maxSurge to 0 and maxUnavailable to 3 configures a rolling update policy that strictly prevents the MIG from exceeding its targetSize of 30 instances, instead taking down up to 3 existing instances at a time to create replacement instances in-place.
maxUnavailable to 3 means the active serving fleet will drop from 30 down to 27 instances during the update rollout, directly violating the constraint that no capacity reduction can occur.targetSize without temporary surges.The scenario had strict Google Cloud regional quota or IP allocation constraints preventing any temporary VM provisioning above the 30-instance ceiling, and the workload had surplus headroom allowing a 10% temporary reduction in compute capacity.
This configuration sets the disruption level controls to restrict VM updates to non-disruptive metadata/tag updates (REFRESH) or in-place instance reboots (RESTART), explicitly prohibiting instance replacements (REPLACE).
REPLACE).mostDisruptiveAllowedAction is capped at RESTART, attempting to roll out an instance template that modifies the OS boot disk will fail because the required action (REPLACE) exceeds the allowed disruption threshold.REFRESH only applies live updates such as labels, tags, and metadata without stopping the VM.RESTART can change machine types or restart services, but cannot update the boot disk image.mostDisruptiveAllowedAction.The update only involved modifying instance metadata, environment variables, or labels where a restart was sufficient to pick up changes without needing a new base OS boot disk.
A proactive rolling update in a Managed Instance Group (MIG) automatically rolls out a new instance template across existing instances according to the configured updatePolicy parameters, managing instance lifecycles while maintaining health and capacity.
maxUnavailable to 0 guarantees that Compute Engine will never stop, delete, or take offline any existing healthy VM instance before an equivalent replacement instance is fully booted, healthy, and available to serve traffic.maxSurge to a positive value (e.g., 3 instances or 10%) instructs the MIG Updater to provision temporary additional instances above the targetSize using the new instance template before terminating old instances.REPLACE action enables the MIG to replace instances with the new template without failing the update request.maxSurge up or down to balance rollout speed against infrastructure quota and compute budget.This configuration represents the standard pattern for zero-downtime rolling upgrades in production environments where capacity deficits cannot be tolerated. The Updater provisions new surged VMs first, verifies their health, and only then tears down old instances.
An opportunistic update type prevents the MIG from actively updating existing running instances; it only applies the new template when instances are manually targeted or created through autoscaling/resizing events. Furthermore, setting both maxSurge and maxUnavailable to 0 creates an invalid or deadlocked state for rolling replacements.
maxSurge to 0 and maxUnavailable to 0 prevents the MIG from creating any temporary new instances while simultaneously preventing it from taking any existing instances offline, making automated progress impossible.applyUpdatesToInstances) to roll out new templates to existing VMs.maxSurge and maxUnavailable must be greater than 0 for the MIG Updater to make progress during a rolling replacement.The team required manual, step-by-step selective patching of individual canary instances using applyUpdatesToInstances during a dedicated maintenance window rather than an automated rolling deployment across the entire fleet.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated