简体   繁体   中英

Kubernetes docker private registry with TLS and without username

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM