Reputation: 506
when I try to deploy application in Kubernetes using images in my private Docker registry on same server (master node), I receive following error:
Failed to pull image "0.0.0.0:5000/continuous-delivery-tutorial:5ec98331a69ec5e6f818583d4506d361ff4de89b-2020-02-12-14-37-03": rpc error: code = Unknown desc = Error response from daemon: Get https://0.0.0.0:5000/v2/: http: server gave HTTP response to HTTPS client
When I print docker system info
I can see there is my registry as insecure registry:
I run my registry by following command:
docker run -d -p 5000:5000 --restart=always --name registry -v $PWD/docker_reg_certs:/certs -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key registry:2
Thank you for any advice
Upvotes: 6
Views: 8388
Reputation: 2803
you need to add your hostname to the list of allowed insecure registries in /etc/docker/daemon.json
, for example:
{
"insecure-registries" : ["your-computer-hostname:5000"]
}
(this file is supposed to contain 1 json object, so if it's not empty then add insecure-registries
property to the existing object instead of creating a new one. Also remember to restart your docker daemon afterwards)
also, you should not use 0.0.0.0
as it is not a real address. use your hostname instead when specifying image, like your-computer-hostname:5000/continuous-delivery-tutorial:5ec98331a69ec5e6f818583d4506d361ff4de89b-2020-02-12-14-37-03
Upvotes: 8