<p>I'm new to Kubernetes and Helm Charts and was looking to find an answer to my question here.</p>
<p>When I run <code>kubectl get all</code> and look under services, I get something like:</p>
<pre><code>NAME             TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                        AGE
service/leader   LoadBalancer   10.3.245.137   104.198.205.71   80:30125/TCP, 8888:30927/TCP   54s
</code></pre>
<p>My services are configured in my Helm Chart as:</p>
<pre><code>ports:
  name: api
  port: 80
  targetPort: 8888 

  name: api2
  port: 8888
  targetPort: 8888
</code></pre>
<p>When I run <code>kubectl describe svc leader</code>, I get:</p>
<pre><code>Type:        LoadBalancer
Port:        api 80/TCP
TargetPort:  8888/TCP 
NodePort:    api 30125/TCP
EndPoints:   &lt;some IP&gt;:8888
Port:        api 8888/TCP
TargetPort:  8888/TCP 
NodePort:    api 30927/TCP
EndPoints:   &lt;some IP&gt;:8888
</code></pre>
<p>I always thought that <code>NodePort</code> is the port that exposes my cluster externally, and Port would be the port exposed on the service internally which routes to <code>TargetPorts</code> on the Pods. I got this understanding from <a href="https://stackoverflow.com/questions/49981601/difference-between-targetport-and-port-in-kubernetes-service-definition">here</a>.</p>
<p>However, it seems I can open up <code>104.198.205.71:80</code> or <code>104.198.205.71:8888</code>, but I can't for <code>104.198.205.71:30125</code> or <code>104.198.205.71:30927</code>. My expectation is I should be able to access 104.198.205.71 through the <code>NodePorts</code>, and not through the Ports. Is my understanding incorrect?</p>

Kun Hwi Ko
<p>To access your application via NodePort, then you need to hit your node ip and the nodeport which you have been assigned.</p>
<pre><code>kubectl get node -owide 
</code></pre>
<p>The above command will give your node ip address, which you can use to access the app via NodePort and yes external Ip : 80 will fail as the port is for the container internally and not for outside access.</p>
