Using kubernetesIngressNginx to support nginx ingress routes ingressClasses are not deployed

Hello,

i’am trying to test the migration for k8s nginx ingress (ingress api) to traefik using kubernetesIngressNginx.

Since i always deploy2 nginx-ingress classes (intern and extern), i have them namespaced in the way that the external has nginx-external and the internal nginx-internal is ingressClassName - so this is how my ingress routes are created.

Thus i deployed 2 different traefiks (in different namespaces).

To keep the thing simple here, lets look at the external-variant only this is the example for the external traefik in the namespace “traefik-external”

---
# we deploy we tf loadbalancer to align internal / external deployment
service:
  externalIPs: [ myExternalIp ] 


deployment:
  replicas: 2
providers:
  kubernetesCRD:
    enabled: false
  kubernetesIngress:
    enabled: false
  kubernetesIngressNginx:
    enabled: true
    controllerClass: "k8s.io/external-ingress-nginx"
    ingressClass: "nginx-external"
    ingressClassByName: true

logs:
  general:
    level: INFO

ingressRoute:
  dashboard:
    enabled: false

But still the deployed ingress by traefik is

kubectl get ingressClass
\NAME               CONTROLLER                      PARAMETERS   AGE
traefik-external   traefik.io/ingress-controller   <none>       24m

And thus my ingress routes are not working. I deploy my ingress route with ingressClassName: nginx-external

What am i doing wrong?

I got it working by adding

ingressClass:
  enabled: true
  isDefaultClass: false
  name: "nginx-external"

but this is rather suprising to be honest, enabling kubernetesIngressNginx and setting the ingressClass there should configure this ingressClass implicitly, or the other way around. There is nothing in the docs that suggest that one has to manually sync that setup.

I would suggest this is an unneeded trap for traefik starters that are evaluating Traefik as an k8s nginx ingress replacement.