Kubernetes: ImagePullBackOff / ErrImagePull
Educational use only. Content explains errors and defensive fixes for systems you own or are authorised to test. Do not use any technique here to access data, accounts, or networks without permission.
Root Cause
This status in Kubernetes means that the Kubelet on a worker node failed to pull the container image from the container registry. 'BackOff' indicates that Kubernetes has repeatedly tried and failed, and is now waiting increasingly longer intervals between retries. Common causes include a typo in the image name or tag, attempting to pull from a private registry without configuring an `imagePullSecret`, or the image simply not existing in the registry. It can also be caused by network issues on the worker node preventing it from reaching the registry.
Fix / Solution
Use `kubectl describe pod <pod-name>` and look at the 'Events' section at the bottom. This will tell you exactly why the pull failed. Verify the image name and tag are correct. If the registry is private, ensure you have created a Docker registry secret and referenced it in the Pod specification under `imagePullSecrets`. Ensure the cluster nodes have internet access.
Code Snippet
# ❌ Check pod status
kubectl get pods
# my-pod 0/1 ImagePullBackOff 0 5m
# ✅ Find the exact reason for the failure
kubectl describe pod my-pod
# Events:
# Warning Failed Error: ErrImagePull
# Warning Failed Error: image pull failed: repository does not exist
# ✅ Fix private registry access in YAML
spec:
containers:
- name: my-app
image: private-registry.com/my-app:latest
imagePullSecrets:
- name: my-registry-key