<p>I have two services and use port forward to forward them in different prots of local host. For example service1 can be visited via <code>localhost:port1</code>, service2 can be visited via <code>localhost:port2</code>.</p>
<p>At some point during the workflow in service1, in service1 UI, a new link like <code>&quot;localhost:port1/_/path&quot;</code> is generate. But it actually works in service2 for that link. I can visit then link by changing port1 to port2 but I can't visit with the generated link. I mean I can visit <code>&quot;localhost:port2/_/path&quot;</code> other than &quot;<code>localhost:port1/_/path&quot;</code> which is generated by service1 backend. I want to do a port routing if path<code>&quot;_/path&quot;</code> is present in service1. How can I do that? I read the ingress documentation and can't find port routing examaples.
Thanks!</p>

Ally Qin
<p>You need to deploy nginx ingress controller and setup path based routing. follow the link for reference</p>
<p><a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/ingress-path-matching.md" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/ingress-path-matching.md</a></p>
