<p>Using minikube and docker registry local.
Created and pushed local images to docker registry:</p>

<pre><code>$ curl http://localhost:5000/v2/_catalog
{"repositories":["app1"]}
</code></pre>

<p>Kubernetes config file:</p>

<pre><code>...
spec:
  replicas: 3
  template:
    metadata:
      labels:
        app: app1
        tier: backend
    spec:
      containers:
      - image: localhost:5000/app1
        name: app1
...
</code></pre>

<p>But from kubernetes dashboard, the <code>Pods</code> area got error:</p>

<pre><code>Failed to pull image "localhost:5000/app1": rpc error: code = 2 desc = Error while pulling image: Get http://localhost:5000/v1/repositories/app1/images: dial tcp 127.0.0.1:5000: getsockopt: connection refused
Error syncing pod
</code></pre>

<p>So how to use local docker images in registry correctly?</p>

<p>This is a solution:</p>

<blockquote>
  <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>I followed it did:</p>

<pre><code>kubectl port-forward --namespace kube-system \
$(kubectl get po -n kube-system | grep kube-registry-v0 | \
awk '{print $1;}') 5000:5000
</code></pre>

<p>Then it pending:</p>

<pre><code>Forwarding from 127.0.0.1:5000 -&gt; 5000
</code></pre>

<p>I don't know the reason.</p>
