<p>I am trying to reproduce this configuration from regular NGinx in Kubernetes NGinx ingress:</p>
<pre><code>location /addresslookup/ {
    ...        
    proxy_pass          https://fmt-address-lookup-service:5005/addresslookup/;
}

location /geocode/ {
    ...
    proxy_pass          https://fmt-address-lookup-service:5005/geocode/;
}
</code></pre>
<p>Basically I want two different external endpoints to feed through to two different paths on the <em><strong>same</strong></em> Kubernetes service. I can see how to setup the two endpoints and point them to the service:</p>
<pre><code> rules:
  - host: api2.findmytea.co.uk
    http:
      paths:
      - path: /addresslookup/(.*)
        backend:
          serviceName: fmt-address-lookup
          servicePort: 5004
      - path: /geocode/(.*)
        backend:
          serviceName: fmt-address-lookup
          servicePort: 5004
</code></pre>
<p>But I cannot find an example of how to make it direct to a certain path on the service.</p>
<p>What am I missing?</p>

Paul Grenyer
<p>You need just one path to redirect traffic to your service.
Routing within the app should be handled by the app. So, there should be no need to define multiple paths in ingress for the same service.</p>
<p>Here are multiple examples (NodeJS/Express) how an app can handle internal routing
<a href="https://expressjs.com/en/guide/routing.html" rel="nofollow noreferrer">https://expressjs.com/en/guide/routing.html</a></p>
<p>Refer to my response to a similar thread:
<a href="https://stackoverflow.com/a/67975782/2777988">https://stackoverflow.com/a/67975782/2777988</a></p>
