<p>After creating my application, creating the image through the Dockerfile, I proceeded to configure it in a pod of kubernetes. However, I can't reach it via IP address. In fact, I noticed that there is no ip assigned.</p>

<pre><code>NAME                  TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
kubernetes            ClusterIP   XX.XX.X.X       &lt;none&gt;        443/TCP   2d1h
app                   ClusterIP   XX.XX.XXX.XX   &lt;none&gt;        80/TCP    1h
</code></pre>

<p>I have tried to edited the file yaml to set the selector run:ning, but I do not see the external ip.</p>

<p>This is the situation of the services:</p>

<pre><code>NAMESPACE     NAME                                       TYPE           
default       service/kubernetes                         ClusterIP      
default       service/app                                ClusterIP      
kube-system   service/kube-dns                           ClusterIP      
kube-system   service/nginx-ingress-controller           LoadBalancer   
kube-system   service/nginx-ingress-controller-metrics   ClusterIP      
kube-system   service/nginx-ingress-default-backend      ClusterIP   
</code></pre>

Jonio
<p>You don't need to have an external IP when you use ingress because the traffic will come into the nginx ingress and will be routed to the app service based on the rules defined in <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource" rel="nofollow noreferrer">ingress resource</a>.The app service will just be a clusterIP type service .You need to define an ingress resource as below:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata: 
  name: app-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - http:
      paths:
        - path: /
          backend:
            serviceName: app
            servicePort: 80 # port of the service 
</code></pre>

<p>After you create above you should able to access the service by hitting the LoadBalancer IP or DNS of service <code>nginx-ingress-controller</code>.</p>

<p><a href="https://i.stack.imgur.com/9yBce.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9yBce.png" alt="ingress traffic pattern"></a></p>
