A pod is stuck in `ImagePullBackOff`. Fix it.
BeginnerHands-onLive debugging tasks
Answer
kubectl describe pod web-5c8 | sed -n '/Events/,$p'
# "manifest unknown" -> wrong tag
# "pull access denied" / "401" -> private registry, missing imagePullSecret
# "no basic auth credentials" (ECR) -> node role lacks ECR read permission
# "i/o timeout" -> node has no route to the registry (NAT/VPC endpoint)
kubectl create secret docker-registry regcred --docker-server=ghcr.io \
--docker-username=bot --docker-password="$TOKEN"
kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"regcred"}]}'
Key trick → The exact event message tells you which of the four causes it is. Read it before changing anything.
More on Live debugging tasks
A pod is in CrashLoopBackOff. You have 10 minutes. Walk through your commands.BeginnerThe pod shows `OOMKilled`. Diagnose and fix it.BeginnerA pod is `Pending` forever. What do you check?AdvancedThe Service returns "connection refused" but pods are Running. Debug it.IntermediateA Docker container exits immediately after `docker run -d`. Find out why.Beginner`docker build` fails with "COPY failed: file not found in build context". Fix it.Beginner