<p>I'm quite new to Kubernetes: my question may be more a question of design than of code.
I was wondering: how Kubernetes can handle communication between one pod and replicas of another pods?
My case is simple I have an API pod which pass parameters provided by an UI to a compute unit pods. I will have many replicas of the CU pods depending of my needs, they're waiting for the API to pass them a parameter to work with.
Each CU pod has to work with a different parameter: they're all working the same way but not with the same parameter.
How can I make my API pod aware of the CU pods available to send them the parameter so they can work.
Is it automatic? Is it at least possible or is my cluster poorely designed?</p>

<p>I thought of another way to do this: as soon as my api get a parameter from the ui it will deploy a CU pod with, for example, the parameter given as an environment variable and the CU can work with it.</p>

<p>Thank you in advance for your help!</p>

Romain Martin
<p>Suppose You have 5 CU pods running and ClusterIP service for them. Now when you send request to that service, load balancing will happen internally and service will forward request to a pod which is having less load. This is to maintain high availability of your backend pods. So in your case even if some of CU pods are down, you will not get affected</p>

<p>You need more number of pods than expected requests. Also use Autoscale to dynamically increase pods</p>
