<p>I'm trying to use kubernetes locally. Thus I installed minikube. When I create deployment object, pods can't find the images within minikube docker registry and pods' show status as <code>ErrImageNeverPull</code>. To solve the problem I followed these steps:</p>

<ol>
<li><code>minikube start</code></li>
<li><code>eval $(minikube docker-env)</code></li>
<li>I changed <code>ImagePullPolicy</code> to <code>Never</code> in deployment.yaml file</li>
<li><code>docker-compose build &amp;&amp; docker-compose up -d</code></li>
</ol>

<p>Even though I followed all these steps images for the project not being created within minikube registry. I have double checked it by running this command <code>eval $(minikube docker-env -u)</code> in order to switch back to the local docker registry. Images and Containers have been created within local docker registry.</p>

<p>My question is how can I create docker images within minikube docker registry?</p>

Elshan Akberov
<p>I have solved the problem by following these steps:</p>

<ol>
<li>Restarted minikube by executing <code>minikube start</code> </li>
<li><p>I ran <code>minikube -p minikube docker-env</code> and it returned following:</p>

<p><a href="https://i.stack.imgur.com/Sh8vY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sh8vY.png" alt="output of command"></a></p></li>
<li><p>I executed <code>eval $(minikube -p minikube docker-env)</code></p></li>
<li>Then I ran <code>docker-compose</code> commands.</li>
</ol>

<p>Images and Containers was created within minikube docker registry.</p>

<p>To be honest I don't know why <code>eval $(minikube docker-env)</code> didn't do the job and the differences between <code>eval $(minikube docker-env)</code> and <code>eval $(minikube -p minikube docker-env)</code>.</p>

<p>If you know the reason please let me know.</p>
