Google Cloud Associate Cloud Engineer — Question 27
You have a web application deployed as a managed instance group. You have a new version of the application to gradually deploy. Your web application is currently receiving live web traffic. You want to ensure that the available capacity does not decrease during the deployment. What should you do?
Answer options
- A. Perform a rolling-action start-update with maxSurge set to 0 and maxUnavailable set to 1.
- B. Perform a rolling-action start-update with maxSurge set to 1 and maxUnavailable set to 0.
- C. Create a new managed instance group with an updated instance template. Add the group to the backend service for the load balancer. When all instances in the new managed instance group are healthy, delete the old managed instance group.
- D. Create a new instance template with the new application version. Update the existing managed instance group with the new instance template. Delete the instances in the managed instance group to allow the managed instance group to recreate the instance using the new instance template.
Correct answer: B
Explanation
The correct answer, option B, allows for one additional instance to be created while ensuring that no instances are taken out of service, maintaining the application capacity. Option A reduces capacity by allowing one instance to become unavailable, while options C and D involve creating new instance groups or templates which may lead to downtime during the transition.