<p>I have two Redis containers running on a K8s worker node. One is controlled by a Deployment (redisdeploymet1) and the other is a standalone Docker container that I created locally on worker1 (outside the knowledge of K8s)“:</p>
<pre><code>root@worker1:~# docker ps | head -1 ; docker ps  | grep redis | grep -v pause
CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS      NAMES
bc7b6fd74187   redis                  &quot;docker-entrypoint.s…&quot;   4 minutes ago    Up 4 minutes    6379/tcp   nervous_vaughan
3c6fc536e265   redis                  &quot;docker-entrypoint.s…&quot;   42 minutes ago   Up 42 minutes              k8s_redis_redisdeploymet1-847d97
</code></pre>
<p>Why shouldn’t we see the PORT details on both entries above? I have actually tested them; both are indeed listening on 6379.</p>
<p>My ultimate goal is to identify which ports a specific Pod is listening on. Let's say the Dockerfile is not available.</p>
<p>Thanks</p>

Mehdi
<p>You can use <code>docker port</code> command.</p>
<ul>
<li><code>docker port &lt;container_id&gt;</code>: List port mappings or a specific mapping for the container</li>
</ul>
