<p>Apologies if this is a really simple question - I am following the hello-minikube the tutorial on the Kubernetes link below (running on Mac OS)</p>

<p><a href="https://kubernetes.io/docs/tutorials/hello-minikube/#create-your-node-js-application" rel="nofollow noreferrer">Minikube tutorial</a></p>

<p>I created a deployment on port 8380 as 8080 is in use,</p>

<pre><code>NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
hello-node   ClusterIP   10.100.248.81   &lt;none&gt;        8380/TCP   11s
</code></pre>

<p>I also exposed the deployment, but when I try to curl or open the app URL I get connection refused.</p>

<blockquote>
  <p>Failed to connect to localhost port 8380: Connection refused</p>
</blockquote>

<p>Also if I specify <code>--type=LoadBalancer</code> during the expose step - that also fails to connect.</p>

<p>Any help would be much appreciated. </p>

Murchie85
<p>I've recreated all the steps from the tutorial you have mentioned.
Your error only occurs when you do not change the port from 8080 to 8380, in one of the steps provided in the documentation. After you change it in all 3 places, it works perfectly fine.
What I suggest is checking if you changed the port in the <strong>server.js</strong> file - as it is used by the Dockerfile in build phase:</p>

<pre><code>var www = http.createServer(handleRequest);
www.listen(8080); #-&gt;8380
</code></pre>

<p>Then in the Dockerfile in <code>EXPOSE 8080</code> <strong># -> 8380</strong>.
And the last place is while running the deployment:</p>

<pre><code>kubectl run hello-node --image=hello-node:v1 --port=8380 --image-pull-policy=Never
</code></pre>

<p>I've tested this with <code>--type=LoadBalancer</code>.</p>
