Google Cloud Professional Cloud Developer — Question 57

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?

Answer options

Correct answer: B

Explanation

The correct answer is B, as setting maxSurge to 0 and maxUnavailable to 1 allows for one instance to be taken down while ensuring that no additional instances are started until the current ones are verified as healthy. Option A would increase the number of instances, while options C and D do not correctly manage the health check requirements during deployment.