By default docker use https
to connect to docker registry. However, there can
be use cases to use insecure registry, e.g. dev and testing.
Here are the steps to use insecure registry in kubernetes:
- On the master and every worker node, edit
/etc/docker/daemon.json
and addinsecure-registries
. You will need to extend your existing json body with a comma:
# sudo vim /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"insecure-registries":[
"jenkins:5000"
]
}
- Then restart docker:
service docker restart