I’m working on a kubernetes ingress nginx migration and have a number of existing ingress records working on the original nginx ingress controller.
I have deployed a new traefik ingress to the cluster with the kubernetesIngressNginx option enabled.
kubectl exec -it -n traefik traefik-8d6d9b886-vbfxz -- traefik version
Version: 3.6.6
Codename: ramequin
Go version: go1.24.11
Built: 2025-12-29T15:47:44Z
OS/Arch: linux/amd64
Traefik is seeing the nginx routes and creating rules for them.
I have an issue with on that is using an annotation
nginx.ingress.kubernetes.io/use-regex*:* "true"
When I access the endpoint on the nginx loadbalancer it is working but when I access it on the traefik load balancer it returns a 404.
This is listed as supported on the Traefik migration guides but Traefik it seems to be escaping the path when it creates the rule.
When I look at the output of the /api/rawdata I get this for the detected ingress
{
"web-default-regex-test-ingress-rule-0-path-0@kubernetesingressnginx": {
"entryPoints": [
"websecure"
],
"service": "default-regex-test-ingress-echo-service-80",
"rule": "Host(`regex-test.example.com`) \u0026\u0026 PathRegexp(`^/api/v\\\\d\\{1\\}/users`)",
"ruleSyntax": "default",
"priority": 69,
"tls": {
"options": "default"
},
"observability": {
"accessLogs": true,
"metrics": true,
"tracing": true,
"traceVerbosity": "minimal"
},
"status": "enabled",
"using": [
"web"
]
}
}
The ingress record is
apiVersion: networking.k8s.io/v1
kind: Ingressmeta
data:
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
name: regex-test-ingress
namespace: default
spec:
ingressClassName: nginx
rules:
- host: regex-test.example.com
http:
paths:
- backend:
service:
name: echo-service
port:
number: 80
path: /api/v\d{1}/users
pathType: ImplementationSpecific
The traefik pod is running with this set of options:
- args:
- --entryPoints.metrics.address=:9100/tcp
- --entryPoints.traefik.address=:8080/tcp
- --entryPoints.web.address=:8000/tcp
- --entryPoints.websecure.address=:8443/tcp
- --api.dashboard=true
- --ping=true
- --metrics.prometheus=true
- --metrics.prometheus.entrypoint=metrics
- --providers.kubernetescrd
- --providers.kubernetescrd.allowEmptyServices=true
- --providers.kubernetesingress
- --providers.kubernetesingress.allowEmptyServices=true
- --providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik
- --providers.kubernetesgateway
- --providers.kubernetesgateway.statusaddress.service.name=traefik
- --providers.kubernetesgateway.statusaddress.service.namespace=traefik
- --providers.kubernetesgateway.experimentalchannel=true
- --providers.kubernetesingressnginx
- --providers.kubernetesingressnginx.controllerclass=k8s.io/ingress-nginx
- --providers.kubernetesingressnginx.ingressclass=nginx
- --entryPoints.websecure.http.tls=true
- --log.level=DEBUG
- --accesslog=true
- --accesslog.format=json
- --accesslog.fields.defaultmode=keep
- --accesslog.fields.headers.defaultmode=keep
Is there something I should be doing extra to get this configuration to work in traefik?