Kubernetes docker private registry with TLS and without username

12/4/2018

I create a private Docker registry without username and password, only with TLS.

rpc error: code = Unknown desc = Error response from daemon: Get https://<my-domain>/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning  Failed     14m (x4 over 16m)    kubelet, ip-172-10-10-157  Error: ErrImagePull

I tried with

kubectl create secret docker-registry docker-registry-dev --docker-server=<my-domain> 

And I get this error:

required flag(s) "docker-password", "docker-username" not set

From the command line with docker I can pull correct my docker image.

Any ideas for Kubernetes?

-- pioupiou
docker
kubectl
kubernetes

1 Answer

12/4/2018

This really should work out of the box without imagePullSecrets and considering your registry has valid and signed certs. It looks more like your node cannot connect to https://<my-domain>/v2/. A couple of things you can check:

  1. Your registry's http section is configured to listen on https on the right port.

  2. Check with something like curl https://registry-name/v2/ from one of your Kubernetes nodes and that you have connectivity.

-- Rico
Source: StackOverflow