<p>kubectl create secret docker-registry private-registry-key --docker-username="devopsrecipes" --docker-password="xxxxxx" --docker-email="username@example.com" --docker-server="https://index.docker.io/v1/"
secret "private-registry-key" created</p>

<p>This command is used for accessing private docker repos.</p>

<p>As referenced: <a href="http://blog.shippable.com/kubernetes-tutorial-how-to-pull-private-docker-image-pod" rel="nofollow noreferrer">http://blog.shippable.com/kubernetes-tutorial-how-to-pull-private-docker-image-pod</a></p>

<p>But, not able to pull the image.</p>

<p>When tried to access ="https://index.docker.io/v1/"
It is giving page not found error.</p>

<p>Please guide me.</p>

uday kiran
<p>You also need to refer the <em>imagePullSecrets</em> in the pod / deployment spec you create:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: private-reg
spec:
  containers:
  - name: private-reg-container
    image: &lt;your-private-image&gt;
  imagePullSecrets:
  - name: private-registry-key
</code></pre>

<p>Read more about <em>imagePullSecrets</em> <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">here</a>.</p>
