Rabi
Rabi

Reputation: 217

GCP spot VMs preemption

I created a GKE nodepool with 10 spot instances. I know from the documentation that the cluster will automatically recreate the preempted instances and my question is about whether preemption will affect all the VMs or just some of them each time?

Upvotes: 0

Views: 2312

Answers (2)

Dion V
Dion V

Reputation: 824

The instances may be preempted by GCE at any time with a 30s warning; removing the 24 hour PVM limit. Otherwise, they have the exact same performance as Standard VMs.Therefore, these kinds of VMs do not have a hard limit in the time that they should be terminated , the VM’s can be terminated in less than 6 hours or more than 24 if it is needed to reclaim those resources for other tasks.

Keep in mind that Spot VMs are excess Compute Engine capacity, so their availability varies with usage. Spot VMs do not have a minimum or maximum runtime[1].

If there are no available resources to replace the terminated VM, you will get an error similar to “ZONE_RESOURCE_POOL_EXHAUSTED”[2], and the cluster will retry to create the VM until the resources are available.

Upvotes: 1

PeteP
PeteP

Reputation: 621

From the Best Practices documentation:

Spot VMs have no availability guarantees. Design your systems under the assumption that GKE might reclaim any or all your Spot VMs at any time, with no guarantee of when new instances become available.

While it's very unlikely that all your spot instances would be pre-empted at the same time, there are no guarantees that it won't happen.

Upvotes: 0

Related Questions