<p>I have logged in to the Docker hub using the CLI command: docker login. Entered username and password and I can pull and push images to Docker hub.</p>
<p>However, my K8S can't. I am trying to apply a deployment that should pull those images into its pods but I got the following error when running <code>kubectl describe pod POD_NAME</code>:</p>
<pre><code>  Warning  Failed     9s    kubelet            Failed to pull image &quot;myprivate/repo:tag&quot;: rpc error: code = Unknown desc = Error response from daemon: pull access denied for myprivate/repo, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
</code></pre>
<p>How to make the docker run in the pods to also be logged to the docker hub as well as doing it from my terminal?</p>

Raz Buchnik
<p>Create &quot;image pull secret&quot; and define on your deployment. Here is how you can do <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/</a></p>
