How to scope a TLSOption's namespace in a Kubernetes Ingress annotation?

I am trying to use a k8s Ingress with Traefik and want to add mTLS verification to that Ingress. So, I have defined a TLSOption in the same namespace as the Ingress. Now in the docs at https://doc.traefik.io/traefik/routing/providers/kubernetes-ingress/#on-ingress I can use the annotation as traefik.ingress.kubernetes.io/router.tls.options: foobar but this does not say anything about the namespace the TLSOption is in. When using an IngressRouter, the namespace has to be mentioned when using a TLSOption.

So, how do I specify the namespace of the TLSOption in an Ingress annotation. Do I need to mention if the TLSOption and Ingress are in the same namespace?

Did anyone find the answer to this question? How to address the tlsoption in the Ingress annotation correctly?

Via traefik.ingress.kubernetes.io/router.tls.options: <resource-namespace>-<resource-name>@kubernetescrd

(Source: TLS - Traefik)

1 Like