Google Kubernetes Engine (GKE)
How Google Kubernetes Engine works: Autopilot and Standard modes, compute classes, networking, Workload Identity, release channels and what you pay for.
Kubernetes started at Google, as an open-source descendant of the internal system Google used to run its own services, and Google Kubernetes Engine (GKE) was the first managed Kubernetes service from a major cloud. That history shows. GKE automates more of the cluster than most alternatives: it can provision nodes for you, bill you per pod instead of per machine, and upgrade the whole cluster on a schedule you control.
This article explains how GKE is put together, the two ways to run it, how networking and identity work, how upgrades are handled, and what it costs. It follows AWS Elastic Container Service (ECS) and EKS, so where a concept maps to something on AWS, the comparison is pointed out. If containers themselves are new to you, start with Introduction to Containers and Docker.
What GKE manages for you
Every GKE cluster has two halves. The control plane runs the Kubernetes API server, etcd, the scheduler and the controllers. Google runs it in its own project, patches it and scales it; you never see the machines. The nodes are Compute Engine VMs that run your pods, together with the kubelet, the container runtime (containerd) and a set of system agents.
flowchart LR
DEV["kubectl or CI"] -->|"Kubernetes API"| CP["GKE control plane"]
AR["Artifact Registry"] --> NODES
CP --> NODES["Nodes: Compute Engine VMs"]
NODES --> PODS["Pods with VPC IPs"]
LB["Cloud Load Balancing"] --> PODS
PODS --> APIS["Google Cloud APIs"]
WI["Workload Identity"] -.-> APIS
A cluster is either zonal or regional. A zonal cluster has one control plane replica in one zone, so a zone outage or a control plane upgrade makes the API briefly unavailable, although running pods keep serving. A regional cluster replicates the control plane across three zones in a region and, by default, spreads nodes across those zones too. The SLA reflects this: Google commits to 99.95% availability for regional control planes and 99.5% for zonal ones. If regions and zones are unfamiliar, GCP Global Infrastructure: Regions and Zones covers them.
For production, use regional clusters. Zonal clusters are fine for development and for the free tier, which is described in the pricing section below.
Autopilot and Standard
The first decision with GKE is the mode of operation. It determines who manages the nodes and how you are billed.
Autopilot is the default and the mode Google recommends. You deploy workloads and GKE provisions, sizes, patches and removes nodes to fit them. You can’t SSH to the nodes and you don’t create node pools. Autopilot clusters are always regional, and several security features are switched on and can’t be turned off: Workload Identity Federation, Shielded GKE Nodes and GKE Dataplane V2 among them. Privileged containers are blocked by default, apart from verified partner tools (monitoring and security agents) and allowlists your organization creates.
Standard gives you the nodes. You create node pools, groups of VMs that share a machine type, disk, image and labels, and you decide how they scale and when they upgrade. You can SSH to nodes, run privileged DaemonSets, pick any Compute Engine machine type and tune kernel settings. In exchange, keeping those nodes efficiently used is your problem.
The line between the two has blurred. Standard clusters can now run individual workloads in Autopilot mode by selecting an Autopilot-enabled compute class, so you can keep a hand-tuned node pool for one demanding service and let Google manage capacity for everything else in the same cluster.
| Autopilot | Standard | |
|---|---|---|
| Who manages nodes | You, through node pools | |
| Cluster location | Regional only | Zonal or regional |
| Billing for general workloads | Pod resource requests, per second | Compute Engine VMs, per second |
| SSH to nodes, privileged pods | No, except allowlisted workloads | Yes |
| Security defaults | Hardened and enforced | You choose |
| Node scaling | Automatic | Cluster autoscaler and node auto-provisioning, which you configure |
| Best for | Most stateless and stateful apps | Custom hosts, special drivers, very dense packing |
In AWS terms, Autopilot sits close to EKS Auto Mode, and Standard node pools resemble EKS managed node groups.
Compute classes
A compute class is a Kubernetes custom resource that describes the kind of machine a pod should land on. Pods select one with a node selector on cloud.google.com/compute-class.
GKE ships several built-in classes. On Autopilot, pods that don’t ask for anything run on the container-optimized compute platform, a general-purpose pool of capacity that GKE resizes as pods change. The autopilot and autopilot-spot classes select that platform explicitly, Balanced and Scale-Out choose different general-purpose machine profiles, and pods can also request a specific machine series or GPUs and TPUs.
You can also write your own compute class with an ordered list of fallbacks. This one prefers Spot capacity, then falls back to on-demand N4 machines:
apiVersion: cloud.google.com/v1
kind: ComputeClass
metadata:
name: cost-first
spec:
priorities:
- machineFamily: n4
spot: true
- machineFamily: n4
spot: false
nodePoolAutoCreation:
enabled: true
whenUnsatisfiable: ScaleUpAnyway
A pod opts in with nodeSelector: {cloud.google.com/compute-class: cost-first}. The fallback list is what makes Spot practical: when Spot capacity runs out, new pods still get scheduled on regular machines instead of waiting. Pricing Models: On-Demand, Reserved, Savings Plans, and Spot explains when preemptible capacity is a sensible trade.
A team needs to run a DaemonSet that loads a custom kernel module on every node. Which GKE setup fits?
Correct! Standard node pools let you run privileged workloads and change the host. Autopilot blocks privileged containers unless they are allowlisted.
Creating a cluster and deploying an app
The gcloud CLI creates either mode with one command. An Autopilot cluster:
gcloud container clusters create-auto demo \
--location=us-central1 \
--release-channel=regular
gcloud container clusters get-credentials demo --location=us-central1
kubectl get nodes
A Standard regional cluster with one node per zone and Workload Identity enabled:
gcloud container clusters create demo-std \
--location=us-central1 \
--release-channel=regular \
--machine-type=e2-standard-4 \
--num-nodes=1 \
--enable-autoscaling --min-nodes=1 --max-nodes=5 \
--workload-pool=my-project.svc.id.goog
Because the cluster is regional, --num-nodes=1 means one node in each of the region’s three default zones, so three nodes in total. The autoscaling limits also apply per zone. That surprises people the first time they see the bill.
Deploying uses ordinary Kubernetes manifests. This is the Flask image pushed to Artifact Registry in the Docker article, running three replicas:
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 3
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
serviceAccountName: web
containers:
- name: web
image: us-central1-docker.pkg.dev/my-project/apps/hello-web:1.0
ports:
- containerPort: 8080
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
memory: 512Mi
readinessProbe:
httpGet:
path: /healthz
port: 8080
On Autopilot, the resource requests are not only a scheduling hint, they are the bill. If you leave them out, Autopilot applies default values, and if they fall below its minimums or outside its allowed CPU-to-memory ratios, it raises them. Set them deliberately, then check actual usage after a few days and adjust.
Networking
GKE clusters are VPC-native by default. Each node gets an IP address from the subnet’s primary range, and pods get addresses from a secondary range on the same subnet (alias IP ranges). Pods are reachable directly from anything in the VPC, firewall rules can refer to them, and there are no overlay networks to debug. As with EKS, a busy cluster can exhaust its pod range, so plan secondary ranges with room to grow; GKE can add more ranges to an existing cluster if you run short.
Newer clusters use GKE Dataplane V2, which is built on eBPF and Cilium. It enforces Kubernetes NetworkPolicy, which Kubernetes itself only defines and leaves to the network plugin, and it can log allowed and denied connections. It is always on for Autopilot and selectable at creation time for Standard.
Getting traffic in
There are three common ways to expose a workload:
- A Service of
type: LoadBalancercreates a passthrough Network Load Balancer for TCP and UDP traffic. - An Ingress, handled by the GKE Ingress controller, creates an external or internal Application Load Balancer.
- The Gateway API is the newer, role-oriented replacement for Ingress. GKE’s Gateway controller turns Gateway and HTTPRoute objects into Cloud Load Balancing resources.
All of them use container-native load balancing. The load balancer sends traffic straight to pod IP addresses through network endpoint groups (NEGs), instead of to a node port and then through iptables to a pod on some other node. Health checks reach the pods directly, and there is one less network hop.
flowchart LR
USER["Users"] --> ALB["Application Load Balancer"]
ALB --> NEG["Network endpoint group"]
NEG --> P1["Pod in zone a"]
NEG --> P2["Pod in zone b"]
NEG --> P3["Pod in zone c"]
GW["Gateway and HTTPRoute"] -.->|"GKE configures"| ALB
A Gateway that creates a global external Application Load Balancer, with a route to the web Service:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: external-http
spec:
gatewayClassName: gke-l7-global-external-managed
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: web
spec:
parentRefs:
- name: external-http
rules:
- backendRefs:
- name: web
port: 80
The web Service here is a plain ClusterIP Service mapping port 80 to the container’s port 8080. On a Standard cluster, the Gateway API has to be enabled first with gcloud container clusters update demo-std --location=us-central1 --gateway-api=standard. In production you would add an HTTPS listener with a Google-managed certificate.
Identity and access
As on EKS, there are two separate questions: who can use the cluster, and what the pods can do in Google Cloud.
Access to the cluster combines IAM and Kubernetes RBAC. IAM roles such as roles/container.developer or roles/container.viewer grant broad access across every cluster in a project. For finer control, grant a minimal IAM role so the person can reach the cluster at all, then use Kubernetes Roles and RoleBindings to limit them to particular namespaces. GCP Identity and Access Management (IAM) covers the IAM half.
Access from pods uses Workload Identity Federation for GKE. Without it, pods could fall back to the node’s service account, which means every pod on the node shares one identity, usually with more permissions than any single app needs. With it, each Kubernetes service account becomes an IAM principal of its own, and the node’s metadata server hands each pod short-lived credentials for that identity only. No service account keys exist anywhere.
You can grant IAM roles directly to the Kubernetes service account using its principal identifier. This gives the web service account in the default namespace read access to one Cloud Storage bucket:
PROJECT_NUMBER=$(gcloud projects describe my-project --format="value(projectNumber)")
kubectl create serviceaccount web
gcloud storage buckets add-iam-policy-binding gs://my-app-assets \
--role=roles/storage.objectViewer \
--member="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/my-project.svc.id.goog/subject/ns/default/sa/web"
The Google Cloud client libraries inside the container pick up these credentials automatically. A few Google Cloud services don’t yet accept these principals; for those, you can still have the Kubernetes service account impersonate a regular IAM service account, which was the original Workload Identity setup.
One detail to keep in mind: the identity pool is shared by every cluster in the project. Two clusters with a web service account in a default namespace get the same permissions, which is usually what you want for the same app in two regions and rarely what you want for a test cluster sitting next to production. Separate projects keep those apart.
A pod on GKE needs to read objects from a Cloud Storage bucket. What is the recommended way to give it access?
Correct! Workload Identity Federation gives each Kubernetes service account its own short-lived credentials, with no keys to leak and no permissions shared across every pod on the node.
Scaling
GKE scales at two levels, and they work together.
At the pod level, the Horizontal Pod Autoscaler adds and removes replicas based on CPU, memory or custom metrics, and the Vertical Pod Autoscaler recommends or applies better resource requests. On Autopilot, where requests are the bill, VPA recommendations are a direct way to cut cost.
At the node level, Autopilot handles everything. On Standard, the cluster autoscaler adds nodes to a node pool when pods can’t be scheduled and removes underused nodes, within the limits you set. Node auto-provisioning goes one step further and creates new node pools with suitable machine types for pending pods, which is close to what Karpenter does on EKS. Custom compute classes with nodePoolAutoCreation use the same mechanism.
A Horizontal Pod Autoscaler for the web Deployment:
kubectl autoscale deployment web --cpu-percent=60 --min=3 --max=20
The same ideas apply as for VM fleets in Auto Scaling VMs on AWS, GCP, and Azure, except that the unit you scale is the pod, and nodes follow.
Upgrades and release channels
Kubernetes releases a new minor version roughly three times a year, and every cluster has to keep up. GKE turns this into a policy rather than a project through release channels:
- Rapid gets new versions first and suits test clusters that should see changes early.
- Regular is the default and the recommended channel for most clusters.
- Stable receives versions after they have been proven on the other channels.
- Extended lets a cluster stay on a minor version for up to 24 months, but costs an extra cluster management fee during the extended support period.
Each minor version gets about 14 months of standard support, counted from its release on the Regular channel, followed by extended support up to 24 months in total with security fixes only. Clusters in Rapid, Regular and Stable are upgraded to the next minor version automatically when standard support ends; Extended clusters only receive patch upgrades until extended support ends.
flowchart LR
R1["Rapid channel"] --> R2["Regular channel"]
R2 --> R3["Stable channel"]
R3 --> CL["Your cluster"]
MW["Maintenance window"] -.-> CL
EX["Maintenance exclusions"] -.-> CL
GKE upgrades the control plane first, then the nodes. You decide when this may happen with a maintenance window, for example weekends between 02:00 and 06:00, and you can block upgrades during critical periods with maintenance exclusions. On Standard node pools you also choose how nodes are replaced: surge upgrades add extra nodes and drain old ones a few at a time, while blue-green upgrades build a complete new set of nodes and keep the old set until you are satisfied.
Upgrades still need care on your side. Read the release notes for removed Kubernetes APIs before a minor upgrade, and give important Deployments a PodDisruptionBudget so draining never takes down every replica at once. GKE also surfaces deprecated API usage it detects in your cluster, and can pause automatic minor upgrades when it does.
What you pay for
GKE charges a cluster management fee of $0.10 per cluster per hour, billed per second, whatever the mode, size or location of the cluster. The free tier gives each billing account $74.40 of credit per month, which covers the fee for one zonal Standard or Autopilot cluster running all month. It doesn’t apply to regional Standard clusters and doesn’t cover compute.
On top of the fee, you pay for what runs:
| Charge | Autopilot (general-purpose pods) | Standard |
|---|---|---|
| Cluster fee | $0.10 per cluster hour | $0.10 per cluster hour |
| Compute | vCPU, memory and ephemeral storage requested by running pods, per second | Node VMs at Compute Engine prices, per second with a one-minute minimum |
| Unused node capacity | Not billed | Billed, since you pay for whole VMs |
| System pods and OS overhead | Not billed | Consumes capacity you pay for |
| Discounts | Spot pricing, committed use discounts | Spot VMs, committed use discounts |
In us-central1, the GKE pricing page currently lists Autopilot general-purpose pods at $0.0445 per vCPU hour and $0.0049225 per GiB of memory per hour. The web Deployment above requests 0.75 vCPU and 1.5 GiB in total across three replicas, which works out to about $0.041 an hour, or roughly $30 a month, before load balancing, network and logging charges. Pods that select specific hardware, such as a GPU or a particular machine series, are billed differently: Compute Engine prices for the node plus an Autopilot management premium.
Which mode is cheaper depends on how full your nodes would be. Autopilot’s per-unit price is higher than the raw VM price, but you pay nothing for idle capacity. A Standard cluster that is carefully packed and mostly on committed or Spot capacity can be cheaper; a Standard cluster with half-empty nodes usually isn’t. Check the GKE pricing page for current rates in your region, and see GCP Free Tier and Billing Overview for budgets and alerts.
Since September 2025, features that used to require the separate GKE Enterprise edition, such as fleets, teams, Config Sync and Policy Controller, are included with GKE at no extra cost. They matter once you run several clusters and want to manage configuration and policy across all of them.
When to choose GKE
GKE is the natural choice on Google Cloud when you want Kubernetes itself: Helm charts, operators, custom controllers, portable manifests, or a platform team serving many services. Start with Autopilot. Move a workload to a Standard node pool only when it needs something Autopilot won’t allow, such as privileged access or a custom node image.
If you don’t need Kubernetes at all, Google Cloud also runs containers on Cloud Run, which scales each service from zero and needs no cluster. Many teams run simple HTTP services on Cloud Run and keep GKE for workloads that benefit from the Kubernetes ecosystem. Because both run the same container image, moving between them is a matter of deployment configuration, not code.
Further reading
- GKE documentation
- GKE pricing
- About Workload Identity Federation for GKE
- For the machine families GKE nodes run on, see Exploring GCP Compute Engine Instances.
Key takeaways
- GKE runs the Kubernetes control plane for you; use regional clusters for production, since zonal control planes have a single replica.
- Autopilot manages nodes, enforces hardened security defaults and bills by pod resource requests. Standard gives you node pools and full control, billed as Compute Engine VMs.
- Compute classes describe where pods should run, including Spot-first fallbacks, and let Standard clusters run selected workloads in Autopilot mode.
- Clusters are VPC-native, and container-native load balancing sends traffic from Cloud Load Balancing straight to pod IPs; the Gateway API is the modern way to configure it.
- Use Workload Identity Federation for GKE so each Kubernetes service account gets its own short-lived Google Cloud identity, with no keys.
- Release channels, maintenance windows and exclusions turn Kubernetes upgrades into a schedule; standard support lasts about 14 months per minor version.
- Every cluster costs $0.10 an hour, with $74.40 of monthly free tier credit per billing account; on Autopilot, accurate resource requests are the main cost lever.
Part 3 of 3 · Container Services