
Skill
gke-ai-troubleshooting-handle-disruption-gpu-tpu
diagnose GPU and TPU workload disruptions
Description
Diagnose and predict node disruption during Compute Engine host maintenance for GPU and TPU workloads.
SKILL.md
Handle Disruption on GPUs and TPUs Troubleshooting
🔍 Diagnostic Workflow
Step 0: Context Acquisition & Execution Trigger
- Mandatory Context:
project_id,location,cluster_name,timestamp. - Optional Context:
node_name,workload_name,workload_namespace,nodepool_name. - CRITICAL EXECUTION DIRECTIVE (STRICTLY ENFORCED):
- IF ALL 4 MANDATORY PARAMETERS ARE PRESENT: DO NOT ask the user for confirmation, DO NOT echo parameters back asking for verification, and DO NOT output a text-only plan waiting for user input. YOU MUST IMMEDIATELY INVOKE DIAGNOSTIC TOOLS (
get_k8s_resource,query_prometheus,query_logs) IN YOUR VERY FIRST TURN. - IF ANY MANDATORY PARAMETER IS MISSING: Stop immediately and ask the user to provide ONLY the missing mandatory parameters.
- IF ALL 4 MANDATORY PARAMETERS ARE PRESENT: DO NOT ask the user for confirmation, DO NOT echo parameters back asking for verification, and DO NOT output a text-only plan waiting for user input. YOU MUST IMMEDIATELY INVOKE DIAGNOSTIC TOOLS (
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-time - Interpretation: 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
query_prometheustool to query Cloud Monitoring PromQL metrics for the cluster. Ifquery_prometheusis unavailable or fails due to missing permissions, provide the PromQL queries below to the user for manual verification in Google Cloud Console. - For Past Disruptions: When investigating past disruptions (e.g., historical timestamps or past
interruptions), immediately pass the
timestampparameter toquery_prometheusto checkkubernetes_io:node_interruption_count{monitored_resource="k8s_node", interruption_reason="HW/SW Maintenance"}around that specific time. If metric value > 0, conclude that Compute Engine host maintenance WAS confirmed as the cause of the past disruption. - Example PromQL Queries:
# 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 Status
- Action: Call
query_logsordescribe_k8s_resourceto filter GKE logs and check node status/taints for active ongoing node maintenance. - Active Ongoing Maintenance Detection:
- Look for
cloud.google.com/active-node-maintenanceset toONGOINGor thecloud.google.com/impending-node-termination:NoScheduletaint on the node. - Explicit Conclusion Required: If
active-node-maintenanceisONGOINGor theimpending-node-termination:NoScheduletaint is present, explicitly inform the user: "GKE is actively stopping workloads due to ongoing Compute Engine host maintenance." - Mandatory Taint Warning: Explicitly advise the user NOT to tolerate the
cloud.google.com/impending-node-termination:NoScheduletaint, as the node will be terminated by GKE regardless.
- Look for
Step 4: Conclusion and Resolution
- Action: Provide a summary of findings to the user and suggest appropriate mitigation strategies ONLY IF host maintenance events were confirmed or scheduled.
- Negative Finding Rule: If NO evidence of scheduled or past host maintenance is found, explicitly conclude that the disruption was NOT caused by Compute Engine host maintenance and report this negative finding. DO NOT recommend configuring graceful termination or opportunistic maintenance when no maintenance events are detected.
- 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.
- Resolutions to Suggest (Only when maintenance is confirmed or scheduled):
- Configure Graceful Termination: Recommend configuring graceful termination by setting
spec.terminationGracePeriodSeconds(up to 60 minutes) to allow ML workloads (e.g., Orbax checkpointing) to save state upon receivingSIGTERMbefore the node terminates. - Opportunistic Maintenance: Recommend configuring Opportunistic Maintenance to trigger host updates automatically when GPU/TPU nodes are idle.
- Capacity Buffer / Resiliency: Recommend configuring a
PodDisruptionBudget(PDB) specifyingminAvailablereplicas to maintain availability during disruptions.
- Configure Graceful Termination: Recommend configuring graceful termination by setting
More skills from the gke-mcp repository
View all 25 skillscustom-golden-image-discovery
discover golden base images for GKE nodes
Jul 12DeploymentGoogle CloudKubernetesgke-ai-troubleshooting-jobset-interruption
diagnose GKE JobSet interruptions
Jul 12DebuggingGoogle CloudKubernetesObservabilitygke-ai-troubleshooting-skill-creation-guide
create GKE troubleshooting skill bundles
Jul 12DocumentationEngineeringGoogle CloudTechnical Writinggke-ai-troubleshooting-tpu-connection-failure-vbar-oom
diagnose GKE TPU connection failures
Jul 12DebuggingGoogle CloudKubernetesPerformancegke-app-onboarding
containerize and deploy apps to GKE
Jul 12ContainersDeploymentGoogle CloudKubernetes +1gke-backup-dr
configure GKE backup and disaster recovery
Jul 12DeploymentGoogle CloudKubernetesOperations
More from Google Cloud
View publisherkb-search
search and extract local knowledge base documents
knowledge-catalog
Jul 12DocumentationKnowledge BaseSearchknowledge_catalog_discovery_agent
search and rank Knowledge Catalog data entries
knowledge-catalog
Jul 12Data AnalysisGoogle CloudKnowledge ManagementSearchfabric-builder
generate Terraform code for Google Cloud
cloud-foundation-fabric
Jul 12Google CloudInfrastructure as CodeTerraformfast-0-org-setup-prereqs
prepare prerequisites for FAST 0-org-setup
cloud-foundation-fabric
Jul 12Google CloudOperationsagent-aware-cli
design agent-aware command-line interfaces
vertex-ai-creative-studio
Jul 12CLIEngineeringGoogle Cloudbuild-mcp-genmedia
build and configure GenAI MCP servers
vertex-ai-creative-studio
Jul 12API DevelopmentGoogle CloudLLMMCP