Kubernetes ImagePullBackOff private registry investigation cheat sheet
Trace image pull failures through Pod events, image references, service accounts and registry Secret metadata.
Kubernetes with kubectl and RBAC permitting Pod and Secret metadata inspection; registry authentication varies by provider.
Updated · Kubernetes · 6 min read
| Command | What it does |
|---|---|
kubectl config current-context | Confirm the cluster context |
kubectl describe pod web-pod -n production | Inspect Pod events and image reference |
kubectl get pod web-pod -n production -o jsonpath="{.spec.imagePullSecrets[*].name}" | Inspect referenced image pull secrets |
kubectl describe serviceaccount default -n production | Inspect the service account |
kubectl get secret regcred -n production -o jsonpath="{.metadata.name} {.type}" | Check Secret name and type without values |
Walkthrough
Replace production, web-pod, default and regcred with actual names. Do not print Secret data or registry credentials. Commands inspect resources without changing workloads.
Step 1: Confirm the cluster context
kubectl config current-context
Compare the current context with the approved cluster inventory before interpreting Pod and namespace details from the API server.
Step 2: Inspect Pod events and image reference
kubectl describe pod web-pod -n production
Read the container image, node, service account and recent pull error events. ImagePullBackOff is a retry state; the preceding error gives the more specific diagnostic lead.
Step 3: Inspect referenced image pull secrets
kubectl get pod web-pod -n production -o jsonpath="{.spec.imagePullSecrets[*].name}"
Compare Secret names in the Pod specification with the intended registry credentials. A name alone does not prove that credentials are valid or have repository access.
Step 4: Inspect the service account
kubectl describe serviceaccount default -n production
Replace default with the Pod service account and inspect its image pull Secret references. The effective Pod specification and admission behavior must still be checked.
Step 5: Check Secret name and type without values
kubectl get secret regcred -n production -o jsonpath="{.metadata.name} {.type}"
Confirm the referenced Secret exists in the Pod namespace and inspect only its type. This avoids displaying credentials and cannot verify their validity or registry permissions.
WORKED INCIDENT
Practical case: A new deployment cannot pull its image
Fictional teaching scenario; observations are examples, not captured production output.
Situation
A new Pod remains in ImagePullBackOff while an existing deployment still runs.
Investigation sequence
1. Confirm the cluster context
kubectl config current-contextConfirm the target cluster before collecting Pod evidence.
2. Inspect Pod events and image reference
kubectl describe pod web-pod -n productionInspect Pod events for the exact registry response and image reference.
3. Inspect referenced image pull secrets
kubectl get pod web-pod -n production -o jsonpath="{.spec.imagePullSecrets[*].name}"Read the Pod image pull Secret references in the affected namespace.
4. Inspect the service account
kubectl describe serviceaccount default -n productionCompare the service account and referenced Secret metadata with the approved registry setup.
Example findings
Illustrative findings: the Pod references a Secret that is absent from its namespace and its events report an image pull authentication failure.
Interpret the findings
The missing namespaced reference is a concrete lead. Existing Pods can keep running cached images and do not prove that new pulls can authenticate.
Verify the outcome
After the registry owner restores approved credentials, watch a fresh pull attempt and verify the Pod starts with the intended image.
Escalation handoff
Share sanitized event reasons, image registry hostname, namespace and Secret name with the platform owner; never share Secret values.
Primary references
Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.