1
---
2
name: gke-ai-troubleshooting-node-unresponsive-timeout
3
description: >-
4
Diagnose and mitigate GKE TPU or GPU nodes stuck in NotReady /
5
NodeStatusUnknown ("Kubelet stopped posting node status") due to host kernel
6
panics, hardware lockups, or disabled node auto-repair. Use when nodes stop
7
heartbeating beyond the node auto-repair threshold and pods remain stuck in
8
Terminating. Don't use for healthy nodes, pod-only application crashes, or
9
routine GKE upgrades.
10
metadata:
11
version: "1.0.1"
12
category: Containers
13
---
14
15
# Troubleshoot unresponsive GKE TPU and GPU nodes (`NodeStatusUnknown`)
16
17
When the Compute Engine host of a TPU or GPU node has a fatal hardware error,
18
kernel panic, or non-maskable interrupt (NMI) lockup, the guest OS stops
19
responding. The kubelet can no longer send heartbeats, so the node `Ready`
20
condition becomes `Unknown` with `Reason: NodeStatusUnknown` (`Kubelet stopped
21
posting node status.`). If node auto-repair is disabled on the node pool, GKE
22
doesn't repair the node. The node can stay `NotReady`, and pods on it can stay
23
in `Terminating`, which blocks multi-host `JobSet` workloads from recovering.
24
25
## Attribution
26
27
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you
28
MUST read [Usage Attribution](references/attribution.md). For commands executed
29
directly in the terminal (never in generated scripts, Terraform, or user code),
30
prefix `gcloud` with
31
`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-ai-troubleshooting-node-unresponsive-timeout)"`
32
and append `agent-skills/1.0 (skill:gke-ai-troubleshooting-node-unresponsive-timeout)` to `User-Agent` headers.
33
34
## Prerequisites
35
36
- **Tools**: Install the
37
[Google Cloud SDK](https://cloud.google.com/sdk/docs/install) (`gcloud`) and
38
`kubectl`.
39
- **Cloud Billing & Project Configuration**: Verify an active billing account is
40
linked (`gcloud billing projects describe {project_id}`), authenticate
41
(`gcloud auth login`), set the target project (`gcloud config set project
42
{project_id}`), and ensure `container.googleapis.com`,
43
`compute.googleapis.com`, `logging.googleapis.com`, and
44
`monitoring.googleapis.com` are enabled.
45
- **Required IAM Roles**:
46
- Kubernetes Engine Viewer (`roles/container.viewer`)
47
- Compute Viewer (`roles/compute.viewer`)
48
- Logs Viewer (`roles/logging.viewer`)
49
- Monitoring Viewer (`roles/monitoring.viewer`)
50
- For remediation (`[High Risk]` steps): Kubernetes Engine Cluster Admin
51
(`roles/container.clusterAdmin`)
52
- **Documentation**:
53
- [Troubleshoot nodes with the NotReady status in GKE](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-notready.md.txt)
54
(Sections: "Check the node's status and conditions", "Confirm node
55
preemption", "Verify that the node has recovered")
56
- [Deploy TPU workloads in GKE Standard](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/tpus.md.txt)
57
(Sections: "Monitor health metrics for TPU nodes and node pools", "Configure
58
auto repair for TPU slice nodes")
59
- [Troubleshoot OOM events](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/oom-events.md.txt)
60
- [View GKE logs](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/view-logs.md.txt)
61
(Sections: "System logs")
62
- [Viewing serial port output](https://docs.cloud.google.com/compute/docs/troubleshooting/viewing-serial-port-output.md.txt)
63
- [Troubleshoot Linux VM boot issues due to kernel panic](https://docs.cloud.google.com/compute/docs/troubleshooting/kernel-panic.md.txt)
64
- [Auto-repair nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
65
(Sections: "Settings for Autopilot and Standard", "Verify node auto-repair
66
is enabled for a Standard node pool", "Get information about recent
67
automated repair events", "Enable auto-repair for an existing Standard node
68
pool", "Repair criteria", "Node repair process", "Node auto repair in TPU
69
slice nodes")
70
- [Troubleshooting VM shutdowns and reboots](https://docs.cloud.google.com/compute/docs/troubleshooting/troubleshooting-reboots.md.txt)
71
(Sections: "Querying Cloud Audit Logs", "Reviewing Cloud Audit Logs")
72
73
> **Read-only rule**: Run read-only diagnostic commands only. Never drain,
74
> delete, or re-create nodes, or run any other command that changes the cluster.
75
> Give the user any fix to apply themselves.
76
77
When you recommend a fix, link the doc section that describes it.
78
79
---
80
81
## Diagnostic workflow
82
83
### Step 0: Collect context and set the investigation window `[Low Risk]`
84
85
Collect the target parameters. By default, query a 60-minute window `[T - 30m, T
86
+ 30m]` around `{issue_time}`:
87
88
- `{project_id}`: Google Cloud project ID
89
- `{cluster_name}`: GKE cluster name
90
- `{location}`: Cluster region or zone
91
- `{nodepool_name}`: Target TPU or GPU node pool name
92
- `{node_name}`: Unresponsive GKE node name (and its Compute Engine `{zone}`)
93
- `{issue_time}`: Incident timestamp in RFC3339 UTC
94
- `{start_time}`: `{issue_time} - 30m`
95
- `{end_time}`: `{issue_time} + 30m`
96
97
---
98
99
### Step 1: Verify the `NodeStatusUnknown` heartbeat timeout `[Low Risk]`
100
101
1. **Check Kubernetes node conditions**: To inspect the node status and verify
102
whether the `Ready` condition is `Unknown` with `Reason: NodeStatusUnknown`
103
(`Kubelet stopped posting node status.`), follow the instructions in the
104
section
105
[Check the node's status and conditions](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-notready.md.txt).
106
2. **Query Cloud Logging (read-only LQL)**: Query `k8s_node` and `k8s_cluster`
107
logs across `[{start_time}, {end_time}]` to confirm when the control plane
108
lost heartbeat contact with `{node_name}`:
109
110
```
111
(resource.type="k8s_node" OR resource.type="k8s_cluster")
112
resource.labels.cluster_name="{cluster_name}"
113
("{node_name}" AND ("NodeNotReady" OR "NodeStatusUnknown" OR "Kubelet stopped posting node status"))
114
timestamp >= "{start_time}" AND timestamp <= "{end_time}"
115
```
116
117
3. **Query Cloud Monitoring (read-only PromQL)**: Correlate the duration of the
118
`Unknown` state using the GKE system metric
119
`kubernetes.io/node/status_condition` (`kubernetes_io:node_status_condition`,
120
GKE `1.32.1-gke.1357001+`) documented in
121
[Monitor health metrics for TPU nodes and node pools](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/tpus.md.txt),
122
filtered by `condition="Ready"` and `status="Unknown"`:
123
124
```promql
125
kubernetes_io:node_status_condition{
126
monitored_resource="k8s_node",
127
cluster_name="{cluster_name}",
128
node_name="{node_name}",
129
condition="Ready",
130
status="Unknown"
131
}
132
```
133
134
- **Decision logic**:
135
- If the node `Ready` condition is `True` and `NodeStatusUnknown` is absent,
136
**rule out** an unresponsive node timeout and pivot to workload-level
137
troubleshooting (for example,
138
[Troubleshoot OOM events](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/oom-events.md.txt))
139
rather than repairing or draining the node.
140
- If `Ready` is `Unknown` (`NodeStatusUnknown`), proceed to Step 2.
141
142
---
143
144
### Step 2: Inspect serial port output for a kernel panic `[Low Risk]`
145
146
The guest OS can't send logs after a fatal kernel freeze, so check the serial
147
port output of the node's VM:
148
149
- **Cloud Logging**: If serial port logging is enabled (i.e. VM metadata
150
`serial-port-logging-enable` is set to `true`), GKE system logs in Cloud
151
Logging include the node's serial port output. See the section
152
[System logs](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/view-logs.md.txt).
153
Use Cloud Logging when the VM is stopped or has already been replaced by
154
auto-repair, or when you need more than the most recent output.
155
- **Running VM**: Follow
156
[Viewing serial port output](https://docs.cloud.google.com/compute/docs/troubleshooting/viewing-serial-port-output.md.txt)
157
to retrieve the serial port 1 output (`gcloud compute instances
158
get-serial-port-output` with `--port=1`) for `{node_name}` in `{zone}`. This
159
method returns only the most recent 1 MB of output per port.
160
161
Consult
162
[Troubleshoot Linux VM boot issues due to kernel panic](https://docs.cloud.google.com/compute/docs/troubleshooting/kernel-panic.md.txt)
163
to identify documented kernel panic and hardware crash patterns (such as `Fatal
164
Machine check`, `hung_task: blocked tasks`, or `NMI: Not continuing`) in the
165
serial port output.
166
167
---
168
169
### Step 3: Check node auto-repair status `[Low Risk]`
170
171
Find out why GKE hasn't repaired the unresponsive node:
172
173
- **Autopilot clusters**: Autopilot always repairs nodes, and you can't turn
174
this off (see
175
[Settings for Autopilot and Standard](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)).
176
Skip the configuration check and check the repair history.
177
- **Standard clusters**: Follow
178
[Verify node auto-repair is enabled for a Standard node pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
179
to check whether `autoRepair` is enabled on `{nodepool_name}`.
180
- **Repair history (both modes)**: Auto-repair can be enabled and the repair can
181
still fail. Per
182
[Configure auto repair for TPU slice nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/tpus.md.txt),
183
check the repair status, including the failure reason, in the operation
184
history described in
185
[Get information about recent automated repair events](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt).
186
If the failure is caused by insufficient quota, tell the user to contact their
187
Google Cloud account representative to increase the quota.
188
189
---
190
191
### Step 4: Check Compute Engine system events `[Low Risk]`
192
193
To list the system events for `{node_name}` around `{issue_time}`, follow the
194
instructions in the section
195
[Querying Cloud Audit Logs](https://docs.cloud.google.com/compute/docs/troubleshooting/troubleshooting-reboots.md.txt).
196
Compare the `method` field with the table in the "Reviewing Cloud Audit Logs"
197
section of the same document, and look for:
198
199
- `compute.instances.hostError`: a hardware or software issue on the physical
200
host caused the VM to crash.
201
- `compute.instances.preempted`: Compute Engine preempted a Spot VM or
202
preemptible VM. For preempted nodes, also see
203
[Confirm node preemption](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-notready.md.txt).
204
- `compute.instances.automaticRestart`: Compute Engine restarted the VM after a
205
`hostError` or `terminateOnHostMaintenance` event.
206
- `compute.instances.guestTerminate`: the VM's operating system initiated the
207
shutdown.
208
209
---
210
211
### Step 5: Resolution `[High Risk]`
212
213
> **Guardrails**:
214
> - **Never** force-delete stuck `Terminating` pods on an unresponsive node.
215
> Force deletion doesn't wait for the kubelet to confirm that the pod has
216
> stopped, so a replacement pod can start while the old one is still running.
217
> See
218
> [Force Delete StatefulSet Pods](https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/#force-deletion).
219
> - **Never** delete GKE-managed Compute Engine VM instances directly (`gcloud
220
> compute instances delete`). Instead, check how long the node has reported
221
> `NodeStatusUnknown` (Step 1), check the serial console output (Step 2), and
222
> rely on node auto-repair, as described in the following steps.
223
224
1. **Enable node auto-repair (Standard clusters only)**:
225
- Autopilot clusters always auto-repair nodes, so skip this step.
226
- Before the user enables auto-repair on a multi-host TPU slice node pool,
227
tell them that GKE re-creates the entire node pool when a node in it needs
228
repair (see step 2).
229
- If `autoRepair` is disabled on `{nodepool_name}`, link the user to
230
[Enable auto-repair for an existing Standard node pool](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
231
and
232
[Configure auto repair for TPU slice nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/tpus.md.txt)
233
so they can apply the change themselves.
234
2. **Let GKE repair the node**:
235
- Explain that GKE repairs a node that reports `NotReady` or no status for
236
the documented time threshold by draining and re-creating it, and link the
237
"Repair criteria" and "Node repair process" sections of
238
[Auto-repair nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt).
239
GKE waits one hour for the drain to complete. If the drain doesn't
240
complete, GKE shuts the node down and creates a new node. Tell the user to
241
expect this one-hour drain wait before GKE re-creates the node.
242
- For multi-host TPU slice node pools, note per
243
[Node auto repair in TPU slice nodes](https://docs.cloud.google.com/kubernetes-engine/docs/how-to/node-auto-repair.md.txt)
244
that the entire node pool is re-created.
245
3. **Verify node recovery**:
246
- After the repair completes, follow the instructions in the section
247
[Verify that the node has recovered](https://docs.cloud.google.com/kubernetes-engine/docs/troubleshooting/node-notready.md.txt)
248
to verify that the repaired node returns to `Ready` status, then confirm
249
that the `JobSet` pods are running again.
250