Debugging ImagePullBackOff on a private registry
registry auth and systematic debugging.
imagePullSecrets reference a dockerconfigjson Secret on the pod or service account, kubelet uses it to authenticate, and you inspect events to isolate auth versus name versus network errors.
What's really being asked
This checks both knowledge of the imagePullSecrets mechanism and a disciplined troubleshooting approach to ImagePullBackOff.
The full answer
Kubelet pulls images on the node and needs credentials for private registries. You create a Secret of type kubernetes.io/dockerconfigjson, typically with kubectl create secret docker-registry, holding the registry host, username, and password or token. You attach it via imagePullSecrets in the pod spec or, more durably, on the ServiceAccount the pod uses so all its pods inherit it. ImagePullBackOff means repeated pull failures with exponential backoff. Troubleshoot by running kubectl describe pod and reading the Events: the message distinguishes a not-found image or wrong tag, an authentication failure pointing at a missing or stale secret, and connection errors pointing at node networking or registry reachability. Verify the secret exists in the right namespace, decode it to confirm the host matches, and check token expiry for cloud registries.
The mistakes people make
Recreating the pod repeatedly without reading events. Putting the secret in the wrong namespace. Assuming a cluster-wide secret without referencing it. Confusing ImagePullBackOff with CrashLoopBackOff.
What usually comes next
What is the difference from CrashLoopBackOff? Why must the secret be in the pod's namespace? How do cloud registries avoid static secrets? What does the backoff schedule look like?
A concrete example
A pod shows ImagePullBackOff. kubectl describe pod reveals an event: failed to authorize, unauthorized. You check the secret and find imagePullSecrets references regcred but the Secret lives in a different namespace than the pod. You recreate the dockerconfigjson Secret in the pod's namespace, confirm the registry host string matches the image reference exactly, and the next pull succeeds.
Interview question
A pod is stuck in ImagePullBackOff. What is the most informative first troubleshooting step?
- a.Run kubectl describe pod and read the Events to see the exact failure reasonCorrect
- b.Switch the image tag to latest
- c.Delete and recreate the pod immediately
- d.Restart the kubelet on every node
Why? this is the answer
The Events section names the specific cause (auth, wrong name, or network), guiding the fix. Recreating blindly (C) or restarting kubelets (D) wastes time without diagnosis.
Just read this? Test yourself on what you have been reading.
Read the original → kubernetes.io
- #kubernetes
- #imagepullbackoff
- #secrets
- #registry
- #troubleshooting
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.
See open roles