Ensure that your Google Cloud Platform (GCP) projects are not using preemptible virtual machine instances for production and business-critical applications. A preemptible virtual machine (VM) is an instance that you can create and run at a much lower price than normal instances but it can be terminated sooner due to system demands.
Preemptible virtual machine instances are excess Compute Engine capacity, therefore their availability varies with usage. These instances may be preempted to free up compute resources for standard VM instances, and will only be able to run for a limited amount of time. Preemptible instances costs much less than standard instances, however, these resources are not suitable for production workloads as Google Cloud Compute Engine can terminate (preempt) the instances when it needs the resources for other tasks. Unless your applications are fault-tolerant and can withstand possible instance preemptions, it is strongly recommended to disable preemptibility for virtual machine (VM) instances.
Audit
To determine if there are any preemptible VM instances running within your GCP projects, perform the following actions:
Remediation / Resolution
Avoid using preemptible virtual machine instances for production cloud environments. To disable preemptibility for existing Google Cloud virtual machine (VM) instances you have to re-create those instances and change their availability policy by performing the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Virtual machine instances
- Preemptible VM instances
- Creating and starting a preemptible VM instance
- Creating and starting a VM instance
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud compute instances list
- gcloud compute instances describe
- gcloud compute images create
- gcloud compute instances create
- gcloud compute instances delete