ImagePullBackOff means that the kubelet cannot download the container image
from the registry. The pod is assigned to a node (it is no longer Pending),
but creating the container fails because the image is not found, not reachable
or refused. This guide gives you a 4-step method to identify the cause and
unblock the deployment.
What you will learn
- Understand the difference between
ErrImagePullandImagePullBackOff - Identify the 7 main causes of an image pull failure
- Apply a repeatable diagnostic method in 4 steps
- Configure
imagePullSecretsfor a private registry - Reproduce and fix an ImagePullBackOff on a test cluster
Prerequisites
- A working Kubernetes cluster on 1.37, the version the course teaches
kubectlconfigured and connected to the cluster- Read access to pods and events
- Basic knowledge of Pods and container images
What is an ImagePullBackOff?
When the kubelet tries to download an image and fails, it goes through two successive states:
| State | Meaning |
|---|---|
ErrImagePull | The pull has just failed, this is the first attempt (or a new attempt after a backoff) |
ImagePullBackOff | The kubelet has already failed and waits before retrying, this is the exponential backoff |
These two states alternate in a loop: the kubelet tries
(ErrImagePull), fails, waits (ImagePullBackOff), then
retries. The waiting delay increases after each failure, following an
exponential backoff. The official documentation does not publish the
exact durations, unlike what it does for CrashLoopBackOff.
The image pull process
When the kubelet has to start a container, it follows these steps:
- Check the local cache: does the image already exist on the node?
- Resolve the image name: add
docker.io/library/if there is no explicit registry, and:latestif there is no tag - Authenticate: if an
imagePullSecretis configured, the kubelet uses it to authenticate against the registry - Download the image: pull the missing layers
- Check integrity: validation of the SHA256 digest
If one of these steps fails, the kubelet emits a Failed event with the
error details, and the pod goes into ErrImagePull.
The imagePullPolicy decides whether step 4 takes place at all, and it has a
direct consequence on the diagnosis. With Never, the kubelet never
contacts the registry: if the image is not already on the node, the Pod
does not go into ImagePullBackOff but into ErrImageNeverPull, a
distinct status that means nothing was attempted. Checking the registry, the
credentials or the network is then pointless. The details of the three
policies and of their default values are covered in
Manage container images.
The 7 main causes
The column to use first is Typical error message: it is what sorts the
causes, not the description of the cause. The kubelet copies the registry's
answer verbatim into the pod's event, which makes the diagnosis almost
mechanical. Note that causes 1 and 6 produce the same message
(manifest unknown), because the registry does not tell a tag that never
existed from a deleted tag; the history of your publishing pipeline settles it.
Cause 7 is harder to spot: the image exists, so does the tag, but no
variant matches the architecture of the node, which happens in mixed
fleets (amd64 and arm64 nodes).
| # | Cause | Typical error message | Where to look |
|---|---|---|---|
| 1 | Incorrect image tag or name | manifest unknown, not found | kubectl describe pod → Events |
| 2 | Private registry without authentication | unauthorized, authentication required | kubectl describe pod → Events |
| 3 | Missing or invalid imagePullSecret | no basic auth credentials, unauthorized | kubectl describe pod → Events + kubectl get secret |
| 4 | Unreachable registry (network) | dial tcp: i/o timeout, no such host | kubectl describe pod → Events |
| 5 | Docker Hub pull limit | toomanyrequests, rate limit exceeded | kubectl describe pod → Events |
| 6 | Deleted image or tag | manifest unknown, not found | kubectl describe pod → Events |
| 7 | Incompatible architecture | no matching manifest for linux/amd64 | kubectl describe pod → Events |
4-step diagnostic method
-
Identify the pods in ImagePullBackOff
Terminal window kubectl get pods -A | grep -E 'ImagePull|ErrImage'You can also filter the failed pull events:
Terminal window kubectl get events -A --field-selector reason=Failed --sort-by='.lastTimestamp' | grep -i pullNote the pod name, its namespace and how long it has been in this state.
-
Read the exact error message
Terminal window kubectl describe pod <pod> -n <namespace>Go straight to the Events section and look for the
FailedorWarninglines. The message holds the essential information. Examples:Failed to pull image "my-registry.example.com/app:v2.1":rpc error: code = Unknown desc = failed to pull and unpack image:failed to resolve reference: pull access denied, repository does notexist or may require authorizationThis message tells you: the registry is private and the kubelet does not have the credentials.
Failed to pull image "nginx:v99":rpc error: code = NotFound desc = failed to pull and unpack image:failed to resolve reference: docker.io/library/nginx:v99:not foundThis one: the
v99tag does not exist on Docker Hub. -
Check the image and the authentication
Check that the image exists:
Look at the web interface or the API of the registry concerned (Docker Hub, Harbor, GitLab Registry, ECR) to confirm that the tag exists and that it is available for the architecture of your nodes. To test the download directly from a node, use
crictl:Terminal window # Test the pull from the node (via a debug Pod or over SSH)crictl pull my-registry.example.com/app:v2.1Check the imagePullSecret:
Terminal window # Does the secret exist in the pod's namespace?kubectl get secret -n <namespace> | grep docker# Does the pod reference the secret?kubectl get pod <pod> -n <namespace> -o jsonpath='{.spec.imagePullSecrets}'If the pod has no
imagePullSecretsand the registry is private, that is the cause of the problem.Check network connectivity (from the context of a node):
kubectl debug node/creates a diagnostic Pod attached to the target node. From that Pod, you test DNS resolution and network connectivity in the node's network context, the only place where the test makes sense:Terminal window kubectl debug node/<node-name> -it --image=busybox:1.37@sha256:a7dbc319b1438115a207e11930dc4bb3e643dcb3ec0bdd694bb36cd8fad289ec# Once in the shell of the debug Pod:nslookup my-registry.example.comwget -q --spider https://my-registry.example.com/v2/ && echo "OK" || echo "UNREACHABLE" -
Fix and verify
Depending on the cause identified:
Cause Corrective action Incorrect tag Fix the tag in the manifest (check on the registry) Private registry without auth Create an imagePullSecretand reference it in the podInvalid secret Recreate the secret with the right credentials Unreachable registry Check the DNS, the firewall, the node's proxy Docker Hub rate limit Authenticate the pulls or use a mirror Deleted image or tag Fix the tag or rebuild/repush the image Incompatible architecture Rebuild the image for the target architecture or use a multi-arch manifest After the fix, the pod retries the pull automatically. If you want to force an immediate re-pull:
Terminal window kubectl delete pod <pod> -n <namespace>The controller (Deployment, StatefulSet...) will recreate a pod that attempts the pull with the new parameters.
Configure an imagePullSecret
A common cause is the absence of credentials for a private registry. Here is the complete procedure:
Create the secret
The docker-registry type produces a Secret in the kubernetes.io/dockerconfigjson
format, that is exactly the content of a ~/.docker/config.json file that the
kubelet knows how to consume. The --docker-server field must contain the
same host as the one written in the pod's image field: if the image is
my-registry.example.com/app:v2.1, a secret created for
https://my-registry.example.com/v2/ will not be matched and the pull will
stay refused. For --docker-password, prefer a revocable access token
rather than the account password.
read -rsp 'Registry token: ' REGISTRY_TOKEN && echokubectl create secret docker-registry my-registry-secret \ --docker-server=my-registry.example.com \ --docker-username=my-user \ --docker-password="$REGISTRY_TOKEN" \ --docker-email=admin@example.com \ -n <namespace>unset REGISTRY_TOKENReading with read -rs avoids writing the token in clear text in the shell
history and in the process table, where any ps aux on the machine would show
it. The Secret itself is not encrypted in etcd by default, it is only
encoded in base64: hardening goes through encryption at rest on the API
server side.
Reference the secret in the pod
The imagePullSecrets field is declared at the level of the pod, not of the
container, and therefore applies to all the containers of the pod, init
containers included. The referenced name must match a Secret present in the
same namespace: Kubernetes raises no validation error if the Secret is
missing, the pull simply fails as if there were no authentication.
apiVersion: v1kind: Podmetadata: name: private-appspec: imagePullSecrets: - name: my-registry-secret containers: - name: app image: my-registry.example.com/app:v2.1Automate with the ServiceAccount
To avoid adding imagePullSecrets to every pod, attach the secret to the
namespace's default ServiceAccount:
kubectl patch serviceaccount default -n <namespace> \ -p '{"imagePullSecrets": [{"name": "my-registry-secret"}]}'All the pods of the namespace that use the default ServiceAccount will
automatically inherit the secret.
One point not to discover during an incident: a Secret is scoped to a namespace. A Pod can only reference the Secrets of its own, so deploying the same application in three namespaces means creating the secret three times.
Practical examples: reproduce an ImagePullBackOff
Nothing beats a provoked failure for recognizing a real one. The three cases
below apply to a test cluster and each produces a different status and
message in kubectl describe. Above all, remember that not every image
failure ends in ImagePullBackOff: a syntactically invalid image name is
rejected before any pull attempt, under the InvalidImageName status, as
the third case shows.
Case 1: nonexistent tag
The manifest below is deliberately broken: this tag does not exist, and the image is therefore neither pinned nor pinnable. ❌ Deliberate counter-example, not to be copied anywhere else.
kubectl apply -f- <<'EOF'apiVersion: v1kind: Podmetadata: name: pull-bad-tag namespace: defaultspec: containers: - name: app image: nginx:nonexistent-versionEOFDiagnosis:
kubectl describe pod pull-bad-tag | tail -10You will see Failed to pull image "nginx:nonexistent-version" with
not found.
Case 2: private repository without credentials
To reproduce a real authentication refusal, you need to target a registry that answers, but on a repository that requires permissions. A path under a Docker Hub namespace that you do not own works: the registry is reachable, but it refuses access.
❌ Deliberate counter-example, like the previous one: this image must not be pinned, its inaccessibility being the whole point.
kubectl apply -f- <<'EOF'apiVersion: v1kind: Podmetadata: name: pull-no-auth namespace: defaultspec: containers: - name: app image: docker.io/stephanerobert/nonexistent-private-repo:v1EOFDiagnosis:
kubectl describe pod pull-no-auth | tail -10The message will contain pull access denied, repository does not exist or may require authorization followed by insufficient_scope: authorization failed.
Case 3: malformed image name
❌ Third deliberate counter-example. This one does not even get past the name validation: it differs from the two previous ones before any call to the registry.
kubectl apply -f- <<'EOF'apiVersion: v1kind: Podmetadata: name: pull-bad-name namespace: defaultspec: containers: - name: app image: "nginx ::latest"EOFDiagnosis:
kubectl describe pod pull-bad-name | tail -10This pod does not go into ImagePullBackOff: its status is
InvalidImageName, with the event Failed to apply default image tag "nginx ::latest": ... invalid reference format. The name is rejected at
validation, before the kubelet even attempts a pull. It is a neighboring
but distinct case, useful to know so that you do not look for a registry
problem where there is only a typo in the manifest.
Cleanup
These test Pods stay stuck indefinitely without ever starting: delete them
once you have observed them. The --force --grace-period=0 options avoid
waiting for a clean termination, which is pointless here since no container
has started.
kubectl delete pod pull-bad-tag pull-no-auth pull-bad-name --force --grace-period=0 2>/dev/nullSpecial cases
The three situations below share one trait: the manifest is correct, and yet the download fails. The cause is no longer in the Pod but in its environment: the node, the registry quota, or the state of the cache after an infrastructure operation. Recognizing them saves you from rereading ten times an image name that never had a problem.
ImagePullBackOff on a single node
If some pods start normally and others do not, the problem is probably local to the node:
- The node has no network connectivity to the registry (missing proxy, faulty DNS)
- The node's disk is full (no more room to store the layers)
- The container runtime has a configuration problem (containerd, CRI-O)
Open a diagnostic session on the affected node with kubectl debug node/<node-name>, then check the DNS resolution, the network connectivity
to the registry and the state of the container runtime. To inspect the latter,
use crictl:
# Interactive debug session on the nodekubectl debug node/<node-name> -it --image=busybox:1.37@sha256:a7dbc319b1438115a207e11930dc4bb3e643dcb3ec0bdd694bb36cd8fad289ec# From the debug pod, test connectivitynslookup my-registry.example.com# On the node (SSH or debug), inspect the runtimecrictl infocrictl images | grep my-imageDocker Hub rate limit
Docker Hub applies pull limits over a 6-hour window. An unauthenticated access is capped at 100 pulls per IPv4 address (or per IPv6 /64 subnet), a free authenticated Personal account at 200 pulls, while paid subscriptions (Pro, Team, Business) have no limit. In a cluster where several nodes go out behind the same public IP, these quotas are quickly reached, because they apply to the address, not to the node.
The error message contains toomanyrequests:
toomanyrequests: You have reached your pull rate limit.You may increase the limit by authenticating and upgrading:https://www.docker.com/increase-rate-limitSolutions:
- Authenticate the pulls with a Docker Hub account to get a higher limit
- Set up a registry mirror (Harbor, Nexus, registry:2)
- Use
imagePullPolicy: IfNotPresentto avoid unnecessary pulls
ImagePullBackOff after a cluster upgrade
An upgrade that changes the container runtime, for example from
Docker to containerd, can make you lose the local image cache. All the
Pods must then download their images again, which causes simultaneous
ImagePullBackOff errors if the registry or the network cannot take the
load.
Quick troubleshooting
When facing a stuck Pod, read the exact event first with
kubectl describe pod: it is what tells a badly named image from an
unreachable registry or an authentication refusal. The table
below starts from the visible symptom and gives the command that confirms
the cause.
| Symptom | First action | Command |
|---|---|---|
ImagePullBackOff + not found | Check the tag | kubectl describe pod <pod> → look for the exact image name |
ImagePullBackOff + unauthorized | Check the imagePullSecret | kubectl get pod <pod> -o jsonpath='{.spec.imagePullSecrets}' |
ImagePullBackOff + i/o timeout | Network problem | Test connectivity from the node to the registry |
ImagePullBackOff + toomanyrequests | Docker Hub rate limit | Authenticate the pulls or set up a mirror |
ErrImageNeverPull | imagePullPolicy: Never but image missing | Change the policy or preload the image on the node |
| Only one node in error | Problem local to the node | Check the node's disk, DNS, proxy and runtime |
Put it into practice
The useful message is neither in the logs nor in kubectl get pods, it is in the events. This lab has you read the exact message of the runtime, fix the image reference, and check that the server answers.
Key takeaways
ErrImagePullis the immediate error,ImagePullBackOffis the wait between two attempts, the two appear alternatelykubectl describe podis the key command, the error message in the Events holds the exact reason for the failure- The
:latesttag is a trap: if it is deleted from the registry, the new pods fail while the old ones keep working. Use explicit tags - For a private registry, you need an
imagePullSecretin the same namespace as the pod, remember to attach it to the ServiceAccount so you do not forget it - Docker Hub has a rate limit over a 6-hour window, authenticate your pulls or use a local mirror in production
- If the problem affects only one node, it is probably a local network, disk or runtime issue
- After the fix, the kubelet retries the pull automatically, if you want to force an immediate retry, delete the pod
Knowledge check
Seven questions on what tells the causes apart: the registry message, the DNS one, and the status that betrays a typo rather than an access problem.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Diagnose a Kubernetes control plane failure
A new full quiz with random questions
Work again only on the questions you missed