Events show `pull access denied for registry.example.com/web, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed`.
BeginnerTroubleshootingPod startup failures
Answer
Likely causes → Private registry with no imagePullSecrets, the Secret is in another namespace, wrong secret type, expired token, or the repository name is wrong (registries often answer "denied" instead of "not found").
Diagnose →
kubectl get pod web-x -o jsonpath='{.spec.imagePullSecrets}'
kubectl get sa default -o yaml | grep -A2 imagePullSecrets
kubectl get secret regcred -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d | jq '.auths | keys'
Fix →
kubectl create secret docker-registry regcred \
--docker-server=registry.example.com --docker-username=ci --docker-password="$TOKEN" -n payments
kubectl patch sa default -n payments -p '{"imagePullSecrets":[{"name":"regcred"}]}'
The registry hostname in the Secret must match the image host exactly.
Prevent → Attach pull secrets to ServiceAccounts through namespace templates, or use node-level credentials (ECR via node IAM role, kubelet credential provider).
More on Pod startup failures
A Pod shows `CrashLoopBackOff` with `RESTARTS 7` and events say `Back-off restarting failed container app`. Where do you start?Beginner`kubectl logs web-0 --previous` returns nothing useful and the container dies in under a second. How do you get inside it?IntermediatePod status is `ImagePullBackOff` and events show `Failed to pull image "registry.example.com/web:1.4.2": rpc error: code = NotFound desc = failed to pull and unpack image ... not found`.BeginnerPulls from Docker Hub randomly fail with `toomanyrequests: You have reached your pull rate limit`.IntermediateA private registry with an internal CA fails with `x509: certificate signed by unknown authority` during image pull.IntermediateA new image works on laptops but on nodes the Pod crash-loops and logs show only `exec /app/server: exec format error`.Intermediate