<p>I have a cluster on Digital Ocean. 1 master with 2 nodes.
I'm using the Nginx Controller with the Digital Ocean Load Balancer.
Three Items in my Ingress Service Work fine. The fourth where I use Nginx Doesn't.
Does anyone know why?</p>

<p>Here are the configs. I left out the Ingress Services for the 1st through 3rd Deployments that are working. I can add them if needed.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hello-kubernetes-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: hw1.example.com
    http:
      paths:
      - backend:
          serviceName: hello-kubernetes-first
          servicePort: 80
  - host: hw2.example.com
    http:
      paths:
      - backend:
          serviceName: hello-kubernetes-second
          servicePort: 80
  - host: hw3.example.com
    http:
      paths:
      - backend:
          serviceName: hello-kubernetes-third
          servicePort: 80
  - host: hw4.example.com
    http:
      paths:
      - backend:
          serviceName: hello-kubernetes-fourth
          servicePort: 80

</code></pre>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: hello-kubernetes-fourth
spec:
  type: ClusterIP
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: hello-kubernetes-fourth
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-kubernetes-fourth
spec:
  replicas: 3
  selector:
    matchLabels:
      app: hello-kubernetes-fourth
  template:
    metadata:
      labels:
        app: hello-kubernetes-fourth
    spec:
      containers:
      - name: nginx
        image: nginx:1.8
        ports:
        - containerPort: 8080
</code></pre>

tink3r
<p>First of all ,if you use the nginx image, the container Port should be the one exposed by the Dockerfile of the image.
For the nginx image the ContainerPort should be port 80 
<a href="https://hub.docker.com/layers/nginx/library/nginx/stable/images/sha256-cab8e4374e1e32bac58a8c7ae96c252cadcb1049545ed4bb3e3bfd5d087983b9" rel="nofollow noreferrer">https://hub.docker.com/layers/nginx/library/nginx/stable/images/sha256-cab8e4374e1e32bac58a8c7ae96c252cadcb1049545ed4bb3e3bfd5d087983b9</a> </p>

<p>Now you should test if the nginx is available by accessing the podip:containerPort from the minikube node:</p>

<pre><code>kubectl get po -o wide
hello-kubernetes-fourth-cb4fb668c-7tkd4   1/1     Running   0      25m  172.17.0.12                               

curl 172.17.0.12
</code></pre>

<p>After this, you should modify the ports of the service : targetPort should match the containerPort (80) and port 8080
Now access the Nginx by service URL:</p>

<pre><code>kubectl describe svc hello-kubernetes-fourth

curl ClusterIP:8080
</code></pre>

<p>If OK, modify also the servicePort of the ingress to match the Service Port. Don't forget to enable the ingress, as it is disabled by default on minikube:</p>

<pre><code>minikube addons enable ingress
* ingress was successfully enabled
</code></pre>

<p>after ingress pod is up, and adding in your host machine the MINIKUBEIP hw4.example.com in your /etc/hosts, you should be able to curl from the host machine:</p>

<pre><code>curl hw4.example.com
</code></pre>
