Plans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre/post-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like "we need to upgrade our clusters" or "plan our next GKE maintenance" or "our upgrade is stuck." Don't use for GKE cluster creation, application onboarding, general networking/routing setup, or security policy configurations (use gke-basics or relevant GKE skills instead).
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
Produce clear, actionable documents — upgrade plans, runbooks, or checklists — tailored to the user's environment. Output should be specific to their cluster mode, release channel, version, and workload types rather than generic advice.
Always frame guidance around the auto-upgrade model: auto-upgrade with maintenance windows and exclusions is the preferred control mechanism.
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-upgrades)"
and append agent-skills/1.0 (skill:gke-upgrades) to User-Agent headers.
Before producing any upgrade artifact, establish:
If the user provides these upfront, skip straight to the deliverable. If they're vague, fill in reasonable defaults and flag assumptions.
GKE versions follow Kubernetes version terminology: Major.Minor.Patch (e.g., 1.30.1-gke.1187000). A Minor version bump (e.g., 1.29 → 1.30) introduces new features and APIs. A Patch version bump (e.g., 1.30.1 → 1.30.2) introduces security and bug fixes. Ensure the user understands this distinction.
| Channel | Best for | SLA |
|---|---|---|
| Rapid | Dev/test, early feature access | No upgrade stability SLA |
| Regular (default) | Most production | Full SLA |
| Stable | Mission-critical, stability-first | Full SLA |
| Extended | Compliance, EoS enforcement control | Full SLA |
Standard GKE versions are supported for 14 months after they become available in the Regular channel. This means:
terminationGracePeriodSeconds for up to 24 hours; surge upgrades honor it for up to 60 minutes. During node drains, GKE respects PDBs for a maximum of 60 minutes, after which pods are force-deleted (a notification is sent).Configure maintenance windows to control auto-upgrade timing. GKE also supports node pool level maintenance exclusions (in addition to cluster level) to block upgrades for specific workloads.
Exclusion types & Limits:
no_upgrades): Blocks all upgrades (minor, patch, node).
no_minor_or_node_upgrades): Blocks minor and node upgrades, but allows control plane patch upgrades (low risk).
no_minor_upgrades): Blocks minor upgrades, but allows control plane patches and node upgrades.
Important Exclusion Rules (MUST follow when recommending exclusions and MUST include in the final text response):
--add-maintenance-exclusion-until-end-of-support for persistent exclusions.gcloud commands for exclusions, you MUST use the separate flag syntax: --add-maintenance-exclusion-name, --add-maintenance-exclusion-start, --add-maintenance-exclusion-end (or --add-maintenance-exclusion-until-end-of-support), and --add-maintenance-exclusion-scope (do NOT use a single comma-separated --add-maintenance-exclusion flag).GKE reserves the right to override user-defined maintenance windows and exclusions for mandatory operations. These overrides cannot be disabled or blocked.
Common Override Scenarios:
Guidance (MUST follow when overrides are discussed):
When asked to plan an upgrade, produce a structured document covering:
Compatibility Search Rule:
Recommend Surge upgrade as the default and most common strategy, with per-pool settings:
maxSurge (2-3) for speed, maxUnavailable=0 for safety.maxSurge=1, maxUnavailable=0 (conservative).maxSurge=0, maxUnavailable=1 (no surge capacity).maxSurge=20, maxUnavailable=0 (max parallelism).For mission-critical workloads requiring fast rollback or strict validation, recommend Standard Blue-Green upgrades. Acknowledge Autoscaled Blue-Green as an option for disruption-sensitive workloads, but note it is currently in preview and may have capacity requirements.
Upgrade Ordering (User-initiated only): When planning manual upgrades, specify the sequence of node pool upgrades. Recommend upgrading stateless pools first, verifying cluster stability, and then upgrading stateful/GPU pools. For auto-upgrades, GKE automatically manages sequential node pool upgrades.
For standard command sequences and runbook templates, see references/runbook-template.md.
When advising on GPU/TPU upgrades, you MUST cover all of the following:
maxSurge=0, maxUnavailable=1), which releases the reservation of the node being upgraded before provisioning its replacement. Explain that Blue-Green upgrades are not feasible here because they require double (2x) the GPU resources (both quota and reservations) during the transition.uname -r), and driver versions between old (working) and new (non-working) nodes, and deploy a test pod (e.g., vector addition) to verify GPU access. If production is blocked, rolling the node pool back to the previous version is the quickest mitigation.Produce checklists as copyable markdown with checkboxes. See references/checklists.md for the full pre-upgrade and post-upgrade checklist templates. Adapt them to the user's environment.
Stateful Workloads: When stateful workloads (databases) are present, always include checks for PV backup completion and verification of PV reclaim policies (e.g., Retain vs Delete) in the pre-upgrade checklist.
Autopilot Checklists: For Autopilot clusters, ensure the checklists include:
resources.requests on all containers (Autopilot requirement).kubectl commands for API deprecation checks, specifically: kubectl get --raw /metrics | grep apiserver_request_total | grep deprecated to check if any active workloads are using deprecated APIs.terminationGracePeriodSeconds to ensure pods have enough time to shut down gracefully during node recreation.Produce step-by-step runbooks with actual gcloud and kubectl commands. See references/runbook-template.md for the standard command sequences.
Any runbook that relaxes a safety control must restore it in the same runbook. This applies above all to PDBs during a node-pool migration or rollback: back the PDBs up before draining, and make re-applying them a numbered step with its own verification, not a closing remark. A runbook that patches maxUnavailable: 100% to unblock a drain and never reverts it leaves the cluster without disruption protection, and the gap is invisible until the next voluntary eviction. The same rule covers maintenance exclusions, cordons, and autoscaler minNodes overrides added to get through the procedure.
When diagnosing a "stuck" upgrade, consider if it was paused by a maintenance window:
gcloud container clusters update ... --maintenance-window-start ... --maintenance-window-duration ...). Do not suggest re-triggering the manual upgrade or bypassing the window.When a user reports a stuck or failing upgrade, you MUST systematically analyze and address ALL 5 potential causes in your final response. Do not omit checks even if you suspect one is the primary cause:
ALLOWED DISRUPTIONS = 0 using kubectl get pdb -A.Pending due to capacity limits.Stockout / Quota Exhaustion Rule:
ZONE_RESOURCE_POOL_EXHAUSTED (stockout) or QUOTA_EXCEEDED for Compute Engine resources:
maxSurge=0 (rolling in-place) to bypass quota limits.QUOTA_EXCEEDED, suggest requesting a quota increase from Google Cloud.Refer to references/troubleshooting.md for the exact diagnostic commands and fix procedures for each step.
Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /gke-upgrades in Claude Code or $gke-upgrades in Codex.
The description says when to use it:
Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE…
Copy the gke-upgrades folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/gke-upgrades .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if gke-upgrades does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/gke-upgrades .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for gke-upgrades and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
gke-upgrades ships 5 files, 43.5 KB in total. Select a file to load it from GitHub.