Gke AI Troubleshooting Handle Disruption Gpu Tpu
GoogleOfficialPublished by Google
- Skill
- Review and audit
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured diagnostic workflow to investigate, predict, and mitigate node disruptions on GKE clusters specifically for GPU and TPU workloads. It guides users through checking for scheduled maintenance, analyzing interruption metrics via PromQL, and inspecting node taints or logs. It also provides a mandatory strategy for workload protection, including graceful termination, opportunistic maintenance, and PodDisruptionBudgets.
What it does
- Identifies upcoming scheduled maintenance on GKE nodes using labels.
- Provides specific PromQL queries to track node interruption events.
- Inspects node taints and logs to confirm active maintenance events.
- Recommends a triad of protection strategies for GPU/TPU workloads.
- Rules out host maintenance as a cause if diagnostic checks return negative results.
When to use it
- When investigating unexpected node restarts or workload disruptions on GPU/TPU nodepools.
- When you need to predict or verify if a node is scheduled for host maintenance.
- When configuring GKE workloads to handle inevitable hardware or software maintenance events.
- When you need to audit node taints related to impending termination.
Advantages
- Standardizes the diagnostic process for complex GPU/TPU maintenance events.
- Ensures consistent use of required telemetry metrics for accurate troubleshooting.
- Promotes best practices for workload resilience through graceful termination and PDBs.
- Prevents misdiagnosis by providing clear criteria to rule out host maintenance.
Usage examples
- “Why did my GPU workload on GKE restart suddenly?”
- The agent will request cluster details and guide you through checking for scheduled maintenance labels and PromQL interruption metrics to determine if host maintenance was the cause.
- “How can I protect my TPU training job from GKE host maintenance?”
- The agent will recommend implementing the workload protection triad: configuring graceful termination, enabling opportunistic maintenance, and setting up PodDisruptionBudgets.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/gke-ai-troubleshooting-handle-disruption-gpu-tpu/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gke-ai-troubleshooting-handle-disruption-gpu-tpu.zip -d .agents/skills
Documentation by Google
Handle Disruption on GPUs and TPUs Troubleshooting
Attribution
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.
🔍 Diagnostic Workflow
Step 0: Context Acquisition
Mandatory: When a user asks to debug or investigate an actual workload disruption, node crash, or unexpected restart without providing complete cluster details, you MUST immediately halt and request all missing mandatory parameters (
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.Optional:
node_name,workload_name,workload_namespace,nodepool_name.
Step 1: [Low Risk] Check for Upcoming Scheduled Maintenance
Action: Propose running
kubectlto 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-timeInterpretation: The
SCHEDULED-MAINTENANCE-TIMEcolumn shows the Unix epoch time when the VM is scheduled for maintenance. If this label exists, a disruption is guaranteed to occur.
Step 2: [Low Risk] Investigation via Cloud Monitoring (PromQL)
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_countfiltered byinterruption_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_countshows values > 0 forinterruption_reason="HW/SW Maintenance", it indicates the underlying Compute Engine VM was interrupted due to scheduled host maintenance.
Step 3: [Low Risk] Investigation via Cloud Logging & Node Taints
Action: Call
query_logsor instruct the user to filter their GKE logs for active host maintenance events, and check node taints.Guidance: Look for occurrences in Cloud Logging where
cloud.google.com/active-node-maintenanceis set toONGOING. To check if GKE has cordoned the terminating node to prevent new workloads from being scheduled, verify whether thecloud.google.com/impending-node-termination:NoScheduletaint is present (either in GKE event logs or directly viakubectl describe node).Interpretation:
cloud.google.com/active-node-maintenanceset toONGOINGmeans workloads are actively being stopped by GKE due to host maintenance.cloud.google.com/impending-node-termination:NoScheduletaint means GKE has cordoned the node to prevent new Pods from being scheduled on the terminating node. DO NOT recommend tolerating this taint.
Step 4: Conclusion and Resolution
Action: Provide a summary of findings to the user and suggest appropriate mitigation strategies if host maintenance events were confirmed or scheduled.
Reporting Rule: Signal Only. Report high-signal information indicating that the disruption was caused by Compute Engine host maintenance, specifically affecting the underlying GPU/TPU nodes. DO NOT dump raw logs.
Negative Findings Rule-Out: If node scheduled-maintenance labels, PromQL interruption counts, and active maintenance logs all return negative/empty results, definitively conclude that Compute Engine host maintenance did NOT cause the disruption. Direct the user to investigate application-level causes (such as OOMKill events, CUDA runtime errors, or resource limits) and do not propose host maintenance mitigations as the primary resolution.
Mandatory Workload Protection Triad: Whenever host maintenance is identified or anticipated on GPU/TPU nodes, consistently recommend all three complementary mitigations together:
Configure Graceful Termination: For workloads that need time to save state (e.g., ML frameworks checkpointing via Orbax), follow the guide to Enable disruption handling and set
spec.terminationGracePeriodSeconds(up to 60 minutes) to handle theSIGTERMsignal before node shutdown.Enable Opportunistic Maintenance: To automatically trigger maintenance when GKE detects that GPU/TPU nodes are idle, configure Opportunistic Maintenance.
Configure PodDisruptionBudgets (PDBs): Ensure your workload uses a
PodDisruptionBudgetto maintainminAvailablereplicas during evictions and disruptions.
Files
- ATTRIBUTION.mdAdded by AutoGineer914 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md6.9 KiB
- references/attribution.md1.9 KiB
SKILL.md
Handle Disruption on GPUs and TPUs Troubleshooting
Attribution
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.
🔍 Diagnostic Workflow
Step 0: Context Acquisition
Mandatory: When a user asks to debug or investigate an actual workload disruption, node crash, or unexpected restart without providing complete cluster details, you MUST immediately halt and request all missing mandatory parameters (
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.Optional:
node_name,workload_name,workload_namespace,nodepool_name.
Step 1: [Low Risk] Check for Upcoming Scheduled Maintenance
Action: Propose running
kubectlto 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-timeInterpretation: The
SCHEDULED-MAINTENANCE-TIMEcolumn shows the Unix epoch time when the VM is scheduled for maintenance. If this label exists, a disruption is guaranteed to occur.
Step 2: [Low Risk] Investigation via Cloud Monitoring (PromQL)
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_countfiltered byinterruption_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_countshows values > 0 forinterruption_reason="HW/SW Maintenance", it indicates the underlying Compute Engine VM was interrupted due to scheduled host maintenance.
Step 3: [Low Risk] Investigation via Cloud Logging & Node Taints
Action: Call
query_logsor instruct the user to filter their GKE logs for active host maintenance events, and check node taints.Guidance: Look for occurrences in Cloud Logging where
cloud.google.com/active-node-maintenanceis set toONGOING. To check if GKE has cordoned the terminating node to prevent new workloads from being scheduled, verify whether thecloud.google.com/impending-node-termination:NoScheduletaint is present (either in GKE event logs or directly viakubectl describe node).Interpretation:
cloud.google.com/active-node-maintenanceset toONGOINGmeans workloads are actively being stopped by GKE due to host maintenance.cloud.google.com/impending-node-termination:NoScheduletaint means GKE has cordoned the node to prevent new Pods from being scheduled on the terminating node. DO NOT recommend tolerating this taint.
Step 4: Conclusion and Resolution
Action: Provide a summary of findings to the user and suggest appropriate mitigation strategies if host maintenance events were confirmed or scheduled.
Reporting Rule: Signal Only. Report high-signal information indicating that the disruption was caused by Compute Engine host maintenance, specifically affecting the underlying GPU/TPU nodes. DO NOT dump raw logs.
Negative Findings Rule-Out: If node scheduled-maintenance labels, PromQL interruption counts, and active maintenance logs all return negative/empty results, definitively conclude that Compute Engine host maintenance did NOT cause the disruption. Direct the user to investigate application-level causes (such as OOMKill events, CUDA runtime errors, or resource limits) and do not propose host maintenance mitigations as the primary resolution.
Mandatory Workload Protection Triad: Whenever host maintenance is identified or anticipated on GPU/TPU nodes, consistently recommend all three complementary mitigations together:
Configure Graceful Termination: For workloads that need time to save state (e.g., ML frameworks checkpointing via Orbax), follow the guide to Enable disruption handling and set
spec.terminationGracePeriodSeconds(up to 60 minutes) to handle theSIGTERMsignal before node shutdown.Enable Opportunistic Maintenance: To automatically trigger maintenance when GKE detects that GPU/TPU nodes are idle, configure Opportunistic Maintenance.
Configure PodDisruptionBudgets (PDBs): Ensure your workload uses a
PodDisruptionBudgetto maintainminAvailablereplicas during evictions and disruptions.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/gke-ai-troubleshooting-handle-disruption-gpu-tpu · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-ai-troubleshooting-handle-disruption-gpu-tpu.zip