Kubernetes basics · Lesson 13 of 13 · about 45 minutes

When it won't run: a troubleshooting checklist

The whole track turned into one method. Every app passes the same eight stages on its way to working, a broken one stopped at one of them, and kubectl get pods usually tells you which. Then a short checklist finds the cause in order. You'll break seven apps and four parts of the cluster itself on purpose, and diagnose every one.

By the end you'll know

  • The eight stages every app passes on its way to working, and how to tell which one it stopped at
  • A checklist of commands, in order, that finds the cause instead of guessing
  • Why "check the logs" is so often a dead end, and when logs do help
  • What eleven common failures look like, seven in your apps and four in the cluster itself
  • How to tell "my app is broken" from "the cluster is broken"

Where it stopped

When something's broken, the reflex is to read the logs. Often there aren't any: a pod that was never placed on a node, or whose image never downloaded, never ran a single line of code, so there's nothing to log. The logs aren't hiding the answer; you're looking in the wrong place.

Every app goes through the same stages, in the same order, on its way from your YAML to answering requests. When something's broken, it stopped at one of them, and each stage has its own place to look. Find the stage first, and the right command follows.

Think of tracking a parcel. "Order placed, packed, shipped, out for delivery, delivered." If it says "packed" for three days, you don't ask the delivery driver; you call the warehouse. The tracking page doesn't fix anything, but it tells you who to ask. kubectl get pods is the tracking page.
The eight stages, and where to look at eachThe stages, in order: accepted by the API server, scheduled to a node, image pulled, container created, running, ready, reachable inside the cluster, reachable from outside. When an app stops at scheduled, image pulled or container created, kubectl describe and its Events explain why. At running and ready, the logs help. At reachable inside, check the Service's endpoints. At reachable from outside, test with curl from inside and outside the cluster.kubectl describe: the Eventskubectl logsendpointscurlAcceptedScheduledImagepulledContainercreatedRunningReadyReachableinsideReachableoutsideapply failsPendingImagePullBackOffCreateCont…ConfigErrorCrashLoopOOMKilledRunning 0/1no endpointstimeoutsWhat you see when it stops at each stageFind the stage first. Logs only exist once the program has started.
The eight stages from YAML to a working app. The status in kubectl get pods tells you which stage an app stopped at; the bracket above it tells you where to look.
StageMeansDone by
1. AcceptedThe API server took your YAML and stored itAPI server
2. ScheduledA node was chosen for the podScheduler
3. Image pulledThat node downloaded the container imageKubelet, on the node
4. Container createdIts settings, Secrets and volumes were attachedKubelet
5. RunningThe program started, and stayed upYour code
6. ReadyIts readiness check passes (Lesson 6)Your code, and its probe
7. Reachable insideA Service finds it and sends it traffic (Lesson 8)Service, endpoints
8. Reachable outsideThe Gateway and DNS route outside traffic to the Service (Lesson 12)Gateway, DNS

The checklist

Always in this order, and stop at the step that explains it.

StepRunAnswers
1kubectl get podsWhich stage: the STATUS, READY and RESTARTS columns
2kubectl describe pod NAMEWhy, for stages 2 to 4: read the Events at the bottom, and Last State for a container that stopped
3kubectl logs NAME, then --previousWhy, for stages 5 and 6: what the program said before it stopped
4kubectl get events --sort-by=.lastTimestampThe whole namespace's story, in order, when one pod's events aren't enough
5kubectl get endpointslices -l kubernetes.io/service-name=NAMEStage 7: whether the Service found any pods, and whether they're ready
6A throwaway curl pod, then curl from outsideStages 7 and 8: whether a real request works
7kubectl get nodes, kubectl get pods -n kube-systemWhether the cluster itself is the problem. Go here first when several apps break at once.

Step 2 is the one people skip. describe prints a lot, and the answer is in the last ten lines, under Events. Scroll to the bottom first, every time.

Seven broken apps

You'll need the kind cluster from Lesson 2, with its three nodes. If you deleted it, make it again with the same kind-learn.yaml:

BASH
kind create cluster --name learn --config kind-learn.yaml
kubectl wait --for=condition=Ready nodes --all --timeout=180s

kubectl wait matters here. A brand-new node refuses new pods for its first few seconds, until its networking is up, and in a first attempt at this lab, without the wait, every pod's first event was the same: 0/3 nodes are available: 3 node(s) had untolerated taint(s). That's a real failure you'll meet after adding nodes; here it would hide the ones you came for.

Save the seven apps as mysteries.yaml. Each one is broken in a different way; try not to read the comments too closely before you've diagnosed them.

mysteries.yaml: seven small apps, each broken on purpose
YAML
# 1. typo
apiVersion: apps/v1
kind: Deployment
metadata:
  name: typo
spec:
  replicas: 1
  selector:
    matchLabels: {app: typo}
  template:
    metadata:
      labels: {app: typo}
    spec:
      containers:
        - name: web
          image: nginx:1.27-alpne
---
# 2. crash
apiVersion: apps/v1
kind: Deployment
metadata:
  name: crash
spec:
  replicas: 1
  selector:
    matchLabels: {app: crash}
  template:
    metadata:
      labels: {app: crash}
    spec:
      containers:
        - name: menu
          image: busybox:1.37
          command: ["sh", "-c", "echo 'starting the menu service'; echo 'error: MENU_DB is not set'; exit 1"]
---
# 3. greedy
apiVersion: apps/v1
kind: Deployment
metadata:
  name: greedy
spec:
  replicas: 1
  selector:
    matchLabels: {app: greedy}
  template:
    metadata:
      labels: {app: greedy}
    spec:
      containers:
        - name: report
          image: python:3.13-alpine
          command: ["python", "-c", "print('building the daily report', flush=True); x = bytearray(200 * 1024 * 1024); print('done')"]
          resources:
            requests: {memory: 32Mi}
            limits: {memory: 64Mi}
---
# 4. too-big
apiVersion: apps/v1
kind: Deployment
metadata:
  name: too-big
spec:
  replicas: 1
  selector:
    matchLabels: {app: too-big}
  template:
    metadata:
      labels: {app: too-big}
    spec:
      containers:
        - name: web
          image: nginx:1.27-alpine
          resources:
            requests: {cpu: "64"}
---
# 5. missing-config
apiVersion: apps/v1
kind: Deployment
metadata:
  name: missing-config
spec:
  replicas: 1
  selector:
    matchLabels: {app: missing-config}
  template:
    metadata:
      labels: {app: missing-config}
    spec:
      containers:
        - name: web
          image: nginx:1.27-alpine
          envFrom:
            - configMapRef: {name: bakery-settings}
---
# 6. not-ready
apiVersion: apps/v1
kind: Deployment
metadata:
  name: not-ready
spec:
  replicas: 1
  selector:
    matchLabels: {app: not-ready}
  template:
    metadata:
      labels: {app: not-ready}
    spec:
      containers:
        - name: web
          image: nginx:1.27-alpine
          readinessProbe:
            httpGet: {path: /ready, port: 80}
            periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: not-ready
spec:
  selector: {app: not-ready}
  ports:
    - port: 80
---
# 7. menu
apiVersion: apps/v1
kind: Deployment
metadata:
  name: menu
spec:
  replicas: 1
  selector:
    matchLabels: {app: menu}
  template:
    metadata:
      labels: {app: menu}
    spec:
      containers:
        - name: web
          image: nginx:1.27-alpine
---
apiVersion: v1
kind: Service
metadata:
  name: menu
spec:
  selector: {app: menus}
  ports:
    - port: 80

Give them their own namespace, so cleaning up is one command, and wait a minute and a half for them to fail:

BASH
kubectl create namespace mysteries
kubectl apply -n mysteries -f mysteries.yaml
OUTPUT
deployment.apps/typo created
deployment.apps/crash created
deployment.apps/greedy created
deployment.apps/too-big created
deployment.apps/missing-config created
deployment.apps/not-ready created
service/not-ready created
deployment.apps/menu created
service/menu created

Everything was accepted: stage 1 passed for all seven. A typo in the YAML's structure would have failed right here, with an error from kubectl apply. These are mistakes the API server can't see.

Step 1: which stage?

BASH
kubectl get pods -n mysteries
OUTPUT
NAME                              READY   STATUS                       RESTARTS      AGE
crash-85f877779c-m9l5r            0/1     Error                        3 (73s ago)   90s
greedy-75df67ffdd-kknvm           0/1     OOMKilled                    3 (74s ago)   90s
menu-56cb4cc4c4-qg4qq             1/1     Running                      0             90s
missing-config-7f5968cc5c-j5wwn   0/1     CreateContainerConfigError   0             90s
not-ready-84d768d7f7-vmwf4        0/1     Running                      0             90s
too-big-58bfc7f87b-lnnvj          0/1     Pending                      0             90s
typo-dbb9dc4d8-smncs              0/1     ImagePullBackOff             0             90s

One command, and six of the seven have already said which stage they stopped at:

AppStatusStopped atSo look at
too-bigPending2. Scheduleddescribe, Events
typoImagePullBackOff3. Image pulleddescribe, Events
missing-configCreateContainerConfigError4. Container createddescribe, Events
crashError, restarts climbing5. Runninglogs
greedyOOMKilled, restarts climbing5. Runningdescribe, Last State; then logs
not-readyRunning, 0/16. Readydescribe, Events
menuRunning, 1/1Looks fineThe pod is fine. The problem is after it: stage 7.

crash says Error, not CrashLoopBackOff. The status flips between the two: Error while the container has just exited, CrashLoopBackOff while Kubernetes waits, longer each time, before restarting it. The tell is the RESTARTS column climbing, not the exact word.

1. typo: the image doesn't exist

BASH
kubectl describe pod -n mysteries -l app=typo

The Events, at the bottom:

OUTPUT
Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  90s                default-scheduler  Successfully assigned mysteries/typo-dbb9dc4d8-smncs to learn-worker
  Normal   BackOff    11s (x5 over 88s)  kubelet            Back-off pulling image "nginx:1.27-alpne"
  Warning  Failed     11s (x5 over 88s)  kubelet            Error: ImagePullBackOff
  Normal   Pulling    0s (x4 over 90s)   kubelet            Pulling image "nginx:1.27-alpne"
  Warning  Failed     0s (x4 over 89s)   kubelet            Failed to pull image "nginx:1.27-alpne": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/nginx:1.27-alpne": failed to resolve reference "docker.io/library/nginx:1.27-alpne": docker.io/library/nginx:1.27-alpne: not found
  Warning  Failed     0s (x4 over 89s)   kubelet            Error: ErrImagePull

Scheduled passed; the pull failed with not found. alpne for alpine. Read the From column too: default-scheduler did its part, and the kubelet on the node is the one reporting the problem. x5 over 88s means the same event happened five times; Kubernetes keeps trying, waiting longer each time, which is the "BackOff". Other messages at this stage mean other causes: unauthorized or pull access denied is a private image without credentials, and a timeout is a node that can't reach the registry.

Fix the image, and watch the Deployment replace the broken pod:

BASH
kubectl set image -n mysteries deploy/typo web=nginx:1.27-alpine
kubectl rollout status -n mysteries deploy/typo --timeout=120s
kubectl get pods -n mysteries -l app=typo
OUTPUT
deployment.apps/typo image updated
Waiting for deployment "typo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "typo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "typo" rollout to finish: 1 old replicas are pending termination...
deployment "typo" successfully rolled out
NAME                    READY   STATUS        RESTARTS   AGE
typo-5b74f56779-j6ccz   1/1     Running       0          3s
typo-dbb9dc4d8-smncs    0/1     Terminating   0          101s

In real life, fix it in the YAML file, not with set image, or the next kubectl apply puts the typo back.

2. crash: the program gives up

The Events only say it keeps restarting:

OUTPUT
Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  90s                default-scheduler  Successfully assigned mysteries/crash-85f877779c-m9l5r to learn-worker2
  Normal   Pulled     49s (x4 over 88s)  kubelet            Container image "busybox:1.37" already present on machine and can be accessed by the pod
  Normal   Created    49s (x4 over 88s)  kubelet            Container created
  Normal   Started    49s (x4 over 88s)  kubelet            Container started
  Warning  BackOff    48s (x3 over 86s)  kubelet            Back-off restarting failed container menu in pod crash-85f877779c-m9l5r_mysteries(350ede8c-e647-41bb-81cf-eeb23d3e2350)

Stages 2 to 4 all passed: scheduled, pulled, created, started. This is the first app where the logs have the answer, because this is the first one where your program ran:

BASH
kubectl logs -n mysteries deploy/crash
kubectl logs -n mysteries deploy/crash --previous
OUTPUT
starting the menu service
error: MENU_DB is not set
unable to retrieve container logs for containerd://052e80b4f365f5e6d6e3e96d3ea75633c941ec3633ebacced01b21130f5106a0

The plain kubectl logs had it: a setting called MENU_DB is missing. --previous, the usual advice for a crashing container, failed here, on both runs of this lab. While a crashed container is waiting to be restarted, plain logs already shows that last attempt; --previous asks for the one before it, which the node may have cleaned away. Try plain logs first, then --previous, and never decide there are no logs from one empty answer.

The fix is in the app's settings, not in Kubernetes: give it MENU_DB with an env entry or a ConfigMap (Lesson 7).

3. greedy: out of memory

BASH
kubectl describe pod -n mysteries -l app=greedy

This time the clue is higher up than the Events, under the container's Last State and Limits:

OUTPUT
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
      Started:      Sat, 14 Nov 2026 21:11:24 -0500
      Finished:     Sat, 14 Nov 2026 21:11:24 -0500
    Ready:          False
    Restart Count:  3
    Limits:
      memory:  64Mi

OOMKilled, exit code 137: it used more memory than its 64 MiB limit, and the node's kernel stopped it (Lesson 9). OOM means out of memory. It started and finished in the same second. The logs show how far it got:

BASH
kubectl logs -n mysteries deploy/greedy
OUTPUT
building the daily report

It printed its first line and was killed before it could print done, because it tried to hold 200 MB. There are two fixes, and choosing between them is the real work: raise the limit, if the app genuinely needs that much, or fix the app, if it shouldn't. Raising limits until the restarts stop is how clusters fill up.

4. too-big: no node has room

BASH
kubectl describe pod -n mysteries -l app=too-big
OUTPUT
Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  91s   default-scheduler  0/3 nodes are available: 1 node(s) had untolerated taint(s), 2 Insufficient cpu. no new claims to deallocate, preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.

Stopped at stage 2, and the scheduler says why for every node: the control-plane node has a taint that keeps ordinary apps off it (Lesson 2), and the two workers don't have enough CPU. Preemption is not helpful means even evicting less important pods wouldn't make room. This pod asks for 64 CPUs. kubectl describe nodes shows what each node can offer; for each worker, the lines that matter are:

OUTPUT
Allocatable:
  cpu:                16

Sixteen, the CPUs Docker Desktop gives the kind nodes on this laptop; yours may differ. No node will ever fit 64, so the pod will wait forever without an error. Lower the request to what the app needs, as Lesson 9 measured, or add bigger nodes.

5. missing-config: a setting that isn't there

OUTPUT
Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  91s                default-scheduler  Successfully assigned mysteries/missing-config-7f5968cc5c-j5wwn to learn-worker2
  Normal   Pulled     12s (x8 over 89s)  kubelet            Container image "nginx:1.27-alpine" already present on machine and can be accessed by the pod
  Warning  Failed     12s (x8 over 89s)  kubelet            Error: configmap "bakery-settings" not found

Pulled, then stopped at stage 4: the container can't be created without the ConfigMap it names. The app never started, so there are no logs at all. Check the names with kubectl get configmaps -n mysteries: either create bakery-settings, or fix the name in the Deployment. The same error appears for a missing Secret, or a missing key inside one. Kubernetes keeps retrying, so the pod starts by itself once the ConfigMap exists.

6. not-ready: running, but no traffic

OUTPUT
Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  91s                default-scheduler  Successfully assigned mysteries/not-ready-84d768d7f7-vmwf4 to learn-worker
  Normal   Pulled     91s                kubelet            Container image "nginx:1.27-alpine" already present on machine and can be accessed by the pod
  Normal   Created    91s                kubelet            Container created
  Normal   Started    91s                kubelet            Container started
  Warning  Unhealthy  90s                kubelet            Readiness probe failed: Get "http://10.244.1.6:80/ready": dial tcp 10.244.1.6:80: connect: connection refused
  Warning  Unhealthy  3s (x19 over 89s)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 404

Two different failures, a second apart. The first check came before nginx was listening: connection refused, normal while an app starts. Every check after that got 404: nginx is up, and there's no page called /ready. The app is fine; the check is wrong (Lesson 6).

Now look at it from the Service's side. This is where it gets subtle:

BASH
kubectl get endpointslices -n mysteries -l kubernetes.io/service-name=not-ready
kubectl get endpointslices -n mysteries -l kubernetes.io/service-name=not-ready -o custom-columns='ADDRESS:.endpoints[*].addresses[0],READY:.endpoints[*].conditions.ready'
OUTPUT
NAME              ADDRESSTYPE   PORTS   ENDPOINTS    AGE
not-ready-89zjm   IPv4          80      10.244.1.6   91s
ADDRESS      READY
10.244.1.6   false

The endpoint slice lists the pod's address, even though it's not ready; it's marked READY false, which the default view doesn't show. So "the Service has endpoints" doesn't mean it has any it will use. A request proves it, from a throwaway pod inside the cluster:

BASH
kubectl run curl0 -n mysteries --image=curlimages/curl:8.11.1 --restart=Never --rm -i --quiet -- curl -sS -m 5 http://not-ready
OUTPUT
curl: (7) Failed to connect to not-ready port 80 after 10 ms: Could not connect to server
pod mysteries/curl0 terminated (Error)

7. menu: the pod is fine, the Service isn't

menu passed every check so far: Running, 1/1, no warnings. Stages 1 to 6 are fine. So test stage 7:

BASH
kubectl get endpointslices -n mysteries -l kubernetes.io/service-name=menu
kubectl get service menu -n mysteries -o wide
kubectl get pods -n mysteries -l app=menu --show-labels
OUTPUT
NAME         ADDRESSTYPE   PORTS     ENDPOINTS   AGE
menu-vz844   IPv4          <unset>   <unset>     95s
NAME   TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE   SELECTOR
menu   ClusterIP   10.96.14.238   <none>        80/TCP    95s   app=menus
NAME                    READY   STATUS    RESTARTS   AGE   LABELS
menu-56cb4cc4c4-qg4qq   1/1     Running   0          95s   app=menu,pod-template-hash=56cb4cc4c4

No endpoints at all, because the Service looks for app=menus and the pod is labeled app=menu. One letter. Nothing anywhere reports an error: the Service is valid, the pod is healthy, they just never meet. A request fails in 2 ms:

BASH
kubectl run curl -n mysteries --image=curlimages/curl:8.11.1 --restart=Never --rm -i --quiet -- curl -sS -m 5 http://menu
OUTPUT
curl: (7) Failed to connect to menu port 80 after 2 ms: Could not connect to server
pod mysteries/curl terminated (Error)

Fix the selector, and the pod appears straight away:

BASH
kubectl patch service menu -n mysteries -p '{"spec":{"selector":{"app":"menu"}}}'
kubectl get endpointslices -n mysteries -l kubernetes.io/service-name=menu
kubectl run curl2 -n mysteries --image=curlimages/curl:8.11.1 --restart=Never --rm -i --quiet -- curl -sS -m 5 http://menu
OUTPUT
service/menu patched
NAME         ADDRESSTYPE   PORTS   ENDPOINTS    AGE
menu-vz844   IPv4          80      10.244.1.8   106s
<title>Welcome to nginx!</title>

The curl output above is trimmed to nginx's page title.

Empty endpoints means the selector matches nothing. Endpoints marked not ready means they match, and fail their readiness check. Between them, mysteries 6 and 7 cover most "the Service doesn't work" problems; the rest are a wrong port, so check that the Service's targetPort is the port the app listens on.

Step 4: the whole story

When one pod's events aren't enough, the namespace's events, oldest first, show everything that happened, across every object:

BASH
kubectl get events -n mysteries --sort-by=.lastTimestamp

A few of the 55 lines it printed:

OUTPUT
LAST SEEN   TYPE      REASON              OBJECT                                 MESSAGE
98s         Normal    ScalingReplicaSet   deployment/typo                        Scaled up replica set typo-dbb9dc4d8 from 0 to 1
98s         Normal    SuccessfulCreate    replicaset/typo-dbb9dc4d8              Created pod: typo-dbb9dc4d8-smncs
98s         Normal    Scheduled           pod/typo-dbb9dc4d8-smncs               Successfully assigned mysteries/typo-dbb9dc4d8-smncs to learn-worker
8s          Warning   Failed              pod/typo-dbb9dc4d8-smncs               Failed to pull image "nginx:1.27-alpne": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/nginx:1.27-alpne": failed to resolve reference "docker.io/library/nginx:1.27-alpne": docker.io/library/nginx:1.27-alpne: not found
0s          Warning   FailedScheduling    pod/too-big-58bfc7f87b-lnnvj           0/3 nodes are available: 1 node(s) had untolerated taint(s), 2 Insufficient cpu. no new claims to deallocate, preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.

The Deployment made a ReplicaSet, which made a pod, which was scheduled, which failed to pull. Add --field-selector type=Warning to see only the problems. Events are only kept for about an hour, so for a problem from last night, they're gone; that's what the logging and monitoring tools in other tracks are for.

Clean up the seven apps:

BASH
kubectl delete namespace mysteries

When the cluster itself is broken

So far, each app was broken in its own way. When several unrelated apps break at once, suspect the cluster, not the apps: a node, DNS, or a control-plane part. Check the cluster before opening any one app's logs:

BASH
kubectl get nodes
kubectl get pods -n kube-system

Every node should be Ready, and every pod in kube-system Running. The four scenarios below break a part of your kind cluster on purpose, show how it looks, then fix it. Give their test apps a namespace of their own:

BASH
kubectl create namespace cluster-mysteries
``` Each kind node is a Docker container, so `docker exec` reaches inside it the way SSH would reach a real server.

<Callout tone="warning" label="Only break a cluster you can throw away">
**Run these on your kind cluster, `learn`, and nowhere else.** They stop a node's kubelet, take DNS away and break the scheduler. Check `kubectl config current-context` says `kind-learn` before each one. If anything goes wrong, `kind delete cluster --name learn` and a new cluster put everything right.
</Callout>

### 8. A node goes NotReady

Stop the kubelet, the agent that runs pods on a node, as if the node had crashed or lost its network:

```bash
docker exec learn-worker systemctl stop kubelet

Wait a minute, then:

BASH
kubectl get nodes
kubectl describe node learn-worker
OUTPUT
NAME                  STATUS     ROLES           AGE     VERSION
learn-control-plane   Ready      control-plane   8m46s   v1.35.0
learn-worker          NotReady   <none>          8m37s   v1.35.0
learn-worker2         Ready      <none>          8m37s   v1.35.0

The node's Conditions, from describe:

OUTPUT
Conditions:
  Type             Status    LastHeartbeatTime                 LastTransitionTime                Reason              Message
  ----             ------    -----------------                 ------------------                ------              -------
  MemoryPressure   Unknown   Sat, 14 Nov 2026 21:11:37 -0500   Sat, 14 Nov 2026 21:13:53 -0500   NodeStatusUnknown   Kubelet stopped posting node status.
  DiskPressure     Unknown   Sat, 14 Nov 2026 21:11:37 -0500   Sat, 14 Nov 2026 21:13:53 -0500   NodeStatusUnknown   Kubelet stopped posting node status.
  PIDPressure      Unknown   Sat, 14 Nov 2026 21:11:37 -0500   Sat, 14 Nov 2026 21:13:53 -0500   NodeStatusUnknown   Kubelet stopped posting node status.
  Ready            Unknown   Sat, 14 Nov 2026 21:11:37 -0500   Sat, 14 Nov 2026 21:13:53 -0500   NodeStatusUnknown   Kubelet stopped posting node status.

Every condition is Unknown, not False: the control plane hasn't heard from the node, so it doesn't know. "Kubelet stopped posting node status." The last heartbeat time says exactly when it went quiet. Kubernetes marks a node NotReady after about 40 seconds of silence, and about 5 minutes later starts moving its pods to other nodes, so a short blip doesn't reshuffle the cluster.

On a real server you'd SSH in and look at the kubelet, which is what this does:

BASH
docker exec learn-worker systemctl status kubelet
OUTPUT
○ kubelet.service - kubelet: The Kubernetes Node Agent
     Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; preset: enabled)
     Drop-In: /etc/systemd/system/kubelet.service.d
             └─10-kubeadm.conf, 11-kind.conf

The empty circle means stopped. On a real node, journalctl -u kubelet would say why: an expired certificate, a full disk, a broken configuration file. Start it again:

BASH
docker exec learn-worker systemctl start kubelet
kubectl wait --for=condition=Ready node/learn-worker --timeout=120s
OUTPUT
node/learn-worker condition met

The node keeps a record: its Events now include Node learn-worker status is now: NodeNotReady.

9. DNS stops working

Take away the cluster's DNS server, CoreDNS, by scaling it to zero:

BASH
kubectl -n kube-system scale deployment coredns --replicas=0
kubectl run dns-test -n cluster-mysteries --image=busybox:1.37 --restart=Never --rm -i --quiet -- nslookup kubernetes.default.svc.cluster.local
OUTPUT
deployment.apps/coredns scaled
nslookup: write to '10.96.0.10': Connection refused
;; connection timed out; no servers could be reached

pod cluster-mysteries/dns-test terminated (Error)

Every pod is still Running, and nothing can find anything by name. That's what makes a DNS failure confusing: apps fail with "unknown host" or connection errors, and their pods look perfect. 10.96.0.10 is the cluster's DNS Service, and it has nothing behind it:

BASH
kubectl get pods -n kube-system -l k8s-app=kube-dns
kubectl get endpointslices -n kube-system -l kubernetes.io/service-name=kube-dns
OUTPUT
No resources found in kube-system namespace.
NAME             ADDRESSTYPE   PORTS     ENDPOINTS   AGE
kube-dns-sd6cl   IPv4          <unset>   <unset>     21m

The same empty endpoints as mystery 7, this time on a system Service. Bring CoreDNS back:

BASH
kubectl -n kube-system scale deployment coredns --replicas=2
kubectl -n kube-system rollout status deployment coredns --timeout=120s
kubectl run dns-test2 -n cluster-mysteries --image=busybox:1.37 --restart=Never --rm -i --quiet -- nslookup kubernetes.default.svc.cluster.local
OUTPUT
deployment.apps/coredns scaled
Waiting for deployment "coredns" rollout to finish: 0 of 2 updated replicas are available...
Waiting for deployment "coredns" rollout to finish: 1 of 2 updated replicas are available...
deployment "coredns" successfully rolled out
Server:		10.96.0.10
Address:	10.96.0.10:53

Name:	kubernetes.default.svc.cluster.local
Address: 10.96.0.1

Wait a few seconds after a fix before deciding it didn't work. In one run of this lab, the lookup straight after the rollout was still refused; in another, it answered on the first try, 2 seconds later. Pods being ready and every node routing traffic to them are two steps, a moment apart. Use the full name, too: busybox's nslookup doesn't add the cluster's search domains, so kubernetes.default on its own fails even when DNS is fine, which an earlier version of this lab found the hard way.

10. The scheduler goes down

The control plane's own parts run as pods in kube-system, started from files on the control-plane node, called static pod manifests. The kubelet watches that folder and runs whatever's in it. Back up the scheduler's file, then put a one-word typo in it:

BASH
docker exec learn-control-plane cp /etc/kubernetes/manifests/kube-scheduler.yaml /root/kube-scheduler.yaml.bak
docker exec learn-control-plane sed -i 's/--leader-elect=true/--leader-elect=ture/' /etc/kubernetes/manifests/kube-scheduler.yaml

Wait 40 seconds, then create an app and look at it:

BASH
kubectl create deployment bread -n cluster-mysteries --image=nginx:1.27-alpine
kubectl get pods -n cluster-mysteries
kubectl describe pod -n cluster-mysteries -l app=bread
OUTPUT
NAME                     READY   STATUS    RESTARTS   AGE
bread-75cf68d78f-nrtxf   0/1     Pending   0          21s

And the Events, in full:

OUTPUT
Events:                      <none>

Pending, with no events at all, and that silence is the clue. In mystery 4, the scheduler explained why it couldn't place the pod. Here, nothing has even tried. When a pod is Pending and no FailedScheduling event appears, check the scheduler:

BASH
kubectl get pods -n kube-system -l component=kube-scheduler
kubectl logs -n kube-system kube-scheduler-learn-control-plane --tail=5
OUTPUT
NAME                                 READY   STATUS             RESTARTS      AGE
kube-scheduler-learn-control-plane   0/1     CrashLoopBackOff   3 (10s ago)   46s

  -h, --help                     help for kube-scheduler
      --version version[=true]   --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

Error: invalid argument "ture" for "--leader-elect" flag: strconv.ParseBool: parsing "ture": invalid syntax

The checklist works on Kubernetes itself: the scheduler's pod is in CrashLoopBackOff, stage 5, so its logs have the answer, word for word. The fix goes in the file, not through kubectl: editing a static pod with kubectl doesn't stick, because the kubelet rebuilds it from the file.

BASH
docker exec learn-control-plane cp /root/kube-scheduler.yaml.bak /etc/kubernetes/manifests/kube-scheduler.yaml
kubectl rollout status deployment bread -n cluster-mysteries --timeout=180s
OUTPUT
Waiting for deployment "bread" rollout to finish: 0 of 1 updated replicas are available...
deployment "bread" successfully rolled out

The waiting pod was scheduled as soon as the scheduler came back. If the API server itself goes down, kubectl can't answer at all; then you'd run crictl ps -a on the control-plane node, which talks to the container runtime directly.

11. Every node says keep out

Taint both workers, as you might to stop new work landing on them before maintenance:

BASH
kubectl taint nodes learn-worker bakery=closed:NoSchedule
kubectl taint nodes learn-worker2 bakery=closed:NoSchedule
kubectl create deployment rolls -n cluster-mysteries --image=nginx:1.27-alpine
kubectl describe pod -n cluster-mysteries -l app=rolls
OUTPUT
node/learn-worker tainted
node/learn-worker2 tainted
deployment.apps/rolls created
Events:
  Type     Reason            Age   From               Message
  ----     ------            ----  ----               -------
  Warning  FailedScheduling  15s   default-scheduler  0/3 nodes are available: 3 node(s) had untolerated taint(s). no new claims to deallocate, preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.

The same message every pod got on a brand-new cluster, earlier in the lesson. "Untolerated taint" means a node has a keep-out sign the pod doesn't tolerate. kubectl describe nodes shows each node's taints, one line near the top:

OUTPUT
Taints:             node-role.kubernetes.io/control-plane:NoSchedule
Taints:             bakery=closed:NoSchedule
Taints:             bakery=closed:NoSchedule

The control plane's own taint, and the two you added. Remove them, with a minus sign on the end, and the pod starts:

BASH
kubectl taint nodes learn-worker bakery=closed:NoSchedule-
kubectl taint nodes learn-worker2 bakery=closed:NoSchedule-
kubectl rollout status deployment rolls -n cluster-mysteries --timeout=120s
OUTPUT
node/learn-worker untainted
node/learn-worker2 untainted
Waiting for deployment "rolls" rollout to finish: 0 of 1 updated replicas are available...
deployment "rolls" successfully rolled out

In real clusters this happens after kubectl drain or kubectl cordon for maintenance, when someone forgets to uncordon afterwards, and on brand-new nodes, which carry node.kubernetes.io/not-ready until their networking is up.

Habits that save hours

  • Find the stage before reading anything else. kubectl get pods first, every time.
  • Read the whole event message. "Insufficient cpu" and "untolerated taint" are both FailedScheduling; the fix is in the words after.
  • Ask what changed last. A new image, a new setting, a new node. Most outages follow a change, and kubectl rollout history shows a Deployment's.
  • Change one thing at a time, and check after each, or you won't know which change fixed it.
  • Wait a few seconds after a fix, then check again. DNS answered 2 seconds after one rollout, and not straight away in another.
  • Several things broken at once? Check the cluster first: nodes, then kube-system.
  • Running isn't working. menu was Running 1/1 the whole time it was unreachable.

Clean up

BASH
kubectl delete namespace cluster-mysteries
kind delete cluster --name learn

That's the end of Kubernetes basics. You've gone from what Kubernetes solves to running apps, connecting them, letting the outside world in, and now finding out why when something doesn't work. The kubectl cheatsheet has this lesson's commands next to the rest of the track's.

Check yourself

  1. A pod shows ImagePullBackOff. Why won't kubectl logs help?

  2. A pod is Pending. Where do you look first?

  3. kubectl logs --previous failed for a crashing app. What should you try?

  4. A Service's endpoint slice lists a pod's address, but requests fail. Why might that be?

  5. A new pod is Pending, and describe shows no events at all. What's the likely cause?

  6. Every pod is Running, but apps fail with unknown host errors. What do you check?

  7. A node's Ready condition says Unknown. What does that tell you?

Key terms

  • Event: a short record of something that happened to an object, like a failed pull or a scheduling decision. Kept for about an hour.
  • Last State: in kubectl describe, how a container's previous run ended: its reason and exit code.
  • Exit code 137: a container killed by the system, usually for using too much memory (OOMKilled).
  • Back-off: waiting longer between each retry, for image pulls and container restarts.
  • EndpointSlice: the list of pod addresses behind a Service, each marked ready or not.
  • Static pod: a pod the kubelet runs from a file on its node, like the control plane's own parts.
  • Node condition: a node's health report: Ready, MemoryPressure, DiskPressure, PIDPressure.
  • Taint: a node's keep-out sign; only pods that tolerate it can be scheduled there.
  • CoreDNS: the cluster's DNS server, behind the kube-dns Service.

Go deeper