Zone spread (DoNotSchedule): Hard requirement -- pods must be balanced
across zones
Node spread (ScheduleAnyway): Best-effort -- prefer distribution but
don't block scheduling
6. Replicas
Workload Type
Minimum Replicas
Reason
Stateless web/API
2
Survive single pod/node
: : : failure :
Critical services
3
Survive zone failure with zone
: : : spread :
Stateful (databases)
3 (with replication)
Application-level quorum
Batch/jobs
1
Ephemeral by nature
Best Practices & Production Guidelines
Regional clusters for production: Always use regional clusters to
survive zone failures.
PDBs for everything: Every production workload with 2+ replicas needs a
PodDisruptionBudget (PDB) to protect against voluntary disruptions.
Probes with Explicit Timeouts: Every production container must have both
liveness and readiness probes defined. Always explicitly define
initialDelaySeconds, periodSeconds, and timeoutSeconds for all
probes. Never rely on the Kubernetes default timeout of 1 second if your
application requires more, but always set a strict limit to prevent hanging
connections.
Zone spreading: Use topology spread constraints to distribute pods
across failure domains (zones and nodes).
Graceful shutdown: Handle SIGTERM and set appropriate
terminationGracePeriodSeconds with a preStop sleep hook to allow load
balancer deregistration.
Maintenance windows: Schedule upgrades during low-traffic periods (see
the gke-upgrades skill).