
Answer-first summary for fast verification
Answer: Perform a rolling-action replace with max-unavailable set to 0 and max-surge set to 1
Performing a rolling-action replace with max-unavailable set to 0 and max-surge set to 1 is the optimal solution. This approach ensures that no instances are taken out of service during the update (max-unavailable=0), and it allows for the creation of one additional instance (max-surge=1) to maintain capacity. The new instance is put into service before an old instance is taken out for replacement, ensuring no reduction in available capacity. This method meets all the requirements: it minimizes effort and cost, ensures the application continues to serve live traffic without interruption, and applies the startup script changes efficiently. Other options either reduce capacity during the update, increase cost and complexity, or require manual intervention, which does not align with the requirements.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have deployed a web application using a managed instance group based on an instance template. After modifying the startup script in the instance template, you need to apply these changes to all existing instances without reducing the available capacity, minimizing effort and cost, while the application continues to serve live traffic. What is the best approach?
A
Delete instances in the managed instance group (MIG) one at a time and rely on auto-healing to provision an additional instance.
B
Perform a rolling-action replace with max-unavailable set to 0 and max-surge set to 1
C
Create a new managed instance group (MIG) based on a new 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
Perform a rolling-action start-update with max-unavailable set to 1 and max-surge set to 0
No comments yet.