<p>I have been using minikube to test Kubernetes locally. In minikube, we can use local docker images by using <code>eval $(minikube docker-env)</code> command.</p>
<p>I started to explore microk8s. Installed microk8s using snap on my machine running on Ubuntu 18.</p>
<p>Is there any way to use local docker images with microk8s like we use minikube for testing and development other than creating local docker registry?</p>
<p><code>microk8s.docker</code> command is also not working, it's showing:</p>
<blockquote>
<p>Command 'microk8s.docker' not found, but can be installed with:</p>
<p>snap install microk8s</p>
</blockquote>
<p>but its already installed.</p>

<p>microk8s has a private registry which can be used for this purpose.</p>
<p>You must enable the registry prior, with the following command</p>
<pre><code>$microk8s.enable registry
</code></pre>
<p>The registry maps the traffic to port 32000, so you will have to push your docker image to the registry. If the image is already present in local you can use docker tag command.</p>
<pre><code>$docker tag &lt;imageName:version&gt; localhost:32000/&lt;imageName:version&gt;

$docker push localhost:32000/&lt;imageName:version&gt;.
</code></pre>
<p>use <a href="https://microk8s.io/docs/registry-built-in" rel="nofollow noreferrer">https://microk8s.io/docs/registry-built-in</a> for more information.</p>
