<p>I want to run <a href="https://github.com/dptij/example-1" rel="nofollow noreferrer">this Spring Boot application</a> inside Minikube so that I can reach port <code>8080</code> in my browser (once the application is running).</p>
<p>To do so, I do following steps.</p>
<ol>
<li>Start Docker.</li>
<li>Run <code>mvn spring-boot:build-image</code>.</li>
<li>Start Minikube using <code>minikube start</code>.</li>
<li>Create a Minikube deployment using <code>kubectl create deployment example-1-engine-1 --image=example-1-engine-1</code>.</li>
<li>Expose port 8080 using <code>kubectl expose deployment example-1-engine-1 --type=NodePort --port=8080</code> and <code>kubectl port-forward service/example-1-engine-1 8080:8080</code>.</li>
<li>Start the appliation in Minikube.</li>
<li>Start the application in Minikube using <code>minikube service example-1-engine-1</code>.</li>
</ol>
<p>Following output appears:</p>
<p><a href="https://i.stack.imgur.com/FeKif.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FeKif.png" alt="Output of Minikube in the command line" /></a></p>
<p>However, the browser cannot open the web application on port 8080 (browser cannot connect to the application at <a href="http://127.0.0.1:50947/" rel="nofollow noreferrer">http://127.0.0.1:50947/</a>).</p>
<p><strong>What am I doing wrong and how can I make sure that the application in question runs inside Minikube and I can access the web application at port 8080?</strong></p>
<p><strong>Update 1:</strong> Here is the output of <code>kubectl get pods</code>:</p>
<pre><code>C:\Users\XXXXXXX&gt;kubectl get pods
NAME                                 READY   STATUS             RESTARTS   AGE
example-1-engine-1-d9fc48785-zdvkf   0/1     ImagePullBackOff   0          2d18h
hello-minikube-6ddfcc9757-wj6c2      1/1     Running            1          5d
</code></pre>
<p><strong>Update 2:</strong> I tried to enter <code>eval $(minikube -p minikube docker-env)</code>. For this purpose, I first opened the shell of Minikube container in Docker.</p>
<p><a href="https://i.stack.imgur.com/HUT30.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HUT30.png" alt="Screenshot of the button for opening the shell in Minikube" /></a></p>
<p>In the window that appeared thereafter, I entered <code>eval $(minikube -p minikube docker-env)</code> and got the response <code>minikube: not found</code>.</p>
<p><a href="https://i.stack.imgur.com/ZZWda.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZZWda.png" alt="Screenshot of the error message &quot;minikube: not found&quot;" /></a></p>

Glory to Russia
<p>In my opinion, there are two possible issues with your case.</p>
<h3>1. Using a locally built Docker image</h3>
<p>You want to run locally built Docker image in Kubernetes, but it doesn't work out-of-the-box.
Generally, you have two options:</p>
<ol>
<li><p>Use <code>docker image push</code> command to share your image to the <a href="https://hub.docker.com/" rel="nofollow noreferrer">Docker Hub</a> registry or to a self-hosted one as described in the <a href="https://docs.docker.com/engine/reference/commandline/push/" rel="nofollow noreferrer">Docker documentation</a>.</p>
</li>
<li><p>Use <code>eval $(minikube docker-env)</code> command to point your terminal to use the docker daemon inside minikube as described in the <a href="https://minikube.sigs.k8s.io/docs/handbook/pushing/#1-pushing-directly-to-the-in-cluster-docker-daemon-docker-env" rel="nofollow noreferrer">minikube documentation</a>.</p>
</li>
</ol>
<h3>2. Using a Docker image with a specific tag</h3>
<p>As I can see, your image has specific tag <code>1.0-SNAPSHOT</code>:</p>
<pre><code>$ docker images
REPOSITORY                                TAG                     
example-1-engine-1                        1.0-SNAPSHOT            
</code></pre>
<p>You need to specify this tag in your <code>kubectl create deployment</code> command:</p>
<pre><code>$ kubectl create deployment example-1-engine-1 --image=example-1-engine-1:1.0-SNAPSHOT
</code></pre>
<hr />
<p>I've deployed your <a href="https://github.com/dptij/example-1" rel="nofollow noreferrer">Spring Boot application</a>, to show that it works as expected for me.</p>
<p>First, to point my terminal to use the docker daemon inside minikube I ran:</p>
<pre><code>$ eval $(minikube -p minikube docker-env)
</code></pre>
<p>Then I created Docker image and deployed <code>example-1-engine-1</code> app:</p>
<pre><code>$ mvn spring-boot:build-image
...
[INFO] Successfully built image 'docker.io/library/example-1-engine-1:1.0-SNAPSHOT'
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...

$ kubectl create deployment example-1-engine-1 --image=example-1-engine-1:1.0-SNAPSHOT
deployment.apps/example-1-engine-1 created

$ kubectl get pod
NAME                                 READY   STATUS    RESTARTS   AGE
example-1-engine-1-c98f8c569-xq2cv   1/1     Running   0          13s
</code></pre>
<p>Finally, I exposed the <code>example-1-engine-1</code> <code>Deployment</code> as in your example:</p>
<pre><code>$ kubectl expose deployment example-1-engine-1 --type=NodePort --port=8080
service/example-1-engine-1 exposed

$ kubectl port-forward service/example-1-engine-1 8080:8080
Forwarding from 127.0.0.1:8080 -&gt; 8080
Forwarding from [::1]:8080 -&gt; 8080

$ minikube service example-1-engine-1
|-----------|--------------------|-------------|---------------------------|
| NAMESPACE |        NAME        | TARGET PORT |            URL            |
|-----------|--------------------|-------------|---------------------------|
| default   | example-1-engine-1 |        8080 | http://192.168.49.2:32766 |
|-----------|--------------------|-------------|---------------------------|
Opening service default/example-1-engine-1 in default browser...
</code></pre>
<p>In the open browser tab, I saw:</p>
<p><a href="https://i.stack.imgur.com/5lcIF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5lcIF.png" alt="enter image description here" /></a></p>
<p>Additionally, I saw the same page at <code>http://127.0.0.1:8080</code>.</p>
<hr />
<p>Unfortunately, I don't have Windows machine (as in your example) and I used Linux instead, so I wasn't able to exactly reproduce your issue.</p>
