<p>I have the following rules defined in the nginx ingress rules yml:</p>
<pre><code>- host: my-domain.com
    http:
      paths:
        - path: /api
          backend:
            serviceName: api-service
            servicePort: 8080
        - path: /demo
          backend:
            serviceName: demo-service
            servicePort: 4096
        - path: /
          backend:
            serviceName: ui
            servicePort: 80
</code></pre>
<p>I have 3 services running.
What I want is that the traffic going to my-domain/demo should be redirected to the demo-service, same for /api with the api-service service, and everything else should go to the ui service. However, this sample above does not work, my-domain.com/demo goes to 404. I do not use the rewrite annotation.</p>
<p>Any idea what is wrong with the routing?</p>

Gábor Varga
<p>@GáborVarga  you need to check few things.</p>
<ol>
<li>Check the output of command &quot;kubectl get ingress&quot;, if you can see the resources.</li>
<li>What annotations you are using currently. Below is the list of few example annotations which can be used.</li>
</ol>
<pre><code>nginx.ingress.kubernetes.io/secure-backends: &quot;false&quot;
nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTP&quot;
nginx.ingress.kubernetes.io/affinity: &quot;cookie&quot;
nginx.ingress.kubernetes.io/session-cookie-name: &quot;route&quot;
nginx.ingress.kubernetes.io/session-cookie-hash: &quot;sha1&quot;
nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
nginx.ingress.kubernetes.io/session-cookie-path: &quot;/&quot;
</code></pre>
<p>These annotations are really important</p>
<pre><code>nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
nginx.ingress.kubernetes.io/session-cookie-path: &quot;/&quot;
</code></pre>
