<p>I am following a very simple tutorial where it spawns a simple pod with an http endpoint and a service to expose that app using kubernetes.</p>
<p>The setup is very simple:</p>
<p>app-pod.yml</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: hello-pod
  labels:
    app: web
spec:
  containers:
    - name: web-ctr
      image: nigelpoulton/getting-started-k8s:1.0
      ports:
        - containerPort: 8080
</code></pre>
<p>And the nodeport service:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: ps-nodeport
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 8080
    nodePort: 31111
    protocol: TCP
  selector:
    app: web
</code></pre>
<p>The service and pod seem to be healthy:</p>
<p><a href="https://i.stack.imgur.com/tNLmF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tNLmF.png" alt="enter image description here" /></a></p>
<p>But I can't reach the running app:</p>
<p><code>locahost:31111</code></p>
<p>Give &quot; This site can't be reached message&quot;</p>
<p>I am new to this stuff so any help will be appreciated.</p>

<p>In Kubernetes Kind cluster, by default, <code>NodePort</code> may not be bound to <code>localhost</code>. Please check the following resources:</p>
<ul>
<li><a href="https://kind.sigs.k8s.io/docs/user/quick-start/#mapping-ports-to-the-host-machine" rel="nofollow noreferrer">https://kind.sigs.k8s.io/docs/user/quick-start/#mapping-ports-to-the-host-machine</a></li>
<li><a href="https://stackoverflow.com/questions/62432961/how-to-use-nodeport-with-kind">How to use NodePort with kind?</a></li>
</ul>
