<p>I got the following architecture:</p>
<pre><code>     [Service]
    /    |    \
 [Pod1][Pod2][Pod3]
</code></pre>
<p>We assert the following Pod IPs:</p>
<ul>
<li>Pod 1: 192.168.0.1</li>
<li>Pod 2: 192.168.0.2</li>
<li>Pod 3: 192.168.0.3</li>
</ul>
<p>I am executing a loop like this:</p>
<pre><code>for ((i=0;i&lt;10000;i++)); do curl http://someUrlWhichRespondsWithPodIP &gt;&gt; curl.txt; done;
</code></pre>
<p>This writes the pods IP 10000 times. I expected it to be round robin schemed but it was not. File looks similar to this:</p>
<pre><code>192.168.0.1
192.168.0.1
192.168.0.3
192.168.0.2
192.168.0.3
192.168.0.1
</code></pre>
<p>The service config looks like this:</p>
<pre><code>kind: Service
metadata:
  name: service
spec:
  type: NodePort
  selector:
    app: service
  ports:
  - name: web
    protocol: TCP
    port: 31001
    nodePort: 31001
    targetPort: 8080
</code></pre>
<p>Anyone has an idea what kind of internal load balancing Kubernetes is using?</p>

elp
<p>You are probably using the default <code>iptables</code> mode of kube-proxy, which uses iptables NAT in random mode to implement load balancing. Check out the <code>ipvs</code> support (<a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs</a>) for a big pile of other modes including round robin.</p>
