<p>We have one service which has two exposed ports- one is for server and second is for management. Kubernetes cluster have NGINX controller running. Is there any way to expose both the ports of service in Ingress YAML file?
Details:
Service server Port : 8081
Service Management Port: 8082
We tried with two "backends" in Ingress YAML file but it works only for default port which is 80 and fail for any other port. 
ingress.yml file is as below:</p>

<pre><code>kind: Ingress
apiVersion: extensions/v1beta1
metadata:
  name: bw-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
   - host: my.host.net
     http:
      paths:
      - path: "/controller/"
        backend:
          serviceName: bw-svc1
          servicePort: 80
       - path: "/actuator/"
         backend:
           serviceName: bw-svc2
           servicePort: 5612
</code></pre>

Rahul
<p>The indentation level of both paths is not equal in your config sample.</p>

<p>Other than that your config looks correct and should result in the following behavior:</p>

<ol>
<li>All traffic coming to the cluster via <code>my.host.net/controller</code> will be sent to service <code>bw-svc1:80</code></li>
<li>All traffic coming to the cluster via <code>my.host.net/actuator</code> will be sent to service <code>bw-svc2:5612</code></li>
</ol>

<p>If this is not what you'd like to achieve, could you please re-phrase your question?</p>
