<p>I have a Kubernetes Service that selects by doing:</p>

<pre><code>spec: 
  selector: 
    backend: nlp-server
</code></pre>

<p>If there are multiple <code>Pods</code> which match the selector, which <code>Pod</code> does the <code>Service</code> route a request to?  </p>

<p>I am using the default <code>ClusterIP</code> setup. Search for "ClusterIP: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. This is the default ServiceType." in the <a href="https://kubernetes.io/docs/concepts/services-networking/" rel="nofollow noreferrer">docs</a></p>

<p>If I want the Service to route to a Pod that makes sense (having lesser load),<br>
is the <a href="https://kubernetes.io/docs/concepts/services-networking/#internal-load-balancer" rel="nofollow noreferrer">internal load-balancer</a> what I need?</p>

cryanbhu
<p>In a nutshell, no you don't need the internal load-balancer you linked to. The <code>Service</code> resource <em>is</em> indeed a load-balancer. Depending on the <a href="https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies" rel="noreferrer">proxy mode</a> it could be round-robin or random. If you're going with the default (iptables-based proxy) it would be a <a href="http://kubernetesbyexample.com/services/" rel="noreferrer">random pod selected</a> every time you hit the virtual IP of the service.</p>

<p>Note: you <em>could</em> use the internal load-balancer type, typically in a cloud environment <a href="https://medium.com/google-cloud/internal-load-balancing-for-kubernetes-services-on-google-cloud-f8aef11fb1c4" rel="noreferrer">such as GKE</a>, for example to cut down on costs when all you need is cluster-internal connectivity, however they are (as far as I know) usually L4 load-balancers. </p>
