gke/BP/2026_004

GKE nodepools that do not use Preemptible/Spot VMs

Product: Google Kubernetes Engine
Rule class: Best practice, opinionated recommendation

Description

Preemptible VMs and Spot VMs are compute instances that last up to 24 hours (for preemptible) or have no guaranteed runtime (for spot) and can be reclaimed by Google Cloud at any time with a short 30-second notice.

While they offer significant cost savings, they are not suitable for running critical, stateful, or long-running production workloads. If a cluster’s node pools are configured to use Preemptible or Spot VMs, ensure that only stateless, batch, or fault-tolerant workloads are deployed on those pools, and that non-preemptible pools are also available for system and stateful components.

Remediation

To check the node pools of a GKE cluster and see if they use Preemptible or Spot VMs, use the following gcloud command:

gcloud container node-pools list \
  --cluster=CLUSTER_NAME \
  --zone=ZONE_OR_REGION \
  --format="table(name, config.preemptible, config.spot)"

To configure new node pools or migrate critical workloads to standard (non-preemptible/non-spot) VMs:

  1. Create a new standard node pool:
    gcloud container node-pools create standard-pool \
      --cluster=CLUSTER_NAME \
      --zone=ZONE_OR_REGION \
      --num-nodes=3
    
  2. Schedule workloads onto the new node pool. Use node selectors or node affinity to ensure critical workloads run on standard VMs.
  3. If necessary, delete the preemptible/spot node pool:
    gcloud container node-pools delete preemptible-pool \
      --cluster=CLUSTER_NAME \
      --zone=ZONE_OR_REGION
    

Further information