Short answer: the STATUS column tells you which stage is stuck
Kubernetes failures look tangled, but most come apart quickly once you ask where the pod stopped: scheduling → image pull → start → Ready → Service → Ingress and DNS. If an earlier stage is blocked, skip the later ones. The starting point is always the same.
kubectl get pods -n shop -o wide
kubectl describe pod checkout-7d9f8-x2k1p -n shop # read Events at the bottom first
NAME READY STATUS RESTARTS AGE
checkout-7d9f8-x2k1p 0/1 CrashLoopBackOff 6 (40s ago) 9m
checkout-7d9f8-q8w2m 0/1 Pending 0 9m
payment-6f8d9-h2v7c 0/1 ImagePullBackOff 0 3m
orders-5c6b7-mz4tn 0/1 Running 0 12m
Pending — no node to place it on
The FailedScheduling line in Events is the reason. Insufficient cpu or Insufficient memory means no node has room for the requests; untolerated taint or didn't match Pod's node affinity/selector means rules filtered the nodes out; unbound immediate PersistentVolumeClaims means the volume is the problem.
kubectl describe node node-1 | grep -A8 "Allocated resources"
→ Pending: Insufficient cpu · GPU nodes exist but the workload won't schedule
ImagePullBackOff — the node cannot get the image
The text after Failed to pull image in Events picks the branch. not found is the name or tag; 401 Unauthorized or pull access denied is authentication (imagePullSecrets); i/o timeout or x509 is the network or certificates between the node and the registry. → ImagePullBackOff first checks
CrashLoopBackOff and OOMKilled — it starts, then dies
CrashLoopBackOff is not a cause; it only says "the restarts keep repeating". Look at the logs right before the crash and at the termination reason.
kubectl logs checkout-7d9f8-x2k1p -n shop --previous
kubectl describe pod checkout-7d9f8-x2k1p -n shop | grep -A4 "Last State"
Reason: OOMKilled (Exit Code: 137) is the memory limit; Exit Code: 1 is an application error (config, a dependency); Liveness probe failed in Events means the probe killed it. → CrashLoopBackOff first checks · OOMKilled (Exit Code 137)
Running but READY 0/1 · Service does not connect
Running does not mean healthy; it means the container is up. A pod that is not Ready is removed from its Service. A wrong probe path or port is common, as in Readiness probe failed: HTTP probe failed with statuscode: 404. If the pod is Ready and the Service still does not connect, check the endpoints.
kubectl get endpointslices -n shop -l kubernetes.io/service-name=orders
kubectl get svc orders -n shop -o jsonpath='{.spec.selector}'; kubectl get pods -n shop --show-labels
No endpoints means the selector does not match the pod labels. Endpoints present but connections refused means the Service targetPort differs from the container port. → Pod Running but traffic fails
Ingress 404 · name resolution fails
If the Service works from inside the cluster but outside requests get 404, check the Ingress host, path and ingressClassName. If you see no such host or a DNS i/o timeout, it is the DNS path (use a debug pod if the image has no nslookup).
kubectl describe ingress shop -n shop
kubectl exec -it checkout-7d9f8-x2k1p -n shop -- nslookup orders.shop.svc.cluster.local
→ Ingress 404 Not Found · CoreDNS Running but DNS fails
What not to do
- Deleting or restarting pods before you read the evidence — the previous container's logs disappear, and Events are kept for only one hour by default.
- Treating the status name as the cause and changing several manifests at once — you will not know which change fixed it.
The order to work in
- Use STATUS and READY from
kubectl get podsto find the stuck stage - Read the last lines of Events in
kubectl describe pod - If it fails to start, check
logs --previousandLast State - If it is Running but broken, go Ready → endpoints → Ingress and DNS
- After the fix, confirm with
kubectl rollout status
To practise this order as a problem, start with CrashLoopBackOff right after a ConfigMap change: same image, pods keep restarting.
Quick diagnostic checklist
- Use STATUS and READY from
kubectl get pods -o wideto find the stuck stage first. - Read the last lines of Events in
kubectl describe podbefore the logs. - For Pending, let the FailedScheduling text (Insufficient, taint, affinity, PVC) pick the branch.
- For ImagePullBackOff, read the text after
Failed to pull image(not found, 401, timeout). - For CrashLoopBackOff, check
kubectl logs --previousand the Reason and Exit Code inLast State. - For Running but READY 0/1, look for
Readiness probe failedin Events. - If the pod is Ready but connections fail, compare the EndpointSlice with the Service selector and targetPort.
- If only outside traffic gets 404, check the Ingress host, path and ingressClassName; if names do not resolve, check the DNS path.