<p>I have an <em>unsecured</em> <code>Postfix</code> instance in a container that listens to port <code>25</code>. This port is not exposed using a <code>Service</code>. The idea is that only a <code>PHP</code> container that runs inside the same pod should be able to connect to Postfix and there is no need for additional <code>Postfix</code> configuration .</p>

<p>Is there any way for other processes that run in the same network or <code>Kubernetes</code> cluster to connect to this <em>hidden</em> port? </p>

<p>From what I know, only other containers in the same Pod can connect to an unexposed port, via <code>localhost</code>.</p>

<p>I'm interested from a security point of view.</p>

<p><em>P.S. I now that one should make sure it has multiple levels of security in place but I'm interested only theoretically if there is some way to connect to this port from outside the pod.</em></p>

<p>Yes, you can use <code>kubectl port-forward</code> to set up a tunnel directly to it for testing purposes. </p>
