| name | gke-ai-troubleshooting-jobset-interruption |
| description | Systematically diagnose GKE JobSet interruptions, restarts, and preemptions for AI/ML training workloads. Identifies preemption events, maintenance interruptions, bad host VMs, unhealthy pods, and coordinator worker failures.
|
GKE JobSet Interruption Troubleshooting
Use this skill to systematically diagnose and resolve JobSet interruptions, restarts, and preemptions on GKE clusters hosting large-scale AI/ML workloads.
⚠️ Prerequisites
🔍 Diagnostic Workflow
Step 0: Context Acquisition & Time Window Definition
To begin troubleshooting, acquire the following context from the user:
- Project ID (e.g.,
customer-ai-project-123)
- Cluster Name (e.g.,
tpu-cluster-prod)
- Workload Name (JobSet Name) (e.g.,
llama3-70b-training)
- Workload Namespace (e.g.,
default)
- Issue Time (e.g.,
2026-05-20T08:15:00Z)
Time Handling Rules
- Reject Relative Time: If the user says "X minutes ago" or "just now", stop and request the exact timestamp or specific time window.
- Window Calculation: If the user provides a single timestamp
T, calculate the query window as [T - 30m] to [T + 30m].
- Let
Start_Time = T - 30m
- Let
End_Time = T + 30m
Step 1: Identify JobSet Restarts and Attempts [Low Risk]
Verify if the JobSet is experiencing restart loops and determine the frequency of restarts.
Option A: Visual Chart (MQL) - restarts
Option B: PromQL Query - restarts
Step 2: Inspect Nodepool Interruptions [Low Risk]
Determine if the JobSet restarts were triggered by physical nodepool-level events (such as spot preemptions, maintenance, or host terminations).
A. Metrics Query (Nodepool Interruption Counts)
Option A: Visual Chart (MQL) - interruptions
- Tool to use:
monitoring_time_series_chart
- MQL Query:
fetch k8s_node_pool
| metric 'kubernetes.io/node_pool/interruption_count'
| filter cluster_name == '<cluster_name>'
| align next_older(10m)
| every 10m
| group_by [metric.interruption_type, metric.interruption_reason, metadata.system.node_pool_name], [val: sum(value)]
Option B: PromQL Query - interruptions
B. Log Query (Nodepool Life Events)
Step 3: Inspect Nodes and Underlying Host VMs [Low Risk]
Correlate node readiness failures with physical host VMs to see if a single faulty host repeatedly fails coordinator pods.
A. Metrics Query (Node Ready Status Check)
Option A: Visual Chart (MQL) - node status
- Tool to use:
monitoring_time_series_chart
- MQL Query:
fetch k8s_node
| metric 'kubernetes.io/node/status_condition'
| filter cluster_name == '<cluster_name>' && metric.condition == 'Ready' && metric.status == 'False'
| align next_older(1m)
| every 1m
| group_by [node_name, metadata.user.gke_nodepool], [val: max(value)]
Option B: PromQL Query - node status
B. Metrics Query (Node-to-Host Metadata Topology Correlation)
- Tool to use:
monitoring_time_series_chart
- MQL Query:
fetch k8s_node
| metric 'kubernetes.io/node/cpu/total_cores'
| filter cluster_name == '<cluster_name>'
| align next_older(1m)
| every 1m
| group_by [node_name, metadata.user.gce_topology_host, metadata.user.gke_nodepool], [val: max(value)]
C. Log Query (Node Fault Logs)
Step 4: Inspect Pod and Worker / Container Failures [Low Risk]
Analyze pod status phases and retrieve coordinator worker logs to identify application-level crashes or network deadlocks.
A. Metrics Query (Pod Lifecycle Phases)
Option A: Visual Chart (MQL) - pod phase
Option B: PromQL Query - pod phase
B. Metrics Query (Unschedulable Pod Count)
C. Log Query (Worker Container Logs)
🛠️ Resolution Workflow
Resolution 1: Preemption & Autoscaling Optimizations [Low Risk]
If Step 2 showed high preemption counts on Spot VMs:
- Action: Suggest switching critical long-running training workloads to GKE Reserved/On-Demand VMs or utilizing Compact Placement Policies to minimize defragmentation interruptions.
- Justification: Eliminates spot-market preemptions and reduces training restarts.
Resolution 2: Quarantine Faulty Host VMs [High Risk]
If Step 3 identified a specific host ID (gce-topology-host) that consistently fails or triggers restarts across multiple attempts:
- Action: Draft a recommendation to cordon/drain the GKE node, delete the underlying GCE VM instance to trigger instance recreation, and open a support ticket with Google Cloud Support specifying the physical host ID.
- Justification: GKE auto-repair will recreate the VM instance on healthy physical hardware, preventing infinite restart loops.
- Automation: Stop and request explicit user confirmation before cordoning/draining any node.
📋 Copypaste Checklist