ImagePullBackOff means the kubelet tried to pull a container’s image, failed, and is waiting before it tries again. ErrImagePull is the same failure as it happens; between attempts the pod shows ImagePullBackOff, and the wait grows each time, up to five minutes. The container never started, so there are no logs to read. The reason is in the pod’s events.
1. Read the pull error
kubectl get pods -n shop kubectl describe pod checkout-5c8d7-q2v9n -n shop
Two places in that output matter. Under the container, the Image line is the exact reference the kubelet used; read it character by character before anything else. At the bottom, under Events, a Failed event reads Failed to pull image "…": …, and the end of that line is the registry’s own answer. It is the part to fix.
2. What the message means
The wording varies a little between container runtimes and registries. With containerd the line starts failed to pull and unpack image, and the cause follows after the image name. Look for these words:
| The event says | Usually means |
|---|---|
not found, manifest unknown | That tag or digest does not exist in the repository: a typo, a tag that was never pushed because the build failed after the deploy changed, or an old tag a retention rule removed. |
pull access denied, repository does not exist or may require authorization | The registry would not show the repository to whoever asked. Either the name is wrong, or the repository is private and the pod sent no credentials. |
unauthorized, authentication required | Credentials were sent, but they do not allow a pull of that name: a wrong or expired password, a token without pull rights, or credentials for another registry. |
no match for platform in manifest | The image has no build for the node’s CPU, for example an amd64-only image on an arm64 node. Build a multi-arch image, or schedule the pod onto matching nodes. |
toomanyrequests | A pull rate limit for the address or the account. Pulling with credentials usually raises it; copying the image into a registry you control removes it. |
x509: certificate signed by unknown authority | The node does not trust the registry’s TLS certificate, common with a registry behind a private CA. The node’s container runtime needs that CA. |
i/o timeout, no such host | The node cannot reach the registry at all: DNS, an egress firewall rule, or a proxy the runtime does not know about. |
3. A pull secret that works
For a private image, the pod needs a secret of type kubernetes.io/dockerconfigjson, in the pod’s own namespace:
kubectl create secret docker-registry regcred -n shop \ --docker-server=registry.example.com \ --docker-username='ci-pull' \ --docker-password="$PULL_PASSWORD"
Then reference it from the pod spec, or attach it to the namespace’s service account so every pod there uses it:
spec: imagePullSecrets: - name: regcred
kubectl patch serviceaccount default -n shop \ -p '{"imagePullSecrets":[{"name":"regcred"}]}'
The three mistakes that keep a pull secret from working:
- Another namespace. A secret is read only from the pod’s namespace. A copy in
defaultdoes nothing for a pod inshop. - A different server.
--docker-servermust be the image reference’s host, exactly. Credentials for one host are never sent to another. - A shell that ate the username. A username with
$in it, as robot accounts often have, must be in single quotes, or the shell replaces it.
To see what the secret really holds:
kubectl get secret regcred -n shop -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d
4. When it worked yesterday
A pull that starts failing without a deploy is usually a credential that expired or was rotated, a tag that a cleanup removed, or a rate limit reached by a larger rollout than usual. Pin images by digest for what must not change under you, and give the cluster its own credential with an expiry you will notice. When the kubelet asks the registry at all depends on the pod’s imagePullPolicy: imagePullPolicy: Always, IfNotPresent and :latest.
With a Subnomic registry
- Use a robot, pull only. Give the cluster a robot account with pull on the repositories it runs, and an expiry if you want one. Its username is
robot$<name>, so quote it. A workspace API key does not work as a registry password. - Keep the workspace in the path. Images live at
<registry host>/<workspace>/<repository>:<tag>. Leaving the workspace out getsunauthorized: authentication required, because the name points nowhere the robot may pull. - Protect release tags. A retention rule can remove old tags, which shows up later as
manifest unknown. An immutable-tag rule, such asv*, keeps matching tags from being moved, deleted or pruned. - Public repositories need no secret. A repository made public can be pulled without logging in, with a limit per address.
Every registry error and its fix is in When docker push or pull fails. If the cluster is connected to Subnomic, Runa’s investigate_resource pulls a pod’s status and events into one report, so the failed pull is read for you; when the pod pulls but then keeps restarting, the next stop is CrashLoopBackOff: find the cause in four commands.