https://rancher.com/ logo
#rancher-desktop
Title
# rancher-desktop
f

future-keyboard-11621

11/02/2022, 12:10 PM
I am using traefik and tried to setup redirectRegex with the following config:
Copy code
apiVersion: <http://traefik.containo.us/v1alpha1|traefik.containo.us/v1alpha1>
kind: Middleware
metadata:
  name: favicon-redirectregex
spec:
  redirectRegex: 
    regex: ^<https://dev>\.account\.domain\.com/public/favicon(.*)
    replacement: <https://dev.account.domain.com/public/local_favicon.ico>
I also registered it as:
Copy code
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: ciam-public-alb
  annotations: 
    <http://traefik.ingress.kubernetes.io/router.middlewares|traefik.ingress.kubernetes.io/router.middlewares>: favicon-redirectregex
But now none of my url-s load at all, I am getting 404 on every page. Why would this be happening?
j

jolly-forest-99711

11/02/2022, 4:50 PM
I'm not too sure, but I wonder if it's something to do with the version of traefik you're running.
I wonder if you'd have better luck with an
IngressRoute
rather than an
Ingress
?
f

future-keyboard-11621

11/03/2022, 9:32 AM
Yes thats the conclusion I came to also
Copy code
An ingressRoute is specific to Traefik. It's not native to Kubernetes. It is a Custom Resource Definition which allows you to take advantage of Traefik features not exposed in the Kubernetes ingress resource
72 Views