Google Cloud Associate Cloud Engineer — Question 47
You are deploying an application to a Compute Engine VM in a managed instance group. The application must be running at all times, but only a single instance of the VM should run per GCP project. How should you configure the instance group?
Answer options
- A. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
- B. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
- C. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
- D. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Correct answer: A
Explanation
The correct answer is A because enabling autoscaling with both the minimum and maximum instances set to 1 ensures that only one instance is running at all times while still allowing the system to manage the instance's health. Option B incorrectly turns off autoscaling, which is not necessary since it can still maintain one instance. Options C and D allow for more than one instance, which contradicts the requirement of having a single instance.