<p>There are TCP ports that should not be exposed to the outside world, but are isolated between several containers in a network.</p>
<p>To access such a port for debugging purposes, <code>kubectl port-forward</code> can be used from outside the container network. E.g. for access to a non-exposed k8s database on a developer workstation: <code>kubectl port-forward pods / app-dev-database-0 5432: 5432 -n app</code></p>
<p><strong>Is there a Podman equivalent for <code>kubectl port-forward</code> to set up port forwarding from the Podman host to an existing and running container?</strong></p>

Simon Schürg
<p>I do not think podman has such an option. There is a 'network' option available in podman. However, it is for creating container networks and not the purpose of port forwarding.</p>
<p>To answer your question, I think socat is the only option</p>
<pre><code># socat TCP4-LISTEN:5431 TCP4:10.89.1.10:5432
</code></pre>
<p>Here anyone connects to 5431 port of the server will be redirected to a container IP and port 10.89.1.10:5432</p>
