Google Cloud (GKE)
CostPilot supports Google Kubernetes Engine (GKE) clusters with pricing derived from a curated static price table that covers all major GCP machine families. Prices are anchored to the us-central1 region and adjusted for other regions using GCP’s published regional multipliers.
Supported machine families
GKE node pricing is determined by the machine type label on each node. CostPilot recognises the following machine families:
| Family | Optimised for | Examples |
|---|---|---|
| E2 | Cost efficiency | e2-micro, e2-small, e2-standard-4, e2-highcpu-8 |
| N1 | General purpose (legacy) | n1-standard-2, n1-highmem-4, n1-highcpu-16 |
| N2 | General purpose | n2-standard-4, n2-highmem-8, n2-highcpu-32 |
| N2D (AMD) | General purpose (AMD EPYC) | n2d-standard-4, n2d-highmem-8 |
| C2 | Compute optimised | c2-standard-4, c2-standard-8, c2-standard-30 |
| C2D (AMD) | Compute optimised (AMD) | c2d-standard-4, c2d-highcpu-8 |
| M2 | Memory optimised | m2-ultramem-208, m2-megamem-416 |
| M3 | Memory optimised | m3-ultramem-32, m3-megamem-64 |
| T2D | Scale-out (AMD) | t2d-standard-1, t2d-standard-4 |
| T2A (ARM/Ampere) | Scale-out (ARM) | t2a-standard-1, t2a-standard-4 |
Machine types with highcpu, highmem, and ultramem suffixes affect the CPU/memory split applied to that node — see the cost split section below.
How pricing is calculated
GCP pricing for most machine types is defined as a per-vCPU price and a per-GB memory price. CostPilot uses these component prices from a bundled static table and multiplies them by the vCPU count and memory size of each machine type to derive the total hourly cost.
For example, an n2-standard-4 node in us-central1:
- 4 vCPUs × per-vCPU price
- 16 GB memory × per-GB price
- Total = hourly node cost
Because GCP charges separately for CPU and memory, the cost split is more accurate than the 50/50 default used for providers with opaque blended pricing.
Regional multipliers
GCP publishes regional price multipliers relative to us-central1. CostPilot applies these multipliers automatically based on the region of each node:
| Region | Approximate multiplier |
|---|---|
us-central1 | 1.00× (base) |
us-east1, us-west1 | ~1.00× |
europe-west1, europe-west4 | ~1.08× |
europe-west2 (London) | ~1.20× |
asia-east1 | ~1.10× |
asia-northeast1 (Tokyo) | ~1.15× |
australia-southeast1 | ~1.20× |
Multipliers are bundled with CostPilot and updated with each release to reflect GCP pricing changes.
If your cluster uses a region not in CostPilot’s multiplier table, the us-central1 base price is used without adjustment. You can correct this by setting a custom per-node rate in Settings → Clusters → Cost configuration.
Preemptible and Spot VMs
GKE supports two types of discounted VMs:
- Preemptible VMs — the original discounted instance type, approximately 70% cheaper than standard on-demand pricing. Preemptible VMs can be reclaimed by GCP at any time and have a maximum lifetime of 24 hours.
- Spot VMs — the successor to preemptible VMs, with the same ~70% discount but without the 24-hour limit. GKE Standard and Autopilot both support Spot node pools.
CostPilot detects preemptible and spot nodes from the cloud.google.com/gke-preemptible=true or cloud.google.com/gke-spot=true node labels, which GKE sets automatically on all discounted nodes. When detected, the preemptible/spot price from the static table is used rather than the standard price.
The ~70% discount is a general figure. Actual discounts vary by machine family and region. CostPilot uses GCP’s published preemptible prices, not an estimated percentage of on-demand.
How GKE nodes are identified
CostPilot identifies GKE nodes by their instance type naming pattern. All GCP machine types follow a structured format:
<family>-<variant>-<vCPU count>
For example: n2-standard-4, e2-highcpu-16, c2-standard-30.
When the agent collects node metrics, it reads the beta.kubernetes.io/instance-type or node.kubernetes.io/instance-type label. CostPilot matches this against the GCP pattern and routes pricing to the GCP provider.
CPU and memory cost split
Because GCP publishes separate per-vCPU and per-GB-memory prices, CostPilot uses a more granular split than the generic 50/50 default:
| Machine variant | CPU fraction | Memory fraction |
|---|---|---|
standard | 50% | 50% |
highcpu | 65% | 35% |
highmem | 35% | 65% |
ultramem | 20% | 80% |
| E2 (shared) | 50% | 50% |
These ratios reflect the actual balance of CPU and memory pricing in each variant. You can override them per cluster in Settings → Clusters → Cost configuration.
Tips for reducing GKE costs
- Use E2 instances for non-critical workloads. E2 instances are GCP’s most cost-effective general-purpose family and run on the same infrastructure as N2 at a lower price.
- Enable Spot node pools for batch and stateless workloads. At ~70% cheaper, spot nodes are ideal for Jobs, background processors, and stateless services that tolerate interruption.
- Monitor idle costs by node pool. CostPilot’s node-level breakdown lets you compare idle cost across node pools, making it easy to identify over-provisioned pools that could use smaller machine types or fewer nodes.
- Committed Use Discounts (CUDs) are not yet reflected automatically in CostPilot. If you have active CUDs, set a custom per-node rate to reflect your effective hourly cost.