Google Kubernetes Engine (GKE): Clusters, Autopilot vs Standard, Workloads, Services, Autoscaling and Security

Google Cloud Platform Architect 65 min min read Updated: Nov 17, 2026 Intermediate
Google Kubernetes Engine (GKE): Clusters, Autopilot vs Standard, Workloads, Services, Autoscaling and Security
Intermediate Topic 3 of 4

Containers and Kubernetes in Brief

  • A container packages an app with its dependencies so it runs the same everywhere
  • Kubernetes (K8s) runs many containers across many machines: it schedules, scales, heals and updates them
  • Google created Kubernetes, and GKE is the managed version
K8s termMeaning
PodSmallest unit: one or more containers
DeploymentKeeps N copies of a pod running and handles updates
ServiceStable address that load-balances to pods
Ingress / GatewayHTTP(S) entry from the internet
ConfigMap / SecretSettings and sensitive values
NamespaceLogical separation inside a cluster
NodeA VM that runs pods. Nodes are grouped in node pools

Autopilot vs Standard

AutopilotStandard
Who manages nodesGoogle (fully managed)You (choose machine types, pools)
BillingPer pod resources requestedPer node VM
Security defaultsHardened by defaultYou configure
FlexibilitySome limits on privileged workloadsFull control (GPUs, custom kernels, special setups)
Best forMost teams, less operationsSpecial needs, tight cost tuning
Default advice Start with Autopilot unless you need node-level control.

Create a Cluster

bash gcloud services enable container.googleapis.com gcloud container clusters create-auto shop-cluster --region=asia-south1 gcloud container clusters get-credentials shop-cluster --region=asia-south1 kubectl get nodes
  • Regional clusters spread the control plane and nodes over three zones (high availability)
  • Private clusters give nodes only private IPs. Use authorized networks to restrict the API endpoint
  • Release channels (Rapid, Regular, Stable) control automatic upgrades

Deploy an App

yaml apiVersion: apps/v1 kind: Deployment metadata: {name: web} spec: replicas: 3 selector: {matchLabels: {app: web}} template: metadata: {labels: {app: web}} spec: containers: - name: web image: us-docker.pkg.dev/google-samples/containers/gke/hello-app:1.0 ports: [{containerPort: 8080}] resources: {requests: {cpu: 250m, memory: 256Mi}} readinessProbe: {httpGet: {path: /, port: 8080}} --- apiVersion: v1 kind: Service metadata: {name: web} spec: type: LoadBalancer selector: {app: web} ports: [{port: 80, targetPort: 8080}]
bash kubectl apply -f web.yaml kubectl get pods,svc kubectl set image deployment/web web=us-docker.pkg.dev/google-samples/containers/gke/hello-app:2.0 # rolling update kubectl rollout status deployment/web kubectl rollout undo deployment/web

Scaling

TypeWhat it scales
Horizontal Pod Autoscaler (HPA)Number of pods by CPU or custom metrics
Vertical Pod Autoscaler (VPA)Pod CPU and memory requests
Cluster autoscaler / node auto-provisioningNumber and type of nodes (Standard). Autopilot does this for you
bash kubectl autoscale deployment web --cpu-percent=60 --min=3 --max=20

Exposing Apps

  • Service type LoadBalancer: a Layer 4 load balancer
  • Ingress or Gateway API: Google Cloud Application Load Balancer with paths, hosts, TLS and Cloud Armor
  • Network Endpoint Groups send traffic straight to pods

Security

  • Workload Identity Federation for GKE: pods act as a Google service account without keys
  • Network policies control pod-to-pod traffic
  • Binary Authorization and Artifact Analysis for trusted images
  • Shielded GKE nodes, private nodes, minimal RBAC, Secret Manager integration

When to Choose GKE

PickWhen
GKEMany microservices, Kubernetes skills, portability, complex networking or stateful containers
Cloud RunSimple stateless containers with scale to zero and no cluster management
Compute EngineNeed full VM control

Practice

  1. Create an Autopilot cluster and deploy the sample app
  2. Scale it with HPA and watch pods increase
  3. Roll out a new version, then roll it back
  4. Expose the app through a LoadBalancer service
  5. Delete the cluster

Conclusion

GKE runs containers at scale. Autopilot is the easy default, Standard gives control. Use regional clusters, HPA, Workload Identity and release channels, and choose Cloud Run when you do not need Kubernetes.

Quick Summary: basics; Autopilot vs Standard; create; deploy; scaling; exposing; security; choosing.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators