# Clarification on changing --ingress-class when deploying under isolated namespaces

**URL:** <https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [April 8, 2020, 1:17pm UTC](https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977 "2020-04-08T13:17:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/drs/32/1535_2.png) [@drs](https://discuss.konghq.com/u/drs)\
**Post date:** [April 8, 2020, 1:17pm UTC](https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977/1 "2020-04-08T13:17:48Z")

</div>

Hello. The documentation on running multiple ingress controllers in the same cluster suggests[1] that I can use namespaces to isolate/coordinate which ingresses and kongingresses should affect which ingress controller. However, the documentation for CLI arguments[2] says that the `--ingress-class` argument is to be used when multiple ingress controllers are deployed on the same _cluster_ (not namespace). If I’m using namespace-based isolation, do I still need each ingress controller to specify a unique ingress class?

[1] [https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/concepts/deployment.md#multiple-ingress-controllers](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/concepts/deployment.md#multiple-ingress-controllers)  
[2] [https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/references/cli-arguments.md](https://github.com/Kong/kubernetes-ingress-controller/blob/master/docs/references/cli-arguments.md)

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 8, 2020, 4:53pm UTC](https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977/2 "2020-04-08T16:53:28Z")

</div>

> [@drs](#):
>
> If I’m using namespace-based isolation, do I still need each ingress controller to specify a unique ingress class?

The way I like to think about `ingress.class` annotation is that it is a way to prevent multiple Ingress Controllers to fight over an Ingress resource. If you can ensure that in a specific namespace, there is only one ingress controller responsible for satisfying the Ingress resources, then you don’t need to use ingress class.

---

<div class="post-metadata">

**Author:** ![mkuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/mkuna/32/1861_2.png) [@mkuna](https://discuss.konghq.com/u/mkuna)\
**Post date:** [April 21, 2020, 12:45pm UTC](https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977/3 "2020-04-21T12:45:20Z")

</div>

> [@hbagdi](#):
>
> If you can ensure that in a specific namespace, there is only one ingress controller responsible for satisfying the Ingress resources

How can you ensure there is only one ingress controller serving the Ingress resources in namespace? I have installed Ingress controller in one namespace, and it does handle/serve ingress created in another namespace.

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [April 22, 2020, 9:00pm UTC](https://discuss.konghq.com/t/clarification-on-changing-ingress-class-when-deploying-under-isolated-namespaces/5977/4 "2020-04-22T21:00:44Z")

</div>

> [@mkuna](#):
>
> How can you ensure there is only one ingress controller serving the Ingress resources in namespace? I have installed Ingress controller in one namespace, and it does handle/serve ingress created in another namespace.

Depends on how your setup is.

If you have multiple cluster-level Ingress Controllers running, then you have to use ingress-class.

If you have ingress controllers that are scoped to namespaces, then all you need to do is ensure that there is only one controller running in a namespace.
