# How to set ingressClass on IngressRoute CRD?

**URL:** <https://community.traefik.io/t/how-to-set-ingressclass-on-ingressroute-crd/18778>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress\
**Created:** [May 31, 2023, 3:01pm UTC](https://community.traefik.io/t/how-to-set-ingressclass-on-ingressroute-crd/18778 "2023-05-31T15:01:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjg23](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@jjg23](https://community.traefik.io/u/jjg23)\
**Post date:** [May 31, 2023, 3:01pm UTC](https://community.traefik.io/t/how-to-set-ingressclass-on-ingressroute-crd/18778/1 "2023-05-31T15:01:40Z")

</div>

I'm deploying separate internal and external ingress controllers. I have set isDefaultClass: false on the second, and given it a unique ingresClass name in providers: kubernetesCRD: ingressClass:

My question is how to specify this ingressClass in my IngressRoute resources? The docs mention using the "[kubernetes.io/ingress.class](http://kubernetes.io/ingress.class)" annotation here: [Kubernetes IngressRoute & Traefik CRD - Traefik](https://doc.traefik.io/traefik/providers/kubernetes-crd/#ingressclass)

however this annotation is considered deprecated: [Ingress | Kubernetes](https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation)

Is this still the best way to specify an ingressClass?

Thanks!
