
Explanation:
The goal is to deploy a new version without increasing the number of instances (minimizing cost) and ensuring each new instance is healthy before proceeding. Managed Instance Groups (MIGs) use maxSurge and maxUnavailable to control rolling updates.
With maxSurge=0 and maxUnavailable=1, the MIG replaces instances one-by-one: it first stops an old instance (making it unavailable), then creates a new one in its place. The deployment waits for the new instance to be healthy before proceeding to the next replacement. This ensures no instance count increase and health checks are enforced.
Options C and D are invalid as maxHealthy/maxUnhealthy are not valid parameters. Option A uses maxSurge=1, which increases instance count temporarily, violating the cost constraint.
Ultimate access to all questions.
You have an application running on a managed instance group. When deploying a new version, you need to minimize costs and avoid increasing the total number of instances. Additionally, the deployment should only proceed if each newly created instance passes health checks.
What is the recommended approach to achieve this?
A
Perform a rolling-action with maxSurge set to 1, maxUnavailable set to 0.
B
Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1
C
Perform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0.
D
Perform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1.
No comments yet.