Skip to content

How-to Guides

GCP cloud pricing

How Kubeadapt prices GCP clusters. On-demand and Spot/Preemptible VMs work without setup; Committed Use Discount attribution is on the roadmap.

Last updated


On GKE there is no cloud-account connection to make. Kubeadapt reads GCP's public price catalog, recognizes Preemptible and Spot VMs from node labels, and prices nodes from the first snapshot.

What's not in place yet: Committed Use Discounts (CUDs) and Sustained Use Discounts aren't reflected in per-node pricing. The cluster shows list-price compute even if you've committed to a 1- or 3-year CUD on those instance families.


What works today

Pricing typeSetup requiredHow it worksStatus
On-demandNoneFetched from the GCP Cloud Billing Catalog API on a scheduleSupported
Preemptible & Spot VMsNoneReal-time spot prices per region, AZ, and machine typeSupported
Committed Use Discounts (CUDs)——Planned
Sustained Use Discounts (SUDs)——Planned

How it works

Kubeadapt fetches public pricing from the GCP Cloud Billing Catalog API on a regular schedule and caches it. No GCP service account, no JSON key, no IAM binding required — public pricing is read on Kubeadapt's side, not from your project.

Your cluster's node labels are what Kubeadapt needs from inside the cluster:

  • Machine type: from node.kubernetes.io/instance-type (e.g. e2-standard-4)
  • Region and zone: from topology.kubernetes.io/region and topology.kubernetes.io/zone
  • Capacity type: Spot vs. on-demand inferred from the GKE spot label or the equivalent Compute Engine flag

Standard GKE installs these labels automatically. For GKE Autopilot, they're set by the platform; for self-managed Kubernetes on GCE, ensure your kubelet or cluster autoscaler sets them.


When you'd want a cloud-account integration

You wouldn't, today. Unlike AWS where Reserved Instances and Savings Plans are already wired up through a Cost Explorer API connection, GCP CUD and SUD attribution requires reading the Cloud Billing export from BigQuery and reconciling commitment coverage against your nodes. That work is on the roadmap; track progress on the feedback portal.

In the meantime, if you have material CUDs in place, your real GCP bill will be lower than what Kubeadapt's Cost Explorer projects. Treat Kubeadapt numbers as on-demand-equivalent until CUD attribution ships.


Troubleshooting

Spot nodes show on-demand prices. Check the node labels:

bash
kubectl get nodes -L cloud.google.com/gke-spot \
  -L cloud.google.com/gke-preemptible

If both columns are empty on nodes you know are Spot/Preemptible, the GKE node pool wasn't created with the spot flag set, or the underlying GCE instances were created outside GKE. Recreate the node pool with --spot or label the nodes manually.

Some nodes show $0 cost. The machine type isn't matching anything in the public price catalog. Common causes:

  • Custom machine types (custom-2-4096) — pricing is computed from per-vCPU and per-GB rates rather than a flat machine-type lookup. If your cluster runs custom shapes and they show $0, contact support with the exact instance-type label value.
  • Brand-new machine families that haven't propagated to the catalog yet — wait for the next pricing refresh, then re-check.

Cluster shows region as "unknown". The topology.kubernetes.io/region label is missing. GKE sets this automatically; if it's missing, the cluster was likely set up before well-known labels became standard. Re-label nodes or upgrade the node pool.


Next steps