Boss lesson · Unit 04
Release day goes wrong
Pending, ImagePullBackOff and CrashLoopBackOff, read to the cause.
What you practise
Pending,ImagePullBackOff,CrashLoopBackOff: readdescribe, events and logs to the cause- Packaging manifests in outline
Try a question from this lesson
Pick one
Three Pods are stuck after a release. Each status says how far its Pod got. Which Pod's container has started at least once?
$ kubectl get pods
NAME READY STATUS
api-7d9c6f8b-k4x2m 0/1 Pending
web-6b7f9c5d-x2k9q 0/1 ImagePullBackOff
job-5f8c7d6b-t7h5z 0/1 CrashLoopBackOffHint
To crash, a program must first run. Which of the other two words describe something that comes before running?
Correct answer
job, in CrashLoopBackOff
Why
A crash loop means the container started, exited, and was started again. The Pending Pod has no node yet, and the ImagePullBackOff Pod has a node but no image, so neither has run anything. The status tells you which stage to investigate.
The ideas
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Three ways to be stuck
A Pod starts in stages, and each failure has its own status and its own place to look.
Pending: no node has been chosen. Read the scheduler's events in describe.
ImagePullBackOff: the node cannot get the image. Read the events for the image name and the error.
CrashLoopBackOff: the container starts and exits, over and over. Read the logs.
BackOff means the kubelet is retrying with growing waits, up to five minutes apart.
stage stuck as read
schedule Pending describe
pull ImagePullBackOff describe
run CrashLoopBackOff logsConcept
Packaging manifests, in outline
A real app is a dozen manifests, needed again for staging and production with small differences. Copying the files lets them drift apart.
Two common tools avoid the copies. Kustomize, built into kubectl, keeps one base set of manifests and a small overlay of patches per environment. Helm packages manifests as templates with a file of values to fill in, called a chart.
Either way, the differences live in one small file per environment.
kubectl apply -k overlays/production10 more exercises in the app
- 1× match the pairs
- 5× multiple choice
- 1× type the answer
- 1× fill the blanks
- 1× true or false
- 1× order the lines
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.