<p>I've a question.</p>
<p>How can I run a netstat command in a pod A from a pod B?, pod A and B are in a different namespace. My pod A stablish connection with a server outside the cluster and my pod B contains a script that convert netstat result in SNMP traps. I can't modify pod A image to include anything. Pod B it's from my own.</p>
<p>Thanks.</p>

Oscar Cervantes
<p>If there's no network policies in place then something like this should work :</p>
<pre><code>kubectl exec -it &lt;pod B&gt; -- sh
&gt; ssh user@podA.podAnamespace &quot;your command&quot;
</code></pre>
<p>Note that <code>ssh</code> must be installed on the podB and you must have a user to connect with on Pod A.</p>
