Tech Interview RoomStudy guides

GCP

Explain GKE: Autopilot vs Standard, node pools and Workload Identity.

Advanced · 2 min read · Lesson 4 of 6 in GCP

Autopilot vs Standard

  • Autopilot: Google manages nodes, scaling, security hardening and upgrades; you pay for pod requests; best practices are enforced (no privileged pods, resource requests required). Less to operate, fewer knobs.
  • Standard: you manage node pools (machine types, autoscaling, upgrades, surge settings) and pay for nodes. Needed for privileged workloads, custom kernels or node-level tuning, some GPU and special hardware scenarios, or tight bin-packing control.

Node pools (Standard)

Groups of nodes with the same configuration. Separate pools for general workloads, memory-heavy, GPU, or Spot VMs for fault-tolerant batch work; steer pods with node selectors, taints and tolerations. Enable cluster autoscaler or node auto-provisioning, regional clusters (control plane and nodes across three zones), and release channels for automatic upgrades with maintenance windows.

Workload Identity Federation for GKE

Pods should not use node service account credentials or exported JSON keys. With Workload Identity:

  1. Enable it on the cluster (GKE metadata server on nodes).
  2. Grant IAM roles either directly to the Kubernetes service account principal (principal://iam.googleapis.com/projects/NUMBER/locations/global/workloadIdentityPools/PROJECT.svc.id.goog/subject/ns/NAMESPACE/sa/KSA) or by letting the Kubernetes service account impersonate a Google service account (roles/iam.workloadIdentityUser plus the iam.gke.io/gcp-service-account annotation).
  3. Google client libraries automatically obtain short-lived tokens from the metadata server.

Result: per-workload least privilege, no keys to leak or rotate.

Follow-up questions interviewers ask

Try answering each one before you open it.

How do you upgrade a GKE cluster without downtime?

Use release channels with maintenance windows and exclusions; GKE upgrades the control plane first (regional clusters keep the API available), then nodes with surge upgrades (create new nodes before draining old ones) or blue-green node pool upgrades for safer rollback. Workloads must tolerate it: multiple replicas spread across zones, PodDisruptionBudgets, correct readiness probes and graceful shutdown, and no deprecated APIs (check with deprecation insights before upgrading).