Setting up Middleware redirectRegex within kubernetes

Hello,

I have this middleware :

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: redirect
spec:
  redirectRegex :
    permanent: true
    regex: "^https://some.domain.com(.*)"
    replacement: "https://otherdomain.com"

and this IngressRoute:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: traefik-app
spec:
  tls:
    secretName: {{ .Values.tlsSecret }}
    domains:
    - main: domain.com
  entryPoints:
    - entrypoint-https
  routes:
  - kind: Rule
    match: Host(`some.domain.com`)
    middlewares:
      - name: redirect
    services:
    - name: noop
   ...other working rules...

All my rules are working fine except the redirect regex.

When I try to navigate expecting the redirection, I got 404.
And on the dashboard, I don't see my rule, I don't know what I'm doing wrong.

Ok I needed to point an existing service even if I don't use it.

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