<p>I am fairly new to docker and kubernetes and going through kubernetes <a href="https://kubernetes.io/docs/setup/learning-environment/minikube/#use-local-images-by-re-using-the-docker-daemon" rel="nofollow noreferrer">docs</a> it says,</p>

<blockquote>
  <p>When using a single VM for Kubernetes, it’s useful to reuse Minikube’s built-in Docker daemon. Reusing the built-in daemon means you don’t have to build a Docker registry on your host machine and push the image into it. Instead, you can build inside the same Docker daemon as Minikube, which speeds up local experiments.</p>
</blockquote>

<p>So, my understanding is there are two instances are running in my local machine, one in macOS and the other one in the VM.</p>

<p>Suppose I created a image using the docker instance on my macOS, and then I want to use it on Kubernetes then, </p>

<p><strong>Question 1:</strong> Do I strictly need to create a local registry and then pull it from within Kubernetes cluster ? </p>

<p>It further says, </p>

<blockquote>
  <p>To work with the Docker daemon on your Mac/Linux host, use the docker-env command in your shell: <code>eval $(minikube docker-env)</code></p>
</blockquote>

<p>Running this creates a few environment variables in the current shell. </p>

<p><strong>Question 2:</strong> Will this be able to pull images that I build from within the docker in my macOS without creating the local registry.</p>

<p>Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop.<br>
So it will create a k8s setup on a VM running on your macOS.</p>

<pre><code>eval $(minikube docker-env)  
</code></pre>

<p>this command on you macOS will help you to switch context to docker,  so that you can run docker commands from your macOS.</p>

<p><strong>Question 1: Do I strictly need to create a local registry and then pull it from within Kubernetes cluster ?</strong> <br>
No you don't need to explicitly create a local registry as everthing runs on a single VM in minikube.</p>

<p><strong>Question 2: Will this be able to pull images that I build from within the docker in my macOS without creating the local registry?</strong> <br>
By switching docker env context on your host machine you can able to pull the images you don't need create a registry for that. Remember your macOS is not the part of you k8s cluster. Your k8s cluster is running on the single VM created by minikube.</p>
