<p><strong>Requirement</strong> :
I have two docker containers where both expose to different ports. (For eg port 9001 and 9002)</p>

<p>From the requirement,  I try to design the kubernetes objects and their relationships but I am unsure whether A or B is correct.</p>

<p>A) 1 Ingres connect to 1 service. And 1 service connect to 1 statefulset with 1 pod of 2 containers</p>

<p>B) 2 Ingres connect to 2 services. And 2 service connect to 2 statefulset with 2 pod. Every pod have 1 container.</p>

<p>I want to ask the following questions:</p>

<ol>
<li>Can 1 Ingres or 1 service or 1 statefulset or 1 pod serves 2 ports? If can then probably A is correct, else B is correct.</li>
<li>Also base on my question, can anyone tell me whether my understanding of kubernetes is correct or wrong?</li>
</ol>

Charles Brown
<p>You can run two containers on the same pod,
The Java can run on port 8080
And the Eheterum can run on port 3306.</p>

<p>Then you can use localhost:8080 from within the container to reach the Java, and the java can reach the etherum on localhost:3306.</p>

<p>If no access from outside the cluster is required Ingress is not required.</p>

<p>Hope that it answers your question.</p>
