As i mentioned in https://github.com/containous/traefik/issues/5751. I am using IngressRoutes to define rules to send traffic to several services within k8s.
Most of the services exist within k8s but a few are outside of k8s. So normally we are route to them from k8s services by using ExternalName services, however it appears these dont work with traefik. So, Im trying to find a way to route outside of k8s for a few rules.
I've named the service gateway-legacy-svc and the router gateway-legacy to avoid confusion.
I assume that the Traefik pod is able to contact the URL http://gateway-lagacy.mydomain.internal:8000/. You can verify it by spawning an interactive shell inside traefik's pod with kubectl exec -ti --namespace=<traefik namespace> <traefik pod id> -- sh and curl-ing the URL from this shell: # apk add --no-cache curl && curl -v http://gateway-lagacy.mydomain.internal:8000/
rule = "PathPrefix(`/legacy`)"
service = "gateway-legacy-svc" # Traefik Service Reference
url = "http://gateway-lagacy.mydomain.internal:8000/"