<p>I've developed a python script, using <a href="https://github.com/kubernetes-client/python/" rel="nofollow noreferrer">python kubernetes-client</a> to harvest Pods' internal IPs.</p>
<p>But when I try to make an http request to these IPs, from another pod, I get <code>Connection refused</code> error.</p>
<p>I spin up a temporary <code>curl</code> container:</p>
<pre><code>kubectl run curl --image=radial/busyboxplus:curl -it --rm
</code></pre>
<p>And having the internal IP of one of the pods, I try to make a <code>GET</code> request:</p>
<pre><code>curl http://10.133.0.2/stats
</code></pre>
<p>and the response is:</p>
<pre><code>curl: (7) Failed to connect to 10.133.0.2 port 80: Connection refused
</code></pre>
<p>Both pods are in the same <code>default</code> namespace and use the same default <code>ServiceAccount</code>.</p>
<p>I know that I can call the Pods thru the <code>ClusterIP</code> service by which they're load-balanced, but this way I will only access a single Pod at random (depending which one the service forwards the call to), when I have multiple replicas of the same Deployment.</p>
<p>I need to be able to call each Pod of a multi-replica Deployment separately. That's why I'm going for the internal IPs.</p>

Milkncookiez
<p>I guess you missed the port number here</p>
<p>It should be like this</p>
<p><code>curl POD_IP:PORT/stats</code></p>
