Google Cloud Tutorial · Compute · Lesson 14 of 27
Google Kubernetes Engine (GKE)
Managed Kubernetes on Google Cloud: Autopilot and Standard modes, release channels, Workload Identity and when to choose GKE.
Autopilot and Standard
| Autopilot | Standard | |
|---|---|---|
| Nodes | managed by Google | your node pools |
| You pay for | Pods' resource requests | nodes (VMs) |
| Security defaults | hardened, Workload Identity on | you configure |
| Good for | most workloads | special hardware, privileged agents, custom node setups |
Both run the same Kubernetes API, so manifests, Helm charts and GitOps tools work on either.
gcloud container clusters create-auto shop --region europe-west1 --release-channel regular
gcloud container clusters get-credentials shop --region europe-west1
kubectl get nodes
Running well on GKE
- Release channels (Rapid, Regular, Stable, Extended) upgrade clusters automatically; set maintenance windows.
- Workload Identity Federation for GKE gives each Kubernetes ServiceAccount its own Google identity.
- Regional clusters spread the control plane and nodes across zones.
- Gateway API / Ingress create Google Cloud load balancers for your Services.
See the Kubernetes tutorial for Kubernetes itself.
pods = [("web", 0.5, 1.0, 6), ("worker", 1.0, 2.0, 3), ("cache", 0.25, 1.0, 2)] # name, vCPU, GiB, replicas
vcpu = sum(c * n for _, c, _, n in pods)
mem = sum(m * n for _, _, m, n in pods)
print(f"Pod requests: {vcpu:.2f} vCPU, {mem:.1f} GiB")
autopilot = vcpu * 0.045 + mem * 0.005 # illustrative $/hour per vCPU and per GiB
node_vcpu, node_mem, node_rate = 4, 16, 0.19 # an illustrative 4 vCPU node
nodes = max(-(-vcpu // (node_vcpu * 0.8)), -(-mem // (node_mem * 0.8))) # keep ~20% headroom
print(f"{'Autopilot (pay for requests):':32} ${autopilot * 730:5.0f}/month")
print(f"{f'Standard ({int(nodes)} nodes):':32} ${nodes * node_rate * 730:5.0f}/month")
Output
Pod requests: 6.50 vCPU, 14.0 GiB Autopilot (pay for requests): $ 265/month Standard (3 nodes): $ 416/month
Test yourself
In GKE Autopilot, what do you pay for?
The nodes you provisionThe CPU, memory and storage your Pods requestA fixed price per cluster onlyNothing; it's free
Show answer
Answer: The CPU, memory and storage your Pods request
Autopilot bills by Pod resource requests; Google manages the nodes.