Report #99619
[bug\_fix] ImagePullBackOff: kubelet cannot pull container image
Create a \`kubernetes.io/dockerconfigjson\` Secret with valid registry credentials \(\`kubectl create secret docker-registry regcred --docker-server=... --docker-username=... --docker-password=...\`\), reference it in the Pod template under \`spec.imagePullSecrets\`, and ensure the Secret exists in the same Namespace as the Pod. For convenience, patch the namespace's ServiceAccount so every pod using it inherits the secret: \`kubectl patch serviceaccount default -n -p '\{"imagePullSecrets": \[\{"name": "regcred"\}\]\}'\`.
Journey Context:
After applying a Deployment that referenced a private ECR image, the pod stayed in \`ImagePullBackOff\`. \`kubectl describe pod\` showed the event \`Failed to pull image "123456789012.dkr.ecr.us-east-1.amazonaws.com/app:v1.2.3": rpc error: code = Unknown desc = Error response from daemon: pull access denied\`. The image URI was correct and the image existed, but the node had no credentials. The developer had run \`docker login\` on their laptop, but Kubernetes nodes do not use the Docker daemon's config. The fix was to create a \`docker-registry\` Secret and add it to the pod template's \`imagePullSecrets\` list. After deleting the stuck pod so the ReplicaSet recreated it, the kubelet pulled the image successfully. The root cause is that Kubernetes delegates image pulls to the container runtime \(containerd/CRI-O\), which only uses credentials from \`imagePullSecrets\` or node-level config, not the developer's local Docker client.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T04:46:46.351613+00:00— report_created — created