<p>i am trying to deploy containers to local kubernetes, for now i have install docker deamon, minikube and minikube dashboard. this all are working fine. i had also setup local container repository on port 5000. i had also push 2 images of my application. i can see them on browser <a href="http://localhost:5000/v2/_catalog" rel="nofollow noreferrer">http://localhost:5000/v2/_catalog</a></p>

<p>now when i am trying to up pod using minikube.</p>

<pre><code>kubectl apply -f ./docker-compose-k.yml --record
</code></pre>

<p>I am getting error on dashboard like this:- </p>

<pre><code>Failed to pull image "localhost:5000/coremvc2": rpc error: code = Unknown desc = Error response from daemon: Get http://localhost:5000/v2/: dial tcp 127.0.0.1:5000: connect: connection refused 
</code></pre>

<p>Here is my compose file:-</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: core23
  labels:
    app: codemvc
spec:
  replicas: 1
  selector:
    matchLabels:
      app: coremvc
  template:
    metadata:
      labels:
        app: coremvc
    spec:
      containers:
      - name: coremvc
        image: localhost:5000/coremvc2
        ports:
        - containerPort: 80
        imagePullPolicy: Always
</code></pre>

<p>i don't know why this images are not pulled as docker deamon and kubernetes both are on same machine. i have also try this with dockerhub image and it's working fine, but i want to do this using local images.
please give me hint or any guideline.</p>

<p>Thank you,</p>

<p>Based on the comment, you started minikube with <code>minikube start</code> (without specifying the driver).</p>

<p>That means that the minikube is running inside a <strong>Virtualbox VM</strong>. In order to make your use case work, you have two choices :</p>

<ol>
<li><strong>The hard way</strong> Set-up the connection between you VM and your host and use your host IP</li>
<li><strong>The easy way</strong> Connect to your VM using <code>minikube ssh</code> and install your registry there. Then your deployment should work with your VM's IP.</li>
</ol>

<p>If you don't want to use Virtual box, you should read the <a href="https://minikube.sigs.k8s.io/docs/reference/drivers/" rel="nofollow noreferrer">documentation</a> about other existing drivers and how to use them.</p>

<p>Hope this helps !</p>
