I am new to Docker, Rancher and Kubernetes. I am using RancherOS and have installed Rancher server on it. When i try to connect a node to Rancher server, it connects fine but when Kubernetes tries to start services, most of the services fail with errors similar to the following:
Error (Image [index.docker.io/rancher/net:v0.11.5] failed to pull: Pulling repository docker.io/rancher/net)
Another similar message for a different component:
Docker version on Rancher server: 17.03.1-ce, build c6d412e
Docker version on Rancher agent: 1.12.6, build 78d1802
I created private registry which points to Artifactory. In the Kubernetes template, i specified the registry and that’s the only change i did in the template.
If i manually run the following commands, it works:
docker login docker.artifactory.abc.net -u svc-ranch-art_d
docker pull docker.artifactory.abc.net/rancher/net:v0.11.5
I can see in the Artifactory that the above version (0.11.5) gets cached. I am not sure that when Rancher tries starting services, why it goes to docker.io
. Struggling since yesterday but couldn’t find anything.
Any help will really be appreciated.
Finally i was able to resolve it. There is a global setting registry.default
which had to be changed from its default to the private registry that i created. After that, the environment had to be recreated. I did change the registry.default
value but did not re-create the environment. That was the issue.