Ultimate access to all questions.
You have deployed several preemptible Linux virtual machine instances on Google Compute Engine. How can you ensure your application shuts down gracefully before these instances are pre-empted?
Explanation:
The correct approach involves creating a shutdown script and assigning it as a metadata entry with the key ‘shutdown-script’ in the Cloud Platform Console when setting up the virtual machine instance. This method ensures the application can shut down gracefully upon pre-emption. Other methods, such as using the CLI, Console, or API for shutdown commands or workload migration, introduce unnecessary complexity and do not guarantee a graceful shutdown. The deployment manager cannot be used to set a shutdown script as a metadata entry, making the Cloud Platform Console the appropriate tool for this purpose. Reference: Google Cloud Documentation on Shutdown Scripts.