<p>I'm having an issue where because an application was originally configured to execute on docker-compose.
I managed to port and rewrite the .yaml deployment files to Kubernetes, however, the issue lies within the communication of the pods. </p>

<p>The frontend communicates with the backend to access the services, and I assume as it should be in the same network, the frontend calls the services from the localhost. 
I don't have access to the code, as it is an proprietary application that was developed by a company and it does not support Kubernetes, so modifying the code is out of question.</p>

<p>I believe the main reason is because the frontend and backend are runnning on different pods, with different IPs. </p>

<p>When the frontend tries to call the APIs, it does not find the service, and returns an error.
Therefore, I'm trying to deploy both the frontend image and backend image into the same pod, so they share the same Cluster IP.</p>

<p>Unfortunately, I do not know how to make a yaml file to create both containers within a single pod.</p>

<p>Is it possible to have both frontend and backend containers running on the same pod, or would there be another way to make the containers communicate (maybe a proxy)?</p>

<p>Yes, you just add entries to the <code>containers</code> section in your yaml file, example:</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
name: two-containers
spec:
    restartPolicy: Never
containers:
    - name: nginx-container
      image: nginx
    - name: debian-container
      image: debian
</code></pre>
