Lab
Incident: The Worker Keeps Restarting
The worker Deployment is flapping — its restart count climbs by the second and it never stays up. Read what the container prints before it dies and fix why it exits.
Your mission
Ticket: the worker Deployment won't stay up. Its Pod's RESTARTS column is
climbing every few seconds and the status reads CrashLoopBackOff.
CrashLoopBackOff means the container does start — then exits — so Kubernetes keeps
restarting it with a growing back-off. That's different from an image or scheduling
problem: the container ran long enough to say something, so the answer is in its
logs.
kubectl get pods -n default # watch RESTARTS climb
kubectl logs -n default <pod> # what did it print before dying?
kubectl logs -n default <pod> --previous # ...on the last crashed instanceGet worker to stay running.
Useful aliases
In your terminal, k is aliased to kubectl and completion is configured. The
jumpbox also has k9s, jq and yq installed.
Skills you'll put into practice
troubleshootingincidentworkloadscka