Routing two separate services for the same Host with Traefik 2

Hello everyone,

To summarize what I'm trying to achieve with IngressRoute crds:

  • I need service A to be accessible from example.com
  • I need service B to be accessible from example.com/api

So far I tried these rules:

  • Service A: Host(example.com) [with the back ticks of course]
  • Service A: Host(example.com) && PathPrefix(/api/)

But traffic for /api/ also flows to Service A instead of B.
I'm curious as if this is something achievable.

Thanks in advance.

1 Like

Got it to work..Mods can delete.

Mods can delete.

What are you referring? Can you provide an example of the config that worked for you?

How'd you resolve? Have same issue.