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?
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