<p>In kubernetes (I am using minikube) I have deployed the following deployment using <code>kubectl apply -f nginx-deployment</code>:</p>
<pre><code># nginx-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
</code></pre>
<p>I get <code>deployment.apps/nginx-deployment created</code> as an output, and when I run <code>kubectl get deployment</code> I get:</p>
<pre><code>NAME               READY   UP-TO-DATE   AVAILABLE   AGE
nginx-deployment   3/3     3            3           22s
</code></pre>
<p>I have also deployed the following service file using <code>kubectl apply -f nginx-service.yml</code> command</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  type: NodePort
  selector:
    app: nginx
  ports:
    - name: &quot;http&quot;
      port: 80
      targetPort: 80
      nodePort: 30080
</code></pre>
<p>The output is <code>service/nginx-service created</code> and the output of <code>kubectl get service</code> is:</p>
<pre><code>NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes      ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP        127d
nginx-service   NodePort    10.99.253.196   &lt;none&gt;        80:30080/TCP   75s
</code></pre>
<p>However, when I try to access the app by entering <code>10.99.253.196</code> into the browser, it doesn't load and when I try localhost:30080 it says <code>Unable to connect</code>. Could someone help me to understand why this is happening/provide further directions for troubleshooting?</p>

<p>Since you are using minikube you might need to run <code>minikube service nginx-service --url</code>, this will create a tunnel to the cluster and expose the service.</p>
