title: Unable to pull Docker images from private registry using Rancher
body: <p>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:</p>
  
  <pre><code>Error (Image [index.docker.io/rancher/net:v0.11.5] failed to pull: Pulling repository docker.io/rancher/net)
  </code></pre>
  
  <p>Another similar message for a different component:<br>
  <a href="https://i.stack.imgur.com/uEBOD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uEBOD.png" alt="enter image description here"></a></p>
  
  <p>Docker version on Rancher server: <code>17.03.1-ce, build c6d412e</code><br>
  Docker version on Rancher agent: <code>1.12.6, build 78d1802</code>  </p>
  
  <p>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.  </p>
  
  <p>If i manually run the following commands, it works:</p>
  
  <pre><code>docker login docker.artifactory.abc.net -u svc-ranch-art_d
  docker pull docker.artifactory.abc.net/rancher/net:v0.11.5
  </code></pre>
  
  <p>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 <code>docker.io</code>. Struggling since yesterday but couldn’t find anything.</p>
  
  <p>Any help will really be appreciated.</p>