0

lets say we have IngressControllerA , IngressControllerB and created Ingress Object IngressA, IngressB, how to tell IngressA object router to be pickedup by IngressControllerA and IngressB object router to be pickedup by IngressControllerB.

Any idea?

1 Answers1

0

By default the IngressController will pick up any Ingress in the cluster. What you are trying to do is called "Ingress Sharding" when different IngressControllers are managing different Ingresses.

You can shard the Ingresses by setting labels: Configuring Ingress Controller sharding by using route labels or by using namespace labels: Configuring Ingress Controller sharding by using namespace labels

So you'll need to set the routeSelector for your IngressController:

    routeSelector:
      matchLabels:
        type: sharded

Then you can label the Ingress / Route:

oc label route example type=sharded
Simon
  • 4,251
  • 2
  • 24
  • 34
  • Thank you very much, it worked fine. How to verify it that Ingress Object , picked up by a particular router. – anilkumar panditi May 06 '22 at 14:30
  • You can either check the generated configuration inside the Router Pod or try to access the Route via the Routers themselves. The Router Pods expose port 80 and 443 on the node they are running on. – Simon May 07 '22 at 06:34