How do I access a private Docker registry with a self signed certificate using Kubernetes?

后端 未结 4 1961
梦谈多话
梦谈多话 2021-01-18 22:17

Currently, running a private Docker registry (Artifactory) on an internal network that uses a self signed certificate for authentication.

When Kubernetes starts up a

4条回答
  •  伪装坚强ぢ
    2021-01-18 22:28

    Kubernetes is likely using the docker daemon on the Kubernetes cluster nodes. For them to trust your local registry, you can the trusted registry hostnname to the file /etc/docker/daemon.json as follows:

    { "insecure-registries":["some.local.registry"] }
    

    where some.local.registry is the hostname of the registry.

    You need to restart the docker process(es) to make this effective. I did this for a domain that is not public and has no valid TLD, so I could not use cert-manager with letsencrypt.

    You need to do the same on every machine that uses docker to connect to that registry.

提交回复
热议问题