<p>I am running 4 replicas of the <em>bf-v</em> instance. I am using <strong>ClientIP</strong> as a sessionAffinity.</p>
<p>I want to distribute requests based on the client IP address, but also distribute client IPs evenly (round-robin based) across replicas. I want pods to have the same number of clients. is there any way to achieve this kind of distribution? (the default round-robin gets affected by session affinity)</p>
<p>Thanks :)</p>
<p>svc.yaml</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  labels:
    app: bf-v
  name: bf-v
spec:
  ports:
  - port: 80 
  type: LoadBalancer
  selector:
    app: bf-v
  sessionAffinity: &quot;ClientIP&quot;

</code></pre>

Samo EL
<p>Two options:</p>
<p>1- Use <strong>IPVS</strong> mode with <strong>ipvs-scheduler=sh</strong>  (sh -&gt; source hashing)</p>
<p>2- Use <strong>ClientIP</strong> affinity in your svc.yaml with <strong>ipvs-scheduler=rr</strong> (rr -&gt; round robin)</p>
