<p>First I create a local Docker registry...</p>

<pre><code>docker run -d -p 5000:5000 --restart=always --name registry registry:2
</code></pre>

<p>Then I push</p>

<pre><code>docker push localhost:5000/jrg/hello-k8s
</code></pre>

<p>I confirm it is there by </p>

<pre><code>$ docker pull localhost:5000/jrg/hello-k8s
Using default tag: latest
latest: Pulling from jrg/hello-k8s
Digest: sha256:c475cb7167208e8f018e54ad81d4b7bbbb9c14875bc1624bcce730edf9afede0
Status: Image is up to date for localhost:5000/jrg/hello-k8s:latest
</code></pre>

<p>Then I start Minikube</p>

<pre><code>minikube start --insecure-registry=localhost:5000
</code></pre>

<p>But when I run </p>

<pre><code>kubectl create deployment hello-k8s --image=localhost:5000/jrg/hello-k8s
</code></pre>

<p>I get</p>

<pre><code>NAME                          READY   STATUS         RESTARTS   AGE
hello-k8s-75846c4bfc-b7zp7    0/1     ErrImagePull   0          4s
</code></pre>

<p>What am I missing?</p>

<p><strong>Update</strong></p>

<p>I also tried (assuming 5.5.5.5 is the IP address for my wireless adapter (confirmed by accessing in the browser).</p>

<p>Then I start Minikube</p>

<pre><code>minikube start --insecure-registry=5.5.5.5:5000
</code></pre>

<p>But when I run </p>

<pre><code>kubectl create deployment hello-k8s --image=5.5.5.5:5000/jrg/hello-k8s
</code></pre>

<p>But I still get the same issue, also after a while it appears to become <code>ImagePullBackOff</code></p>

<p>FYI Project (<a href="https://github.com/jrgleason/hello-kubernetes/tree/ADD_CASSANDRA" rel="nofollow noreferrer">https://github.com/jrgleason/hello-kubernetes/tree/ADD_CASSANDRA</a>)</p>

Jackie
<p>I think the issue is <code>localhost</code> will reference the kubernetes host itself, and not your registry.</p>

<p>You need to make it so that the registry is accessible from inside minikube. Try using the ip address of your computer instead of <code>localhost</code>.</p>

<p>There is a proxy addon for minikube that will allow you to access <code>localhost</code> from within minikube. I would suggest setting this up as the simplest solution <a href="https://github.com/Faithlife/minikube-registry-proxy" rel="nofollow noreferrer">https://github.com/Faithlife/minikube-registry-proxy</a></p>

<p>If this doesn't work there is a guide here to setup minikube with a local registry <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>
