Google Cloud Associate Cloud Engineer — Question 141
You want to configure 10 Compute Engine instances for availability when maintenance occurs. Your requirements state that these instances should attempt to automatically restart if they crash. Also, the instances should be highly available including during system maintenance. What should you do?
Answer options
- A. Create an instance template for the instances. Set the 'Automatic Restart' to on. Set the 'On-host maintenance' to Migrate VM instance. Add the instance template to an instance group.
- B. Create an instance template for the instances. Set 'Automatic Restart' to off. Set 'On-host maintenance' to Terminate VM instances. Add the instance template to an instance group.
- C. Create an instance group for the instances. Set the 'Autohealing' health check to healthy (HTTP).
- D. Create an instance group for the instance. Verify that the 'Advanced creation options' setting for 'do not retry machine creation' is set to off.
Correct answer: A
Explanation
The correct answer is A because it ensures that the instances are set to automatically restart on failure while also being migrated during maintenance, which maintains availability. Option B incorrectly disables automatic restart, which does not meet the requirement for instances to recover from crashes. Option C focuses on health checks but does not address the automatic restart and maintenance settings. Option D does not ensure instances can restart or migrate during maintenance.