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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
I had missed out a couple of steps in the guide DigitalOcean Container Registry Quickstart specifically the steps:
Use the kubernetes-manifest command to store an authentication token for your registry as a secret in your cluster:
doctl registry kubernetes-manifest | kubectl apply -f -
Copy
Instruct the default service account to use the authentication token as an imagePullSecret. Be sure to replace <my-registry> in the name field in the below command while keeping the registry- prefix:
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "registry-<my-registry>"}]}'
I have follow all the steps and I am getting the same Authentication error. It is driving me crazy! Is someone else having the same problem?
In my case, the problem was with “Download Docker Credentials” I used in the UI. I created a k8s secret using that downloaded files, and spent a couple of hours to finally dig out that doctl registry kubernetes-manifest
gives another credentials. Surprisingly, the credentials downloaded from the UI were valid for pushing/pulling from the local machine, but not for pulling images inside the cluster. Strange!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.