Gke Reliability

by google55b4e13eba6dNo licenseListed Oct 8, 2026Updated Oct 8, 2026

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for generating K8s YAML manifests (use gke-manifest-generation) or disaster recovery and cluster backups (use gke-backup-dr).

FeaturedInstructions onlyDevOps & Cloud
AI-generated overview

Guides GKE workload reliability using Pod Disruption Budgets, health probes, graceful shutdown, and topology spread constraints.

What it does
This reference skill explains how to configure high availability for GKE clusters and workloads. It covers verifying regional cluster availability, creating Pod Disruption Budgets, defining liveness, readiness, and startup probes, handling graceful shutdown, applying topology spread constraints, and choosing replica counts. It provides golden-path defaults, YAML examples, and MCP or kubectl commands for inspecting existing resources.
When to use it
Use it when configuring GKE workload reliability, setting up PDBs, or defining GKE health probes. It is not intended for generating Kubernetes YAML manifests or for disaster recovery and cluster backups.
Requirements
Requires access to a GKE cluster and either the listed MCP tools or gcloud and kubectl as fallbacks. No scripts are included; it is instructions only.

GKE Reliability

Routing Note: To generate Kubernetes YAML manifests (Deployment, StatefulSet, Service, ConfigMap, HTTPRoute, PodDisruptionBudget), open gke-manifest-generation/SKILL.md.

This reference covers high availability and reliability configuration for GKE clusters and workloads.

MCP Tools: get_cluster, get_k8s_resource, describe_k8s_resource, apply_k8s_manifest, list_k8s_events

Golden Path Reliability Defaults

SettingGolden Path ValueNotes
Cluster typeRegional (4 zones:Control plane replicated across
: : us-central1-a/b/c/f) : zones :
Upgrade strategySURGE (maxSurge: 1)Rolling upgrades with extra
: : : capacity :
Auto-repairtrueUnhealthy nodes replaced
: : : automatically :
Auto-upgradetrueNodes follow control plane
: : : version :
Release channelREGULARBalanced freshness and stability
Stateful HAEnabledLeader election for stateful
: : : workloads :

Workflows

1. Verify Cluster High Availability

# MCP (preferred)get_cluster(name="projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>",  readMask="location,locations,nodePools.locations")
# gcloud fallbackgcloud container clusters describe <CLUSTER> --region <REGION> \  --format="json(location, locations)" \  --quiet
  • If location is a region (e.g., us-central1), the control plane is regional
  • If locations has multiple entries, nodes span multiple zones

2. Pod Disruption Budgets (PDBs)

PDBs ensure minimum pod availability during voluntary disruptions (node upgrades, autoscaler scale-down).

Check existing PDBs:

# MCP (preferred)get_k8s_resource(parent="...", resourceType="poddisruptionbudget")
# kubectl fallbackkubectl get pdb --all-namespaces

Create PDB:

yaml
apiVersion: policy/v1kind: PodDisruptionBudgetmetadata:  name: my-app-pdb  namespace: defaultspec:  minAvailable: 2       # Or use maxUnavailable: 1  selector:    matchLabels:      app: my-app

Every production Deployment with 2+ replicas should have a PDB.

3. Health Probes

Every production container should have liveness and readiness probes. Startup probes are recommended for slow-starting apps.

Check existing probes:

# MCP (preferred)describe_k8s_resource(parent="...", resourceType="deployment", name="<APP>", namespace="<NS>")
# kubectl fallbackkubectl get deployment <APP> -n <NS> -o yaml | grep -E "livenessProbe|readinessProbe|startupProbe"

Recommended probe configuration:

yaml
spec:  containers:  - name: app    livenessProbe:      httpGet:        path: /healthz        port: 8080      initialDelaySeconds: 15      periodSeconds: 10      timeoutSeconds: 2      failureThreshold: 3    readinessProbe:      httpGet:        path: /readyz        port: 8080      initialDelaySeconds: 5      periodSeconds: 5      timeoutSeconds: 2      failureThreshold: 3    startupProbe:             # For slow-starting apps      httpGet:        path: /healthz        port: 8080      initialDelaySeconds: 10      periodSeconds: 5      timeoutSeconds: 2      failureThreshold: 30    # 30 * 5s = 150s max startup time
  • Readiness: Determines when a pod can accept traffic
  • Liveness: Determines when to restart a container
  • Startup: Disables liveness/readiness until the app is ready (prevents premature restarts)

4. Graceful Shutdown

Ensure applications handle SIGTERM and drain in-flight requests:

yaml
spec:  terminationGracePeriodSeconds: 30    # Default; increase for long-running requests  containers:  - name: app    lifecycle:      preStop:        exec:          command: ["/bin/sh", "-c", "sleep 5"]  # Allow LB to deregister

5. Topology Spread Constraints

Distribute pods across zones and nodes to survive failures:

yaml
spec:  topologySpreadConstraints:  - maxSkew: 1    topologyKey: topology.kubernetes.io/zone    whenUnsatisfiable: DoNotSchedule    labelSelector:      matchLabels:        app: my-app  - maxSkew: 1    topologyKey: kubernetes.io/hostname    whenUnsatisfiable: ScheduleAnyway    labelSelector:      matchLabels:        app: my-app
  • 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 TypeMinimum ReplicasReason
Stateless web/API2Survive single pod/node
: : : failure :
Critical services3Survive zone failure with zone
: : : spread :
Stateful (databases)3 (with replication)Application-level quorum
Batch/jobs1Ephemeral by nature

Best Practices & Production Guidelines

  1. Regional clusters for production: Always use regional clusters to survive zone failures.
  2. PDBs for everything: Every production workload with 2+ replicas needs a PodDisruptionBudget (PDB) to protect against voluntary disruptions.
  3. 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.
  4. Zone spreading: Use topology spread constraints to distribute pods across failure domains (zones and nodes).
  5. Graceful shutdown: Handle SIGTERM and set appropriate terminationGracePeriodSeconds with a preStop sleep hook to allow load balancer deregistration.
  6. Maintenance windows: Schedule upgrades during low-traffic periods (see the gke-upgrades skill).

Source and attribution

Source:google/skillsinskills/cloud/gke-reliabilityat commit55b4e13

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from google/skills

Dpop Adoption

google

Featured

Guides implementation of OAuth 2.0 DPoP (RFC 9449) sender-constrained refresh tokens for Google's OAuth platform.

SecurityOct 8, 2026

Finding Google Skills

google

Featured

Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.

Awaiting classificationOct 8, 2026

Spanner Basics

google

Featured

Guides Google Cloud Spanner administration, schema design, querying and performance diagnosis.

Data & AnalyticsOct 8, 2026

Secops Triage

google

Featured

Guides SOC analysts through triaging Google SecOps security alerts, from investigation to closure or escalation.

SecurityOct 8, 2026

Secops Investigate

google

Featured

Guides SOC analysts through deep security incident and entity investigations in Google SecOps using UDM queries and timelines.

SecurityOct 8, 2026

Secops Hunt

google

Featured

Guides proactive threat hunting in Google SecOps using UDM queries, IoC lookback, prevalence and outlier analysis.

SecurityOct 8, 2026