Fix Kubernetes ImagePullBackOff: Container Image Won't Pull
The Error: ImagePullBackOff
Your pod is stuck and never reaches Running:
NAME READY STATUS RESTARTS AGE
myapp-7d5b8f6c9-q3m2n 0/1 ImagePullBackOff 0 4m
Running kubectl describe pod shows:
Events:
Warning Failed pull image "registry.example.com/myapp:v2.1":
rpc error: code = Unknown desc = Error response from daemon:
manifest for registry.example.com/myapp:v2.1 not found
Warning Failed Back-off pulling image "registry.example.com/myapp:v2.1"
Kubernetes tried to pull the container image, failed, and is now backing off with exponential delays.
Root Cause
ImagePullBackOff has four common causes:
- Image tag does not exist — typo in the tag or image was never pushed
- Missing or invalid registry credentials — private registry requires an
imagePullSecret - Registry is unreachable — network policy, firewall, or DNS blocking access from cluster nodes
- Rate limiting — Docker Hub throttles anonymous pulls (100 pulls/6h per IP)
Step-by-Step Fix
1. Verify the image exists
# Check if the image and tag exist in the registry
docker manifest inspect registry.example.com/myapp:v2.1
# For Docker Hub images
docker manifest inspect docker.io/library/nginx:1.25.99
# "no such manifest" = the tag doesn't exist
2. Check for typos in the deployment
kubectl get deployment myapp -o jsonpath='{.spec.template.spec.containers[*].image}'
Common mistakes: wrong registry URL, missing namespace (myapp:v1 vs myorg/myapp:v1), wrong tag.
3. Fix registry authentication
Create a pull secret if your registry is private:
kubectl create secret docker-registry regcred \
--docker-server=registry.example.com \
--docker-username=deploy-bot \
--docker-password="$REGISTRY_TOKEN" \
--docker-email=[email protected] \
-n <namespace>
Reference it in your pod spec:
spec:
imagePullSecrets:
- name: regcred
containers:
- name: myapp
image: registry.example.com/myapp:v2.1
4. Test pulling from a cluster node directly
SSH into a node and try pulling manually:
# On the node
crictl pull registry.example.com/myapp:v2.1
# If using Docker as the runtime
docker pull registry.example.com/myapp:v2.1
This isolates whether the issue is Kubernetes config or network/registry.
5. Fix Docker Hub rate limiting
Authenticate to Docker Hub even for public images:
kubectl create secret docker-registry dockerhub-cred \
--docker-server=https://index.docker.io/v1/ \
--docker-username=yourusername \
--docker-password="$DOCKERHUB_TOKEN" \
-n <namespace>
Or mirror frequently-used images to your own registry.
6. Check network policies
# Verify nodes can reach the registry
kubectl run test-pull --image=registry.example.com/myapp:v2.1 --restart=Never
# Check if NetworkPolicies block egress
kubectl get networkpolicies -n <namespace> -o yaml | grep -A 10 egress
7. Force a fresh pull
# Delete the stuck pod to trigger a new attempt
kubectl delete pod <pod-name> -n <namespace>
# Or roll the deployment
kubectl rollout restart deployment myapp -n <namespace>
Prevention Tips
- Use immutable tags (e.g., SHA digests
myapp@sha256:abc123...) instead of mutable tags likelatest. - Set
imagePullPolicy: IfNotPresentfor tagged images to reduce pull frequency and avoid rate limits. - Attach
imagePullSecretsto the ServiceAccount so every pod in the namespace inherits credentials automatically:kubectl patch serviceaccount default -n <namespace> \ -p '{"imagePullSecrets": [{"name": "regcred"}]}' - Mirror critical images to a private registry so you are not dependent on external availability.
- Validate image references in CI before deploying — catch typos before they reach the cluster.
Was this article helpful?
CI/CD Engineering Lead
Automation evangelist who believes no deployment should require a human. I write pipelines, break pipelines, and write about both. Code-first, always.
Related Articles
Fix Kubernetes 'Evicted' Pods Filling Up the Node
Clean up Kubernetes evicted pods and fix the underlying disk pressure or resource exhaustion that causes pod evictions.
Fix Kubernetes OOMKilled: Pod Keeps Getting Killed for Memory
Diagnose and fix OOMKilled errors in Kubernetes pods — understand memory limits, identify leaks, and configure resource requests correctly.
Systematic Debugging of CrashLoopBackOff: A Field Guide From Someone Who's Been Paged Too Many Times
A systematic approach to debugging CrashLoopBackOff in Kubernetes, covering the most common causes and the exact commands to diagnose each one.
Kubernetes Vertical Pod Autoscaler: Automating Resource Request Tuning In Production
Let me be direct with you: most Kubernetes clusters I audit are hemorrhaging money because of poorly configured resource requests. I've seen teams running...
Jenkins Kubernetes Agents: Dynamic Build Pods for Scalable CI/CD
Configure Jenkins to dynamically spin up Kubernetes pods as build agents. Covers the Kubernetes plugin, pod templates, JNLP agents, multi-container pods, resource limits, and RBAC — so you never manage static build nodes again.
Istio Observability and Authorization: Distributed Tracing, Metrics, and Access Policies
How to use Istio's built-in observability — distributed tracing with Jaeger, Prometheus metrics, Kiali service graph — and enforce zero-trust access control with AuthorizationPolicies.
More in Kubernetes
View all →Istio Service Mesh: Installation, Traffic Management, and mTLS
A practical guide to getting started with Istio — installing on Kubernetes, enabling automatic mTLS, configuring VirtualServices for traffic management, and understanding the sidecar injection model.
Fix Helm 'UPGRADE FAILED: has no deployed releases'
Fix the Helm 'UPGRADE FAILED: has no deployed releases' error when a previous install failed and left the release in a broken state.
Running Kafka on Kubernetes with Strimzi Operator
A hands-on guide to deploying and operating Kafka on Kubernetes using the Strimzi operator — covering cluster config, topic management, and TLS security.
Kubernetes Network Policies: Implementing Zero-Trust Pod Communication
How to implement zero-trust pod-to-pod communication in Kubernetes using NetworkPolicies — deny by default, allow explicitly, and validate it works.