<p>I have an NGINX in front of several PODs, exposed through ClusterIP: none.</p>

<p>NGINX is forwarding traffic to these nodes like that:</p>

<pre><code>upstream api {
   server my-api:1066;
}
</code></pre>

<p>Will this configuration distribute traffic evenly among all PODs behind the <code>my-api</code> hostname?
Will failing PODs be removed from the hostname resolution?</p>

<p>The default traffic distribution for Kubernetes services is random based on the default <a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-iptables" rel="nofollow noreferrer">proxy mode: iptables</a>.  (This is likely your case)</p>

<p>In very old Kubernetes versions (&lt;1.1) the default <a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-iptables" rel="nofollow noreferrer">proxy mode: userspace</a> would default to round-robin (you can still switch to that mode if you'd like to)</p>

<p>The newer way (&lt; 1.8) of doing round robin (optionally) is to use <a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs" rel="nofollow noreferrer">proxy mode: ipvs</a>.</p>

<p>You can also look at other solutions like <a href="https://cilium.io/" rel="nofollow noreferrer">Cillium</a> that provide load balancing capabilities.</p>
