<p>I have built a 4 node kubernetes cluster running multi-container pods all running on CoreOS. The images come from public and private repositories. Right now I have to log into each node and manually pull down the images each time I update them.  I would like be able to pull them automatically.</p>

<ol>
<li>I have tried running docker login on each server and putting the .dockercfg file in /root and /core</li>
<li>I have also done the above with the .docker/config.json</li>
<li>I have added secret to the kube master and added imagePullSecrets:

<ul>
<li>name: docker.io to the Pod configuration file.</li>
</ul></li>
</ol>

<p>When I create the pod i get the error message Error: </p>

<pre><code>image &lt;user/image&gt;:latest not found
</code></pre>

<p>If I log in and run docker pull  it will pull the image.  I have tried this using docker.io and quay.io.</p>

<p>To add to what @rob said, as of docker 1.7, the use of .dockercfg has been deprecated and they now use a ~/.docker/config.json file. There is support for this type of secret in kube 1.1, but you must create it using different keys/type configuration in the yaml: </p>

<p>First, base64 encode your <code>~/.docker/config.json</code>:</p>

<pre><code>cat ~/.docker/config.json | base64 -w0   
</code></pre>

<p>Note that the base64 encoding should appear on a single line so with -w0 we disable the wrapping.</p>

<p>Next, create a yaml file:
<code>my-secret.yaml</code></p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: registrypullsecret
data:
  .dockerconfigjson: &lt;base-64-encoded-json-here&gt;
type: kubernetes.io/dockerconfigjson
</code></pre>

<p>-</p>

<pre><code>$ kubectl create -f my-secret.yaml &amp;&amp; kubectl get secrets

NAME                  TYPE                                  DATA
default-token-olob7   kubernetes.io/service-account-token   2
registrypullsecret    kubernetes.io/dockerconfigjson        1
</code></pre>

<p>Then, in your pod's yaml you need to reference <code>registrypullsecret</code> or create a replication controller:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: my-private-pod
spec:
  containers:
    - name: private
      image: yourusername/privateimage:version
  imagePullSecrets:
    - name: registrypullsecret
</code></pre>
