<p>I understand what a Cluster IP service is and everything, I just don't understand the 'behind the scenes' and routing. Can someone PLEASE explain it to me!</p>
<ol>
<li><p>A request is made to the Cluster IP service. If this service is serving multiple pods, how does the service choose which pod to send the request to, what is controlling and deciding that?</p>
</li>
<li><p>Once a pod is chosen and the request is sent to it are there iptables (added by kube-proxy) within that pod mapping the service to its corresponding pods and the pod then forwards/load-balances that request off again? unless it's that pods turn to process the request?</p>
</li>
</ol>
<p>Thank you so much</p>

jssteele89
<p>Let me try my best to help you out. Cluster IP is not exposed to the outer network it is automated and K8s manage its traffic in the round-robin scheme. It also depends upon resources. Let's suppose you have one Frontend app and it has 4 pods with cluster-IP service running on 4 working nodes of k8s. These CLuster IPs talking to a backend app. Now k8s will auto-scal the load accordingly. It all depends on what policies you have set for resources ( Like how much CPU RAM or storage each pod can use). If you don't set any policies the resources can be auto-scale. It also depends on which pod is running on which node and what the spec of each node has(maybe one node is more powerful than the other). Let's say one pod is running on node-x which is the most powerful node and you don't have any resource policies on the pod level then most of the traffic will go to that pod which is running on the powerful node. If you have all the nodes with equal specs and no pod-level policies then K8s will distribute the traffic equally on each pod. K8s decide with leftover resources on the node level to distribute the traffic and it's done by Scheduler API. I hope this helps.</p>
