July 2018
Intermediate to advanced
506 pages
16h 2m
English
When Compute Engine needs to perform various maintenance tasks, it may be required to shut down or impair the servers that host your VMs. To provide a high level of availability, Google allows developers to specify how the VMs should behave and be treated in such events, using availability policies. Availability policies are defined using two key attributes: maintenance behavior and restart behavior.
The availability policy of a given Compute Engine instance can be viewed using gcloud as part of the instance's metadata. To view the restart policy of the hello-gce instance we created earlier, run the following command:
gcloud compute instances describe --zone=us-east1-b \ hello-gce --format="yaml(scheduling)"