nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #16

You have an application controlled by a managed instance group. When you deploy a new version of the application, costs should be minimized and the number of instances should not increase. You want to

The correct answer is B. Perform a rolling-action with maxSurge set to 0, maxUnavailable set to 1. maxSurge=0 means no additional instances are created beyond the current group size - total instance count never increases, controlling cost. maxUnavailable=1 means the rolling update proceeds by taking down one instance at a time, replacing it, and waiting for the health check to

Deploying applications

Question

You have an application controlled by a managed instance group. When you deploy a new version of the application, costs should be minimized and the number of instances should not increase. You want to ensure that, when each new instance is created, the deployment only continues if the new instance is healthy. What should you do?

Options

  • APerform a rolling-action with maxSurge set to 1, maxUnavailable set to 0.
  • BPerform a rolling-action with maxSurge set to 0, maxUnavailable set to 1
  • CPerform a rolling-action with maxHealthy set to 1, maxUnhealthy set to 0.
  • DPerform a rolling-action with maxHealthy set to 0, maxUnhealthy set to 1.

How the community answered

(39 responses)
  • A
    8% (3)
  • B
    85% (33)
  • C
    5% (2)
  • D
    3% (1)

Explanation

maxSurge=0 means no additional instances are created beyond the current group size - total instance count never increases, controlling cost. maxUnavailable=1 means the rolling update proceeds by taking down one instance at a time, replacing it, and waiting for the health check to confirm it is healthy before proceeding to the next. This satisfies the 'deployment only continues if the new instance is healthy' requirement. Option A (maxSurge=1, maxUnavailable=0) keeps all old instances running while adding one new one - increasing the total count. Options C and D reference invalid parameters (maxHealthy/maxUnhealthy do not exist in GCP MIG rolling updates).

Topics

#Managed Instance Groups#Rolling Updates#Deployment Strategies#Compute Engine

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice