✓ Solved

Kubernetes doesn't connect to Docker Hub to pull images

Hello everyone,

I am deploying a simple pod by a YAML configuration file where I need to pull a simple, public image (alpine:latest) but seems my K8s instance is not able to reach Docker Hub.

This is a test, of course, I have the same issues to reach my private Docker Hub with the right authentication and secret crated for docker (kubectl create secret docker-registry) with the right credentials and token generated by Docker.

All these configuration work on my old cluster (not Linode) and I never had any issue also with Minikube in localhost for testing.

Question: where is the issue? I expect that this operation is straightforward and does not requires any setup.

Thank you for help.

2 Replies

✓ Best Answer

No way to reach my Docker Hub account and pull a private image. Here the configuration:

kubectl create secret docker-registry my-registry --docker-server=https://index.docker.io/v1/ --docker-username=<my_user> --docker-password=<generated_token_from docker=""> --docker-email=<my_email></my_email></generated_token_from></my_user>

This is the standard way Kubernetes access to Docker hub, docker server is correct.

I can't ssh into nodes to login to Docker from there and create the .docker/config.json so, I have no idea how to proceed!

Customer support doesn't answer

Seems that now I can connect to Docker Hub for public repository (didn't touch anything thought).

I still have issue to reach my private one but probably is just a configuration issues.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct