<p>I'm feeling pretty stupid here. I want K8s to pull Docker images from a local registry to ensure my development cycle is as fast as possible.</p>

<p>I have set up the local registry per <a href="https://docs.docker.com/registry/deploying/" rel="nofollow noreferrer">the instructions</a> and am using an insecure registry. I have pushed images to it, and have confirmed they reside in the registry by looking inside it using VS Code's Docker extension:</p>

<p><a href="https://i.stack.imgur.com/kcbVL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kcbVL.png" alt="Docker images"></a></p>

<p>I didn't really know whether to use <code>localhost</code>, <code>$MACHINE_NAME</code>, or <code>$LOCAL_IP_ADDRESS</code>, so I did all three.</p>

<p>I can successfully pull an image from these registries via the command line. However, when K8s (running via minikube) attempts to pull, it fails:</p>

<blockquote>
  <p>Failed to pull image "localhost:5000/service1": rpc error: code = Unknown desc = Error response from daemon: Get <a href="http://localhost:5000/v2/" rel="nofollow noreferrer">http://localhost:5000/v2/</a>: dial tcp 127.0.0.1:5000: connect: connection refused</p>
</blockquote>

<p><strong>Why is this and how can I rectify?</strong></p>

me--
<p>You might want to read this blog which provides excellent details on how to set up registry on minikube.</p>

<p><a href="https://blog.hasura.io/sharing-a-local-registry-for-minikube-37c7240d0615/" rel="nofollow noreferrer">https://blog.hasura.io/sharing-a-local-registry-for-minikube-37c7240d0615/</a></p>

<blockquote>
  <p>The idea here is for the docker daemon on minikube to be able to pull from a registry called localhost:5000. This is achieved by actually running a registry on minikube and then setting up a proxy so that the minikube VM port 5000 maps to the registry’s 5000.</p>
</blockquote>
