<p>I cannot seem to find why couldn't connect to an endpoint I have exposed via NodePort. While the container is running as expected when running <code>kubectl logs &lt;pod&gt;</code>, I am unable to reach:</p>
<p><code>http://&lt;node ip&gt;:30100/&lt;valid endpoint form container&gt;</code></p>
<p>where the <code>&lt;node ip&gt;</code> is the ip from running <code>kubectl get nodes -o wide</code> under <code>INTERNAL IP</code>.</p>
<p>I am unsure whether the problem resides in the deployment yaml. Below is my single deployment that I've applied to the cluster:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-app-deployment
  labels:
    app: auth-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth-app
  template:
    metadata:
      labels:
        app: auth-app
    spec:
      containers:
        - name: auth-app
          image: &lt;working image&gt;
          ports:
            - containerPort: 80

---
apiVersion: v1
kind: Service
metadata:
  name: auth-app-service
spec:
  type: NodePort
  selector:
    app: auth-app
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
      nodePort: 30100
</code></pre>
<p>Also, here are the results from running <code>kubectl get all</code>:</p>
<pre><code>NAME                                       READY   STATUS    RESTARTS   AGE
pod/auth-app-deployment-58cd68d8cf-mjpph   1/1     Running   0          29m

NAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/auth-app-service   NodePort    10.104.172.176   &lt;none&gt;        80:30100/TCP   138m
service/kubernetes         ClusterIP   10.96.0.1        &lt;none&gt;        443/TCP        150m

NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/auth-app-deployment   1/1     1            1           138m

NAME                                             DESIRED   CURRENT   READY   AGE
replicaset.apps/auth-app-deployment-58cd68d8cf   1         1         1       29m
</code></pre>
<p>PS: I am using <code>minikube</code>.</p>

chandler
<p>As you are using a NodePort service you can't use the cluster IP, which is different from the node IP's.
Assuming you only one have 1 node (bc you are using minikube) you need to use the ip you get from <code>kubectl describe nodes</code> under the addresses section, use InternalIP value.</p>
<p>Your url will be <code>http://&lt;node_ip&gt;:30100/&lt;valid endpoint form container&gt;</code></p>
