<p>The following are the yaml files for pod and services</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: webapp
  labels:
    app: &quot;webapp&quot;

spec:
  containers:
  - name: webapp
    image: richardchesterwood/k8s-fleetman-webapp-angular:release0
    ports:
      - containerPort: 80

---

apiVersion: v1
kind: Service
metadata:
  name: fleetman-webapp

spec:
  selector:
    app: webapp

  ports:
    - name: http
      protocol: TCP
      port: 80
      nodePort: 30080
  
  type: NodePort
</code></pre>
<p>I want to access the webapp from browser and use localhost:30080 or minikube-ip:30080, but was unable to access.</p>
<p>I troubleshooted the webapp image working, by going into the shell for the pod and executing</p>
<pre><code>wget http://localhost:80
-- index.html got downloaded.



kubectl get all
NAME         READY   STATUS    RESTARTS   AGE
pod/webapp   1/1     Running   0          23m

NAME                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/fleetman-webapp   NodePort    10.96.240.170   &lt;none&gt;        80:30080/TCP   173m
service/kubernetes        ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP        26h
</code></pre>
<p>Where am i going wrong, or whats the next step for debugging?</p>

Nilotpal
<p>If you are running locally, you can do this:</p>
<p><code>kubectl port-forward -n default service/fleetman-webapp 30080:80</code></p>
<p>With NodePort, it won't be listening on loopback address (<code>localhost</code>). Instead, it will be listening on Kubernetes node's IP. So you have to do port forwarding make it work on <code>localhost</code></p>
