<p>I have a nginx deployment with service type LoadBalancer.
I got a external IP which is accessible from master and worker node.
I am not able to access it from browser.</p>
<p>What am I missing?</p>

<p>You can follow the below steps to access it from the browser.</p>
<ol>
<li><p>Deploy Nginx in your Kubernetes environment by executing the below YAML file.</p>
<p>kubectl create -f {YAML file location}</p>
</li>
</ol>
<pre><code>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><a href="https://i.stack.imgur.com/eW8IV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eW8IV.png" alt="enter image description here" /></a></p>
<ol start="2">
<li><p>Execute below nginx-service YAML to access it from the browser.</p>
<p>kubectl create -f {YAML file location}</p>
</li>
</ol>
<pre><code>#Service
#nginx-svc-np.yaml
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  labels:
    app: nginx
spec:
  selector:
    app: nginx
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 80
  externalIPs:
    - 192.168.1.155
</code></pre>
<p><a href="https://i.stack.imgur.com/D53s2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D53s2.png" alt="enter image description here" /></a></p>
<ol start="3">
<li><p>Now you can access Nginx from your browser.</p>
<p><a href="http://192.168.1.155/" rel="nofollow noreferrer">http://192.168.1.155/</a> <strong>(Please use your external IP)</strong></p>
</li>
</ol>
<p><a href="https://i.stack.imgur.com/kC5Jl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kC5Jl.png" alt="enter image description here" /></a></p>
