<p>I am learning kubernetes on minikube. I studied the kubernetes official documentation and followed their <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/expose/expose-interactive/" rel="noreferrer">interactive tutorial</a> in a sandboxed environment. Everything worked fine in the sandbox but I tried the same thing on my system it failed.</p>
<h3>My Setup :</h3>
<ul>
<li>I am using macOS Big Sur version 11.6.2(20G314) on Apple M1.</li>
<li>I have used docker instead of virtual machine environment for minikube.</li>
</ul>
<h3>Steps to reproduce :</h3>
<p>First I created a deployment, then I created a <code>NodePort</code> type service to expose it to external traffic.</p>
<p>The pod is running fine and no issues are seen in the service description.</p>
<p>To test if the app is exposed outside of the cluster I used <code>curl</code> to send a request to the node :</p>
<pre class="lang-sh prettyprint-override"><code>curl $(minikube ip):$NODE_PORT
</code></pre>
<p>But I get no response from the server :</p>
<blockquote>
<p>curl: (7) Failed to connect to 192.168.XX.X port 32048: Operation timed out.</p>
</blockquote>
<p>I have copied everything that was done in the tutorial. Same deployment name, same image, same service-name, literally EVERYTHING.</p>
<p>I tried <code>LoadBalancer</code> type, but found out that minikube doesn't support it. To access the <code>LoadBalancer</code> deployment, I used the command <code>minikube tunnel</code> but this did not help.</p>
<p>What could be the possible reasons? Is it my system?</p>

Prateik Pokharel
<p>I also had this problem on my m1 mac. I was able to access the service by using this command :</p>
<pre class="lang-sh prettyprint-override"><code>kubectl port-forward svc/kubernetes-bootcamp 8080:8080
</code></pre>
<p>You can see <a href="https://levelup.gitconnected.com/minikube-tips-tricks-739f4b00ac17" rel="noreferrer">this article</a> and <a href="https://stackoverflow.com/questions/71667587/apple-m1-minikube-no-service-url">this answer</a> for more info and ways to go about it.</p>
