<p>I have installed a K8S cluster via Rancher and it is up and running. For testing purpose, I've deployed a helloworld nginx pod: </p>

<p><a href="https://i.stack.imgur.com/CrSln.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CrSln.png" alt="enter image description here"></a> </p>

<p>To call the service, I have to call the NodePort IP address, for example: </p>

<pre><code>http://111.111.111.111:30359/
</code></pre>

<p>But I would like to call it by a name, for example:</p>

<pre><code>https://helloworld.co.example.org
</code></pre>

<p>The ingress controller Nginx is installed: </p>

<pre><code>NAMESPACE       NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                  AGE
default         kubernetes             ClusterIP   10.43.0.1       &lt;none&gt;        443/TCP                  162m
dev             helloworld             ClusterIP   10.43.187.230   &lt;none&gt;        80/TCP                   17m
dev             helloworld-nodeport    NodePort    10.43.9.147     &lt;none&gt;        80:30359/TCP             17m
ingress-nginx   default-http-backend   ClusterIP   10.43.86.105    &lt;none&gt;        80/TCP                   161m
kube-system     kube-dns               ClusterIP   10.43.0.10      &lt;none&gt;        53/UDP,53/TCP,9153/TCP   161m
kube-system     metrics-server         ClusterIP   10.43.220.198   &lt;none&gt;        443/TCP                  161m
</code></pre>

<p>But it does not have <code>EXTERNAL-IP</code>. The question is, how to get it.</p>

softshipper
<p>A <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">ClusterIP</a> type service will never create an EXTERNAL IP because it's cluster-internal IP. Follow this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm" rel="nofollow noreferrer">guide</a> on how to use nginx ingress on digital ocean to expose hello world app via a hostname.</p>

<p>Following the guide after you install the nginx ingress controller it will be exposed by a LoadBalancer provided by digital ocean.</p>

<p>As you can see in the guide you will use your domain in the ingress rules.You’ll need to ensure that your domain is pointed to the Load Balancer via A records. This is done through your DNS provider.</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: hello-kubernetes-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: helloworld.co.example.org
    http:
      paths:
      - backend:
          serviceName: hello-kubernetes
          servicePort: 80
</code></pre>
