<p>I just deployed nginx on a K8S Node in a cluster, the master and worker communicate using <strong>internal</strong> IP address.</p>

<p>I can <code>curl http://worker_ip:8080</code> (nginx) from internal network, but how to make it can be accessed from <strong>external/internet</strong> network? </p>

<p>Or should I use public IP as my node host?</p>

Justinus Hermawan
<p>update the service type to NodePort. grab the nodePort that is assigned to the service.
you should be able to access nginx using host:nodeport</p>

<p>see below for reference</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  labels:
    run: my-nginx
spec:
  type: NodePort
  ports:
  - port: 8080
    targetPort: 80
    protocol: TCP
    name: http
  - port: 443
    protocol: TCP
    name: https
  selector:
    run: my-nginx
</code></pre>
