<p>My os is windows 10 pro and I develop with spring boot. First I build docker image with below Dockerfile.</p>

<pre><code>FROM openjdk:11-jdk
ADD target/Spring-Blog-Jpa-0.0.1-SNAPSHOT.jar blog-app.jar
EXPOSE 8080
ENTRYPOINT ["java","-Dfile.encoding=UTF8","-jar","blog-app.jar"]
</code></pre>

<p>The docker image is built successfully with the docker command.</p>

<pre><code>&gt; docker image build -t blog-app:latest .
</code></pre>

<p>And I pull mysql:latest image from docker repository. And mysql pulling is also successful.</p>

<pre><code>&gt; docker image pull mysql:latest .
</code></pre>

<p>I try to generate kubernetes pod with those docker images. In case of mysql:latest image, mysql pod is generated without errors. But when generating the blog-app pod, the blog-app:latest image can not be pulled and error message is thrown. Below is the configuration yaml file.</p>

<pre><code>apiVersion: apps/v1
kind: Pod
metadata:
  name: blog-system
spec:
  containers:
  - name: blog-app
    image: blog-app:latest
    args: ["-t", "-i"]
</code></pre>

<p>I have no idea why the locally built image can not be pulled when generating pod. Is there any process to push local docker repository? How can the locally built docker images can be pulled on Kuberetes? </p>

Joseph Hwang
<p>You can reuse the Docker daemon from Minikube. Here are the commands on Powershell.</p>

<p>PS C:\minikube> minikube docker-env</p>

<p>PS C:\minikube> minikube docker-env | Invoke-Expression</p>

<p>docker image build -t blog-app:latest</p>

<p>Set the image in the pod spec like the build tag</p>

<p>Set the imagePullPolicy to Never, otherwise Kubernetes will try to download the image.</p>

<hr>

<pre><code>apiVersion: apps/v1
kind: Pod
metadata:
  name: blog-system
spec:
  containers:
  - name: blog-app
    image: blog-app:latest
    imagePullPolicy: Never
    args: ["-t", "-i"]
</code></pre>

<p>Also check this <a href="https://medium.com/@maumribeiro/running-your-own-docker-images-in-minikube-for-windows-ea7383d931f6" rel="nofollow noreferrer">guide</a></p>
