Home > Software engineering >  Is it possible to configure multiple master nodes to prefer routing to different nodes
Is it possible to configure multiple master nodes to prefer routing to different nodes

Time:05-12

Imagine a scenario where I have 3 classes of worker node (A,B,C) and 2 master nodes (X,Y) as part of a Kubernetes cluster. There maybe multiple worker nodes of each class. Is it possible to route the traffic such that traffic arriving at the different master nodes is routed to a different set of worker nodes. For example I want master node X to route traffic to workers of class A and potentially fail over to class B under heavy load and for master node Y to route traffic to nodes of class C but also use B as a failover when needed.

Sorry if this scenario seems a bit contrived but I was struggling to word my question.

Thanks,

Rich

CodePudding user response:

As correctly pointed out in the comments, the traffic is not handled by the master nodes; its responsibility, at a high level, is to observe and maintain the desired state of the Kubernetes resources deployed in the worker nodes, as well as to push any changes to them.

That being said, yes, it is possible to discriminate and send the traffic to different worker nodes using Topology Aware Hints:

Topology Aware Hints enable topology aware routing by including suggestions for how clients should consume endpoints. This approach adds metadata to enable consumers of EndpointSlice and / or Endpoints objects, so that traffic to those network endpoints can be routed closer to where it originated.

This feature is specifically designed to handle traffic in a multi-zone environment and has a series of built-in Safeguards to prevent situations like overload of an endpoint, insufficient endpoints in a zone, etc.

  • Related