NGINX Ingress Compatibility: nginx.ingress.kubernetes.io/use-regex Annotation Not Working

Hi,

We have Traefik 3.6.6 version, and we have the following ingress rule configured with regex, and kubernetesIngressNginx.enabled: true is enabled. Basic routing works as expected, but routing with regex does not work, unlike in the ingress-nginx gateway.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
name: python-ingress
spec:
rules:

  • host: python-ingress.a.b.c
    http:
    paths:
    • backend:
      service:
      name: python-svc
      port:
      number: 5000
      path: /test/[0-9]+
      pathType: ImplementationSpecific

As per the documentation, the regex NGINX annotation is supported by Traefik. However, it is not working in our case. Could you please help us with this?

Use 3 backticks before and after code/config to improve readability and preserve spacing, which is important in yaml.