<p>This is an awfully basic question, but I just don't know the answer. I have an app which should have three containers -- front end, back end and database containers.</p>

<p>Now they serve on different ports request data from different ports.</p>

<p>So I read that in a Pod, it's a local network and the containers can communicate. Does nginx come in to this? My understanding is that it does not as the pod manages the comms between the containers. My understanding is that nginx only is required for serving outside requests and load balancing across a cluster of identical containers round-robin style.</p>

<p>If someone could help me out with understanding this I'd be ver grateful.</p>

<ol>
<li>You deploy FE, BE, and DB in different pods (different deployments) to scale/manage them separately. Better even in different namespaces.</li>
<li>Create a k8s <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">service</a> of type ClusterIP for BE &amp; DB. Use k8s DNS resolver to access them - <code>service-name.namespace.svc.cluster.local</code></li>
<li>Create a k8s <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">service</a> of type LoadBalancer or NodePort for FE to expose it outside of k8s. Use Load Balancer address or node-ip:node port to access it.</li>
</ol>
