Question
Using DO k8s container registry: authentication required
I am trying to use registry.digitalocean.com for my k8s images.
I’ve created an image, tagged it, logged into the registry successfully (using doctl registry login
) then pushed the image to the registry.
However, when starting the service it’s not creating pods successfully and giving :
Failed to pull image "registry.digitalocean.com/ordering-reg/mongodb-service": rpc error: code = Unknown desc = Error response from daemon
Get https://registry.digitalocean.com/v2/ordering-reg/mongodb-service/manifests/latest: unauthorized: authentication required
The pod status is “ImagePullBackOff” and it can’t pull the image.
Does anyone have any idea what might be causing this? My understanding was that if I was logged into the registry OK with doctl, then everything should be authed to pull the image from the registry.
Any help would be gratefully appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
I actually have the same issue.
But I did follow the instructions. In my DO K8S dashboard, I can see listed under “Secrets” - registry-<registry_name>
I can also see that “imagePullSecrets” does exist on my default service account, and validated it as described here - https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#verify-imagepullsecrets-was-added-to-pod-spec
However, if I try to do a deployment, or scale the pod to 0 and then to 1, I will still get an error state - Failed to pull image “registry.digitalocean.com/<registry_name>/image-name:latest” unauthorized: authentication required