Diagnoses, predicts, and mitigates node disruptions during Compute Engine host maintenance and hardware or software maintenance events for GPU and TPU workloads on GKE. Use when diagnosing node disruptions, predicting host maintenance events on GPU/TPU nodepools, inspecting node interruption PromQL metrics, auditing node taints, or configuring workload protection strategies (graceful termination, opportunistic maintenance, PodDisruptionBudgets). Don't use for general GKE cluster creation, network policy configuration, or non-disruption workload deployment.
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.
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-ai-troubleshooting-handle-disruption-gpu-tpu)"
and append agent-skills/1.0 (skill:gke-ai-troubleshooting-handle-disruption-gpu-tpu) to User-Agent headers.
project_id, location, cluster_name, timestamp) BEFORE
delivering theories or general diagnostic commands. Only skip context
acquisition if the user explicitly requests a generic reusable runbook or
provides a complete static telemetry/log dump for offline analysis.node_name, workload_name, workload_namespace,
nodepool_name.Action: Propose running kubectl to check if nodes have the scheduled
maintenance label indicating an upcoming disruption.
Example Command:
kubectl get nodes -l cloud.google.com/scheduled-maintenance-time -L cloud.google.com/scheduled-maintenance-time
Interpretation: The SCHEDULED-MAINTENANCE-TIME column shows the Unix
epoch time when the VM is scheduled for maintenance. If this label exists, a
disruption is guaranteed to occur.
Action: Call any available monitoring tool or provide PromQL for manual verification.
Mandatory Monitoring Rule: Whenever recommending follow-up monitoring or
interruption tracking over time, you MUST explicitly present a PromQL
query using the metric kubernetes_io:node_interruption_count filtered by
interruption_reason="HW/SW Maintenance". Do not suggest general Cloud
Monitoring dashboards or Metrics Explorer without providing this specific
PromQL metric expression.
Example Query:
# Fetch host maintenance events for nodes
sum by (interruption_type,interruption_reason)( sum_over_time( kubernetes_io:node_interruption_count{monitored_resource="k8s_node", interruption_reason="HW/SW Maintenance"}[${__interval}]))
# See the interruption count aggregated by node pool
sum by (node_pool_name,interruption_type,interruption_reason)( sum_over_time( kubernetes_io:node_pool_interruption_count{monitored_resource="k8s_node_pool", interruption_reason="HW/SW Maintenance", node_pool_name="{nodepool_name}" }[${__interval}]))
Interpretation: If kubernetes_io:node_interruption_count shows
values > 0 for interruption_reason="HW/SW Maintenance", it indicates the
underlying Compute Engine VM was interrupted due to scheduled host
maintenance.
query_logs or instruct the user to filter their GKE logs
for active host maintenance events, and check node taints.cloud.google.com/active-node-maintenance is set to ONGOING. To check if
GKE has cordoned the terminating node to prevent new workloads from being
scheduled, verify whether the
cloud.google.com/impending-node-termination:NoSchedule taint is present
(either in GKE event logs or directly via kubectl describe node).cloud.google.com/active-node-maintenance set to ONGOING means
workloads are actively being stopped by GKE due to host maintenance.cloud.google.com/impending-node-termination:NoSchedule taint means GKE
has cordoned the node to prevent new Pods from being scheduled on the
terminating node. DO NOT recommend tolerating this taint.spec.terminationGracePeriodSeconds (up to 60 minutes) to
handle the SIGTERM signal before node shutdown.PodDisruptionBudget to maintain minAvailable replicas during
evictions and disruptions.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-ai-troubleshooting-handle-disruption-gpu-tpu in Claude Code or $gke-ai-troubleshooting-handle-disruption-gpu-tpu in Codex.
The description says when to use it:
Use when diagnosing node disruptions, predicting host maintenance events on GPU/TPU nodepools, inspecting node interruption PromQL metrics, auditing node taints, or configuring workload protection strategies (graceful termination…
Copy the gke-ai-troubleshooting-handle-disruption-gpu-tpu 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-ai-troubleshooting-handle-disruption-gpu-tpu .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-ai-troubleshooting-handle-disruption-gpu-tpu 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-ai-troubleshooting-handle-disruption-gpu-tpu .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for gke-ai-troubleshooting-handle-disruption-gpu-tpu 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-ai-troubleshooting-handle-disruption-gpu-tpu ships 2 files, 8.8 KB in total. Select a file to load it from GitHub.