<p>My actual configuration is the following:
I'm using RKE to create my cluster.
I'm using AWS servers as nodes in my clusters
I have a cluster of 3 nodes and 3 pods (1 by node) deployed as statefulSet and a load balancer with thoses 3 pods as endpoints.
This statefulSet execute a readiness probe, and then sometimes pods are not ready.</p>

<p>What I'm trying to do is to have a load balancer with the following policy:</p>

<p>Load balancer receive request from IP address A, it redirect it to endpoint X.</p>

<p>Load balancer receive a new request from IP address A, it redirect it to the same endpoint X.</p>

<p>Load balancer receive request from IP address B, it redirect it to endpoint Y.</p>

<p>Load balancer receive request from IP address A, but endpoint X not ready because of readiness test fail so it redirect request to endpoint Y.</p>

yatsukino
<p>I think most load balancers should be able to perform this task. For example, AWS ELB has a group attribute to enable sticky sessions (session that associate an IP with a specific server). </p>

<p>If you are using the <a href="https://kubernetes-sigs.github.io/aws-alb-ingress-controller/" rel="nofollow noreferrer">alb-ingress-controller</a> (for example) to create the Load Balancer from Kubernetes based on the ingress in Kubernetes, you can attach the following label to the alb-ingress-controller to define sticky sessions: <code>alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=60</code>.</p>

<p>I would validate your other requirements with regards to the Load Balancer as I think most known Load Balancers should have this capability.</p>
