By the end you'll know
- A six-step method that works on any cluster failure
- What runs where: which parts live only on the control plane, and which on every node
- How to tell a silent kubelet from one reporting a problem, from a single word
- How to troubleshoot with kubectl dead:
crictl, static pod files and container logs - Why a Pending pod with no explanation points at the scheduler
- What
status=203/EXECmeans, and howsystemctl catfinds the file behind it - What happens to pods on a node that stays down
Before you start
- You need: the three-node cluster from Lesson 2, all nodes
Ready. - Update the practice folder with
git pullin your clone: it addsbreak.sh, the script that breaks the cluster for you. - You need
crictlon each node. Check withwhich crictl. If your cluster was built before the practice folder added it, runsudo apt-get install -y cri-toolsoncp1(and on the workers if you like). - The output below is from real runs on November 24, 2026, in New York, on an Apple silicon Mac. Times are in UTC, five hours ahead of New York.
Troubleshooting is 30% of the exam, the biggest domain, so it gets two lessons. This one is the cluster itself: nodes and the control plane. Lesson 4 covers your apps.
This lesson is five tickets. break.sh breaks one thing on one machine and prints only the symptom, the way a real ticket would. You fix it from what you can see. Below each ticket is how it went for me, including the wrong turns, because those are what you'll make under a timer too.
./break.sh list # the five tickets, symptoms only
./break.sh 1 # break ticket 1
./break.sh undo 1 # put it back, if you're truly stuck
Run it on your own computer, from the practice folder. Don't read break.sh until you've done all five: the fixes are in it.
The method
Every ticket below used the same six steps. Learn the order, not the commands:
- Confirm the symptom yourself.
k get nodes,k get pods -A. Don't trust the ticket: see it. If it hasn't shown yet, wait a minute and look again. - Read the error closely, before you fix anything. The address, the status word and the message usually tell you which part to look at.
- Ask Kubernetes with
k describe: a node's Conditions, a pod's Events. If kubectl is down, skip to step 4. - Go one level down, to the machine the clues point at. Check its services (
systemctl), its files (/etc/kubernetes/manifests/) and its containers (crictl). - Fix one thing, and make it survive a reboot. Started a service? Enable it too.
- Verify both halves: the symptom is gone, and the fix will still be there after a restart.
What runs where
You can't go to the right machine without knowing what lives where:
| Part | Runs on | As | Check it with |
|---|---|---|---|
| kube-apiserver | Control plane only | Static pod | /etc/kubernetes/manifests/kube-apiserver.yaml, crictl |
| etcd | Control plane only | Static pod | /etc/kubernetes/manifests/etcd.yaml, crictl |
| kube-scheduler | Control plane only | Static pod | /etc/kubernetes/manifests/kube-scheduler.yaml |
| kube-controller-manager | Control plane only | Static pod | /etc/kubernetes/manifests/kube-controller-manager.yaml |
| kubelet | Every node | systemd service | systemctl status kubelet, journalctl -u kubelet |
| containerd | Every node | systemd service | systemctl status containerd |
| kube-proxy, calico-node | Every node | DaemonSet pods | k get pods -n kube-system -o wide |
Two rules come straight out of this table. kubectl broken? Go to the control plane node. A node NotReady? Go to that node, and check its kubelet and containerd. The workers have no API server at all: their manifests folder is empty, and their kubelets talk to cp1's API server over the network.
Ticket 1: the node that went quiet
(Your machine)
Ticket 1: worker1 is NotReady. Make it Ready, and make sure it stays Ready after a reboot.
(cp1)
My first k get nodes showed every node Ready. So did the second. The third:
NAME STATUS ROLES AGE VERSION INTERNAL-IP
cp1 Ready control-plane 3h27m v1.36.6 192.168.34.154
worker1 NotReady <none> 3h18m v1.36.6 192.168.34.155
worker2 Ready <none> 3h2m v1.36.6 192.168.34.156
A node doesn't turn NotReady the moment something breaks. The controller manager waits for a grace period, under a minute, without hearing from the node before it changes the status. If a task says NotReady and you see Ready, wait and look again.
Then ask Kubernetes:
k describe node worker1
Taints: node.kubernetes.io/unreachable:NoExecute
node.kubernetes.io/unreachable:NoSchedule
...
Conditions:
Type Status Reason Message
NetworkUnavailable False CalicoIsUp Calico is running on this node
MemoryPressure Unknown NodeStatusUnknown Kubelet stopped posting node status.
DiskPressure Unknown NodeStatusUnknown Kubelet stopped posting node status.
PIDPressure Unknown NodeStatusUnknown Kubelet stopped posting node status.
Ready Unknown NodeStatusUnknown Kubelet stopped posting node status.
Four things in there:
- The message names the part:
Kubelet stopped posting node status. Unknown, notFalse.Falsewould mean the kubelet reported a problem.Unknownmeans nothing is reporting at all.NetworkUnavailable False ... Calico is runningrules out the network.- Kubernetes added two
unreachabletaints itself.NoSchedulekeeps new pods off the node.NoExecuteevicts the pods already there after 5 minutes (more on that in ticket 5). Kubernetes removes both once the node is healthy, so you don't touch them.
The kubelet runs on every node, so the problem is on worker1. (worker1)
My first attempt was wrong twice:
vagrant@worker1:~$ systemctl status kubectl
Unit kubectl.service could not be found.
vagrant@worker1:~$ systemctl start kubectl && systemctl enable kubectl
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'kubectl.service'.
...
Failed to start kubectl.service: Access denied
kubectlis the client you type into. The kubelet is the agent on every node. Only the kubelet is a service. Under a timer, the two names blur.- Starting or enabling a service needs
sudo. Readingstatusdoesn't.
Then the real fix:
sudo systemctl start kubelet
sudo systemctl enable kubelet
start: runs it now.enable: starts it at every boot. That's the "stays Ready after a reboot" half of the ticket.
One command does both: sudo systemctl enable --now kubelet.
systemctl status kubelet tells you which half is missing: its Loaded: line ends in enabled or disabled (at boot), and its Active: line says active (running) or inactive (dead) (right now).
Proving it survives a reboot
sudo reboot
Then, on cp1, k get nodes -w. worker1 never left Ready. That surprised me, but it's the same grace period working the other way: the VM rebooted and its kubelet reported in again before the controller manager gave up on it. A kubelet that was still disabled wouldn't have come back at all.
To prove the reboot really happened, compare the node's Boot ID before and after:
k describe node worker1 | grep "Boot ID"
Boot ID: 30154312-f0dc-4fe7-85aa-051bd340964f
It had been b1e3301d-... before. A new Boot ID and a Ready node is the reboot half, verified.
Ticket 2: the runtime is down
Ticket 2: worker2 is NotReady, and new pods that land there never start. Fix the node so the fix survives a reboot.
(cp1)
k describe node worker2
Taints: node.kubernetes.io/not-ready:NoExecute
node.kubernetes.io/not-ready:NoSchedule
...
Ready False ... KubeletNotReady container runtime is down
...
Container Runtime Version: containerd://Unknown
Compare that with ticket 1. One word tells you where to look:
| Ticket 1 | Ticket 2 | |
|---|---|---|
Ready status | Unknown | False |
| Message | Kubelet stopped posting node status | container runtime is down |
| Taint Kubernetes added | unreachable | not-ready |
| Means | The kubelet went silent | The kubelet is alive, and reporting a problem |
| Look at | The kubelet itself | What the kubelet depends on |
(worker2)
systemctl status containerd --no-pager
--no-pager: prints straight to the screen and hands you back the prompt, instead of opening a scrolling viewer you have to quit withq.
○ containerd.service - containerd container runtime
Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: enabled)
Active: inactive (dead) since Tue 2026-11-24 08:15:12 UTC; 3min 59s ago
...
CGroup: /system.slice/containerd.service
├─1384 /usr/bin/containerd-shim-runc-v2 -namespace k8s.io -id 169cfe88...
├─1411 /usr/bin/containerd-shim-runc-v2 -namespace k8s.io -id 5ac1ad65...
└─2248 /usr/bin/containerd-shim-runc-v2 -namespace k8s.io -id d8216db6...
...
containerd.service: Unit process 1384 (containerd-shim) remains running after unit stopped.
disabled and inactive (dead): both halves are broken. The fix:
sudo systemctl enable containerd --now
The second symptom is explained by those containerd-shim lines. Each running container has its own small helper process, a shim, that keeps it alive without containerd. So the pods already on worker2 kept running, while new pods could never start, because starting a container needs containerd itself.
One slip on my side: I first ran k describe node -n worker2. -n means namespace, and nodes don't have one, so kubectl ignored it and described all three nodes. It still worked, but it cost time reading.
Ticket 3: kubectl stops working
Ticket 3: kubectl stopped working on cp1. Get the cluster's API back.
(cp1)
vagrant@cp1:~$ k get nodes
The connection to the server 192.168.34.154:6443 was refused - did you specify the right host or port?
Read the address before anything else. Lesson 1's error said localhost:8080: kubectl had no kubeconfig. This one names the real API server address and port. kubectl knows exactly where to go, and nothing is listening there. The API server itself is down. k describe can't help now, because kubectl needs the API server.
containerd was my first stop, to rule out the runtime. It was active (running), but its log had a clue:
cp1 containerd[914]: ... level=info msg="received container exit event container_id:\"29e13d14...
cp1 containerd[914]: ... level=info msg="RemoveContainer for \"a8c8d913...
Some container on cp1 kept exiting and being removed. The control plane runs as static pods, so the next stop was their folder:
ls -l /etc/kubernetes/manifests/
-rw------- 1 root root 2598 Nov 24 03:52 etcd.yaml
-rw------- 1 root root 3964 Nov 24 16:05 kube-apiserver.yaml
-rw------- 1 root root 3229 Nov 24 03:52 kube-controller-manager.yaml
-rw------- 1 root root 1726 Nov 24 03:52 kube-scheduler.yaml
Three files date from kubeadm init. One changed today. That timestamp says where to look.
crictl: containers without Kubernetes
crictl talks to the container runtime directly through CRI (the Container Runtime Interface), with no API server involved. Its commands mirror kubectl's:
sudo crictl ps -a | grep kube-apiserver
ps -a: lists all containers, including ones that have exited.
f53eebc2119be 4f07fefbf6ee4 2 minutes ago Exited kube-apiserver 5 5aedfedf1783f kube-apiserver-cp1 kube-system
Exited, and the 5 is the ATTEMPT column: the kubelet has restarted it five times. A crash loop. (On my cluster, crictl wasn't installed at first: on v1.36, installing kubeadm no longer brings it in. sudo apt-get install -y cri-tools fixed that, and the practice folder installs it now.)
Then I tried to read its logs, and hit a trap:
vagrant@cp1:~$ sudo crictl logs f53eebc2119be 2>&1 | tail -15
... "ContainerStatus from runtime service failed" err="rpc error: code = NotFound desc = an error occurred when try to find container \"f53eebc2119be\": not found"
In a crash loop, every restart is a new container with a new ID, and the kubelet removes the old ones. The ID I'd copied four minutes earlier was gone. This form always takes the newest:
sudo crictl logs $(sudo crictl ps -a --name kube-apiserver -q | head -1) 2>&1 | tail -15
--name kube-apiserver: only that container.-q: prints only container IDs, newest first.head -1keeps the newest.$( ... ): runs the inner command first and puts its result in place.2>&1: includes error output, which is where the API server writes its errors.
W1124 16:14:33.798797 1 logging.go:55] [core] [Channel #4 SubChannel #9] grpc: addrConn.createTransport failed to connect to {Addr: "127.0.0.1:2380", ServerName: "127.0.0.1:2380", }. Err: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:2380: connect: connection refused"
E1124 16:14:37.056806 1 run.go:72] "command failed" err="error creating storage factory: context deadline exceeded"
The API server's last words: it couldn't reach etcd at 127.0.0.1:2380, and after about 20 seconds it gave up. "Storage factory" is its connection to etcd, and "context deadline exceeded" means it ran out of time. Where is etcd actually listening?
sudo grep -E "listen-client-urls|listen-peer-urls" /etc/kubernetes/manifests/etcd.yaml
grep -E: an extended pattern, where|means "or".
- --listen-client-urls=https://127.0.0.1:2379,https://192.168.34.154:2379
- --listen-peer-urls=https://192.168.34.154:2380
Port 2379 is for clients, like the API server. Port 2380 is for peers, etcd members talking to each other, and on this cluster only on .154, never on 127.0.0.1. The API server's file said:
- --etcd-servers=https://127.0.0.1:2380
The peer port, at an address where nothing listens on it. The fix is one character:
sudo vim /etc/kubernetes/manifests/kube-apiserver.yaml
In Vim: /2380 and Enter to jump there, cursor on the last 0, r then 9 to replace that one character, then :wq to save and quit.
vagrant@cp1:~$ sudo crictl ps -a --name kube-apiserver
CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID
3f0d863d95a69 4f07fefbf6ee4 10 seconds ago Running kube-apiserver 0 fe259ff843697
c03685e68fa88 4f07fefbf6ee4 4 minutes ago Exited kube-apiserver 7 5aedfedf1783f
vagrant@cp1:~$ k get nodes
NAME STATUS ROLES AGE VERSION
cp1 Ready control-plane 12h v1.36.6
worker1 Ready <none> 12h v1.36.6
worker2 Ready <none> 12h v1.36.6
- ATTEMPT
0and a new POD ID. Editing the file didn't restart the old pod: the kubelet saw a changed file and built a new pod from it. - My first
k get nodesafter saving still failed. The API server needs 20 to 30 seconds to start and reach etcd. Checkcrictl psbefore deciding the fix didn't work. - No reboot step needed. The fix is in the file, and the kubelet reads it on every boot.
Never leave a backup in manifests/
The kubelet runs every file in /etc/kubernetes/manifests/ as a static pod. A copy named kube-apiserver.yaml.bak there starts a second API server, fighting the first for the same port. Keep backups in your home folder.
Ticket 4: new pods stay Pending
Ticket 4: New pods stay Pending forever, on every node. Find out why and fix it.
(cp1)
kubectl works this time. But the pods already running are fine, so the symptom only shows on a new pod:
k scale deploy web --replicas=4
k get pods
k describe pod web-558f679c7b-ljsrl
The new pods sat in Pending. The part that places new pods is the scheduler, so that's where to look:
k -n kube-system get pods -l component=kube-scheduler -o wide
k -n kube-system logs kube-scheduler-cp1 --previous --tail=50
-l component=kube-scheduler: the label kubeadm puts on the scheduler's static pod.--previous: the logs of the container that crashed, not the new one the kubelet is trying to start. That's the right move for any crash loop, as long as the API server is up.--tail=50: the last 50 lines.
The scheduler reaches the API server through its kubeconfig, so that was the next suspect. I checked its line, and whether the file it names exists:
sudo grep -nE 'kubeconfig|scheduler\.conf' /etc/kubernetes/manifests/kube-scheduler.yaml
sudo ls -l /etc/kubernetes/scheduler.conf
grep -n: adds line numbers.\.matches a real dot.
The manifest said --kubeconfig=/etc/kubernetes/scheduler.config, a file that doesn't exist. The real one is scheduler.conf. I fixed it with sed:
sudo sed -i 's|--kubeconfig=/etc/kubernetes/scheduler\.config$|--kubeconfig=/etc/kubernetes/scheduler.conf|' /etc/kubernetes/manifests/kube-scheduler.yaml
k -n kube-system get pod kube-scheduler-cp1 -w
sed -i: edits the file in place.s|old|new|: replacesoldwithnew. Using|as the separator means the slashes in the paths need no escaping.$pins the match to the end of the line, so the scheduler's other kubeconfig flags, like--authentication-kubeconfig, stay untouched.
The scheduler came back, and the Pending pods were scheduled and started.
Two things to remember from this one:
- The scheduler only places new pods. Pods already running keep running with it down, so the cluster looks healthy until you create something.
- A Pending pod explains itself through
FailedSchedulingevents, and the scheduler writes those. If a pod is Pending and nothing explains why, ask whether the scheduler is running at all.
Ticket 5: a kubelet systemd can't start
Ticket 5: worker2 is NotReady again, but containerd is running this time. Fix it.
containerd is fine, so the kubelet itself is the suspect. (worker2)
sudo systemctl status kubelet --no-pager
sudo journalctl -u kubelet --no-pager | grep -m 3 -E "203/EXEC|No such file"
journalctl -u kubelet: the kubelet's log history.grep -m 3: stop after three matches.
Nov 25 04:06:11 worker2 systemd[1]: kubelet.service: Main process exited, code=exited, status=203/EXEC
Nov 25 04:06:21 worker2 systemd[1]: kubelet.service: Main process exited, code=exited, status=203/EXEC
Nov 25 04:06:31 worker2 systemd[1]: kubelet.service: Main process exited, code=exited, status=203/EXEC
status=203/EXEC is systemd's own error: it couldn't start the program at all. The path in the service's ExecStart= line doesn't exist, or isn't executable. The kubelet never ran a single line. It repeats every 10 seconds because the kubelet's service tells systemd to keep retrying.
So, where's the kubelet supposed to be, and where does the service say it is?
sudo ls -l /usr/local/bin/kubelet
command -v kubelet
systemctl cat kubelet
command -v kubelet: prints where the program really lives:/usr/bin/kubelet.systemctl cat kubelet: shows every file that makes up the service, including drop-ins, extra files inkubelet.service.d/that override the main unit. Each is printed with its path.
The drop-in /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf had ExecStart=/usr/local/bin/kubelet ..., a path that doesn't exist. The fix:
sudoedit /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
sudo systemctl daemon-reload
sudo systemctl restart kubelet
systemctl status kubelet --no-pager
sudoedit: edits a root-owned file safely. It opens a copy in your editor and writes it back when you save.daemon-reload: makes systemd read its unit files again. After editing any unit file, this comes first, or systemd keeps running the old version.
What happened to the pods on worker2
worker2 was down for about nine minutes. Afterwards, from cp1:
NAME READY STATUS RESTARTS AGE IP NODE
web-558f679c7b-55jmr 1/1 Running 1 (12h ago) 19h 10.244.235.139 worker1
web-558f679c7b-67lcv 1/1 Running 0 8m43s 10.244.235.142 worker1
web-558f679c7b-kvvcm 1/1 Running 0 8m43s 10.244.235.143 worker1
web-558f679c7b-ng2dz 1/1 Running 0 8m43s 10.244.235.144 worker1
web-558f679c7b-nq7b9 1/1 Running 0 11h 10.244.235.140 worker1
web-558f679c7b-zzh7q 1/1 Running 0 10h 10.244.235.141 worker1
Three pods, all 8m43s old, all on worker1. Before the ticket, three of the six ran on worker2. When a node stays NotReady for 5 minutes, its NoExecute taint evicts the pods on it, and their Deployment creates replacements on healthy nodes. DaemonSet pods like calico-node tolerate the taint, so they stay. And now that worker2 is back, nothing moves back to it: the scheduler places each pod once, as in Lesson 2.
How the drills work
Each drill is a task to do from a blank terminal. Try it first, without looking. Then open "Show the fast way" to compare your commands, and read the notes under them: they cover the part people usually get wrong. Repeat a drill a few days later until you can do it cold, because the exam leaves little time to look things up.
./break.sh gives you a real failure to practice on for each one.
The drills
A node is NotReady. Find out why, fix it, and make sure the fix survives a reboot.
Show the fast way
k get nodes
k describe node NODE # Conditions: Unknown or False? Read the message
ssh NODE
sudo systemctl status kubelet --no-pager
sudo systemctl status containerd --no-pager
sudo journalctl -u kubelet --no-pager | tail -30
sudo systemctl enable --now kubelet # or containerd, whichever is down
systemctl is-enabled kubelet # enabled = survives a reboot
Unknown means the kubelet went silent: look at the kubelet. False means the kubelet is reporting a problem, like container runtime is down: look at what it depends on. enable --now both starts the service and sets it to start at boot. start alone fixes only half the task.
kubectl fails with connection refused on port 6443. Find the broken control plane part and fix it.
Show the fast way
ssh CONTROL-PLANE-NODE
ls -l /etc/kubernetes/manifests/ # which file changed recently?
sudo crictl ps -a --name kube-apiserver # Exited, ATTEMPT climbing = crash loop
sudo crictl logs $(sudo crictl ps -a --name kube-apiserver -q | head -1) 2>&1 | tail -15
sudo vim /etc/kubernetes/manifests/kube-apiserver.yaml
sudo crictl ps -a --name kube-apiserver # new container Running
k get nodes # give it 20 to 30 seconds
:6443 refused means the API server is down. localhost:8080 means kubectl has no kubeconfig: different problems. Copied crictl IDs go stale in a crash loop, so use the -q | head -1 form. etcd's client port is 2379 and its peer port is 2380. Never leave a backup copy in manifests/.
Every new pod stays Pending, on every node, while existing pods keep running. Find out why and fix it.
Show the fast way
k get pods -A | grep -v Running # what's not running?
k -n kube-system get pods -l component=kube-scheduler
k -n kube-system logs kube-scheduler-cp1 --previous --tail=50
sudo grep -n kubeconfig /etc/kubernetes/manifests/kube-scheduler.yaml
sudo vim /etc/kubernetes/manifests/kube-scheduler.yaml
k -n kube-system get pod kube-scheduler-cp1 -w
The scheduler only places new pods, so a broken one hides until you create something. A Pending pod normally explains itself in a FailedScheduling event, and the scheduler writes those: no explanation at all points at the scheduler. --previous reads the crashed container's logs. grep -v Running hides the healthy lines.
A node's kubelet won't start, and its log says status=203/EXEC. Fix it.
Show the fast way
sudo journalctl -u kubelet --no-pager | grep -m 3 203/EXEC
command -v kubelet # where the kubelet really is
systemctl cat kubelet # every file behind the service, with paths
sudoedit /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
sudo systemctl daemon-reload
sudo systemctl restart kubelet
systemctl status kubelet --no-pager
203/EXEC means systemd couldn't start the program: the ExecStart= path is wrong or not executable. systemctl cat shows which file holds that line, often a drop-in in kubelet.service.d/. The drop-in's location varies between installs, so let systemctl cat tell you. daemon-reload before restart, every time you edit a unit file.
On exam day
- Read the address in a kubectl error before anything else.
localhost:8080means no kubeconfig. The API server's address with:6443means the API server itself. - SSH to the node the task names, and
exitwhen you're done. If a task gives you an SSH command, use it exactly. - Use
sudofor any change.sudo -igives you a root shell if you'll make several changes, but remember to leave it. - Make it survive a reboot. If you started a service, enable it too. When a task says the fix must last, a started-but-disabled service is only half done.
- Give the control plane time. After editing a static pod file, wait 20 to 30 seconds and check
crictl psbefore assuming your fix failed. - Fix only what's broken. Don't "tidy up" other settings on a broken node. You might break what the next task needs.
Clean up
Every ticket here was fixed, so there's nothing to undo. When you're done for the day:
(Your machine)
vagrant halt
If you ever leave a ticket half-fixed, ./break.sh undo N puts that ticket back the way it was before the break.
In real life
- Real clusters have three control plane nodes, each with its own API server and etcd member, behind a load balancer. Losing one API server, as in ticket 3, then doesn't take the cluster down. A practice cluster like this one keeps it to one.
- Managed services hide the control plane. On Amazon EKS (Elastic Kubernetes Service), Azure AKS or Google GKE, you can't SSH to it, so tickets 3 and 4 become the provider's problem. Nodes, the kubelet and containerd are still yours, and tickets 1, 2 and 5 happen there too.
- Monitoring finds a NotReady node before a person does. An alert on the node's
Readycondition, or on a crash-looping control plane pod, tells you within a minute or two, not when a user complains.
Spot the problem
Work out what's wrong before you read the explanation.
"I fixed it, but it broke again." A teammate finds a stopped kubelet on a NotReady node, runs sudo systemctl start kubelet, and the node turns Ready. After the next reboot, it's NotReady again. What did they miss? The service was disabled as well as stopped, so the first reboot brings the problem back. systemctl status shows it on the Loaded: line. sudo systemctl enable --now kubelet fixes both halves at once.
"crictl says the container doesn't exist." During a control plane crash, someone copies a container ID from crictl ps -a, reads two other files, then runs crictl logs with that ID and gets NotFound. Is crictl broken? No: in a crash loop, every restart creates a new container, and the kubelet removes old ones. The ID went stale. sudo crictl logs $(sudo crictl ps -a --name NAME -q | head -1) always reads the newest.
"The edit didn't take." Someone fixes the ExecStart= path in the kubelet's drop-in and restarts the kubelet. systemctl status still shows the old path and 203/EXEC. What's missing? sudo systemctl daemon-reload. systemd caches unit files, so until it reloads them, a restart uses the old version.
Keep this
| Symptom or clue | Means | Next |
|---|---|---|
Ready Unknown, Kubelet stopped posting node status | The kubelet is silent | systemctl status kubelet on that node |
Ready False, container runtime is down | containerd is stopped | systemctl status containerd on that node |
:6443 ... connection refused | The API server is down | crictl ps -a, crictl logs on the control plane |
localhost:8080 ... refused | No kubeconfig here | Wrong machine or user |
| New pods Pending, nothing explains why | The scheduler may be down | k -n kube-system logs kube-scheduler-NODE --previous |
status=203/EXEC | systemd can't start the program | systemctl cat SERVICE, fix ExecStart=, daemon-reload |
A recently changed file in manifests/ | Probably the broken part | ls -l /etc/kubernetes/manifests/ |
| Start now and at boot | sudo systemctl enable --now SERVICE | |
| Prove a node rebooted | k describe node NODE | grep "Boot ID" | |
| etcd ports | 2379 clients, 2380 peers | grep listen /etc/kubernetes/manifests/etcd.yaml |
Where you are now
You've broken and fixed the cluster five ways, with nothing to go on but the symptom: a silent kubelet, a stopped runtime, an API server that couldn't reach etcd, a scheduler that couldn't start, and a kubelet systemd couldn't launch. You know what runs where, how to tell Unknown from False, and how to work with kubectl dead. Lesson 4 moves up a level, to apps that fail: pods that won't start, Services that don't connect, and pulling exact answers out of kubectl with JSONPath.
Check yourself
A node's Ready condition is Unknown, with Kubelet stopped posting node status. NetworkUnavailable says CalicoIsUp. Where do you look first?
kubectl on the control plane fails with The connection to the server 192.168.34.154:6443 was refused. What does that tell you?
The API server is down. Which command shows whether its container keeps crashing?
The API server's logs say it can't connect to 127.0.0.1:2380. etcd's file shows listen-client-urls on port 2379 and listen-peer-urls on port 2380. What's wrong?
A kubelet's journal shows status=203/EXEC every 10 seconds. What's wrong?
worker2 was NotReady for 10 minutes, and its Deployment pods now run on worker1. When worker2 is Ready again, what happens to them?
Key terms
- Static pod: a pod the kubelet runs straight from a file in
/etc/kubernetes/manifests/, with no API server involved. The control plane runs this way. - crictl: a command-line tool that talks to the container runtime directly through CRI (the Container Runtime Interface).
- Crash loop: a container that keeps exiting and being restarted, with a growing wait in between.
- Node condition: a status row on a node, like
ReadyorMemoryPressure, with a status ofTrue,FalseorUnknown. - NoExecute taint: a taint that evicts pods already on a node, after the time their toleration allows.
- Eviction: removing a pod from a node, after which its controller creates a replacement elsewhere.
- Drop-in: an extra systemd file in a
SERVICE.service.d/folder that overrides settings in the main unit file. daemon-reload: tells systemd to read its unit files again after a change.- etcd client and peer ports: 2379, for clients like the API server, and 2380, for etcd members talking to each other.
Go deeper
- Troubleshooting clusters (opens in a new tab), the Kubernetes docs page for this lesson's domain.
- Debugging Kubernetes nodes with crictl (opens in a new tab), with crictl's commands side by side with docker's.
- Create static pods (opens in a new tab), for how the kubelet runs the files in
manifests/. - Taint-based evictions (opens in a new tab), for the 5-minute rule in ticket 5.