<p>We are  developing an application microservices based. They will be deployed to kubernetes with Helm Package Manager and all of them stored their own repository and helm chart. Below are the names of our microservices.</p>

<p>My confusion is, before the deployment how can I specify that backend's pod needs to be communicate with UI's , API's and Auth's Pods.App can know to make a connection to UI/AUTH/whatever but what is the best way to manage this between microservices pods.</p>

<p><a href="https://i.stack.imgur.com/fy9zZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fy9zZ.png" alt="Architecture"></a></p>

<ol>
<li>Backend </li>
<li>UI  </li>
<li>API   </li>
<li>Auth</li>
</ol>

semural
<p>The recommended way to manage the communication between microservices in Kubernetes is to use <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noreferrer">Services</a>.</p>
<p>Basically, you need to wrap each of your microservices into a cluster IP service, then you are able to access its by the use of it's unique DNS record / Environment variables / by the use of a service mesh framework, like <a href="https://linkerd.io/2/overview/" rel="noreferrer">Linkerd</a></p>
<p>You can have one helm chart per microservice. That helmchart will contain yaml files for everything related to that microservice: deployments, config maps, secrets, etc., but also for the service (it's better to have a separate yaml file for it).</p>
<p>By the use of services, it's easy for the backend service to communicate with the rest of services, because the IP addresses of all the services will be injected in environment variables of the backend container, as you can see <a href="https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services" rel="noreferrer">here</a></p>
<p>So you just have to update your backend app to read the IP of the microservice you want to connect to (from env variables) and then you are able to connect to it.</p>
