Sphere
Log in Join
☆ 4

imagepullbackoff on a brand new deployment

Failed to pull image registry.internal/team/api:1.27.3: rpc error: code = Unauthorized desc = unauthorized: authentication required. Brand new deployment on EKS 1.28, first time we're using this private registry. We created an imagePullSecret with kubectl create secret docker-registry regcred and added imagePullSecrets to the pod spec. Still Unauthorized. The same credentials work with docker login. What am I missing? The registry is Harbor 2.8, if that matters.

⚑ Report

4 replies

☆ 0
D dd ·2026-09-24#1

Check that the secret is in the same namespace as the pod. Secrets don't cross namespaces, and a lot of people create them in default then deploy to their app namespace. kubectl get secret regcred with the right namespace will tell you. Also check the --docker-server value matches exactly what's in the image reference, including port if there is one.

⚑ Report
☆ 0
T traefik ·2026-09-27#2

It was in default, deployment is in backend. I recreated it in backend and the error changed to ErrImagePull then Back-off pulling image. Now describe says Failed to pull image: rpc error: code = Unknown desc = Error response from daemon: Get https://registry.internal/v2/: dial tcp: lookup registry.internal: no such host. Check that too.

⚑ Report
☆ 0
Y yaml5 ·2026-10-08#3

That's DNS now, separate issue. Is registry.internal resolvable from inside the cluster? CoreDNS forwards unknown domains to the VPC resolver, but if the registry is only in your on-prem DNS, CoreDNS needs a forward rule. Check the coredns ConfigMap in kube-system and add a forward stanza for that zone.

⚑ Report
☆ 0
R rust ·2026-10-13#4

Or use a stub domain in CoreDNS: a block for internal:53 with errors, cache 30 and forward . to your DNS IP. We had to do that for our Nexus registry. Once DNS resolves, test with a temporary pod running busybox and nslookup registry.internal. Faster than redeploying the real app each time.

⚑ Report
Log in to reply.