Talos has no shell and no SSH – every question to the node goes through talosctl. Talos passes a typo in the KubeletConfig extraArgs to the kubelet unchecked. The kubelet exits, the node goes NotReady.
Symptom
kubectl get nodes NAME STATUS ROLES AGE VERSION talos-controlplane-1 Ready control-plane 7m v1.37.2 talos-worker-1 NotReady <none> 7m v1.37.2
The patch itself reports no error: Talos applies it without a reboot. Only after about a minute does the node flip.
Diagnosis
State of the service, the last log line of the kubelet and the flags Talos renders from it.
talosctl -n 10.5.0.3 service kubelet | sed -n '1,6p' | cut -c1-88
talosctl -n 10.5.0.3 logs kubelet --tail 1 | grep -o '"command failed".*'
talosctl -n 10.5.0.3 get kubeletspec -o yaml | grep -- '--max'
NODE 10.5.0.3
ID kubelet
STATE Waiting
HEALTH Fail
LAST HEALTH MESSAGE Get "http://127.0.0.1:10248/healthz": dial tcp 127.0.0.1:10248: co
EVENTS [Waiting]: Error running Containerd(kubelet), going to restart for
"command failed" err="failed to parse kubelet flag: unknown flag: --max-pod"
- --max-pod=150
Causes
extraArgsTypo in the KubeletConfig
In the course it says max-pod instead of max-pods. Talos passes extraArgs to the kubelet as flags without checking them; the kubelet exits while parsing, and Talos restarts it every few seconds ("going to restart forever").
cat > kubelet-tippfehler.yaml <<'EOF' apiVersion: v1alpha1 kind: KubeletConfig extraArgs: max-pod: "150" EOF
Removed flagA flag that no longer exists after an upgrade
For RKE2 the course notes that flags an upgrade has removed end the same way. Talos passes extraArgs on just as unchecked – the kubelet exits while parsing.
Fix
cat > kubelet-fix.yaml <<'EOF'
apiVersion: v1alpha1
kind: KubeletConfig
extraArgs:
max-pod:
$patch: delete
EOF
talosctl -n 10.5.0.3 patch mc --patch @kubelet-fix.yaml
kubectl wait --for=condition=Ready node/talos-worker-1 --timeout=120s
talosctl -n 10.5.0.3 service kubelet | sed -n '3,4p'
node/talos-worker-1 condition met
STATE Running
HEALTH OK
Debugging Kubernetes, day 19: the same faults on Talos – kubelet, API server, Pod Security, mirror, NetworkPolicy and metrics-server, investigated with talosctl.
Go to day 19 →
FAQ
How can I see in advance what a patch changes?
talosctl patch mc with --dry-run shows the change as a diff before it applies – in the course the lines +extraArgs and +max-pod.
How do I find the same fault on RKE2?
RKE2 passes kubelet-arg through just as unchecked. rke2-agent reports active, the journal shows Kubelet exited and the kubelet log the same message.