Redirect to external site without service

Is it possible to redirect 'subdomain.example.com' to 'https://thirdpartywebsite.com/foo/bar' without having a service inside my cluster? If I specify an empty 'services' array in my IngressRoute manifest, I get the following error inside the Traefik dashboard. 'the services "default-subdomain-redirect-87gas8d7ga8sdgf@kubernetescrd" does not exist'

Traefik provides a special internal service for that called noop@internal.

Unfortunately there is not so much (actually not any) documentation on the internal services.

There is an open issue to add this to the dos: add noop@internal in the docs · Issue #7291 · traefik/traefik · GitHub

Best,
razr

Thanks!

Do you know what version it was introduced in?

As this is the service, that is also used for redirects configured on entrypoint level, I'd assume it was introduced with 2.0.0. But this is just a guess.

There are even more of those internal services. Like you might have seen api@internal already, which is used for the dashboard, for example.

Hmm, looks like it's not working in my version. Looking at the repo, it seems it was introduced in this commit: Entry point redirection and default routers configuration · traefik/traefik@a6040c6 · GitHub

Which was released in v2.2.0-rc1

Seems so, yes.

So maybe, if you still use an older version, you need to configure the noop service yourself, like shown in Traefik v1 to v2 - Traefik | Site | v2.1

If I understand it correctly, that service can just get some arbitrary IP and port, as traffic will never hit that host anyways.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.