<p>What's the best way to get the IP addresses of the other kubernetes pods on a local network?</p>

<p>Currently, I'm using the following command and parsing the output: <code>kubectl describe pods</code>.</p>

<p>Unfortunately, the command above often takes many seconds to complete (at least 3, and often 30+ seconds) and if a number of requests happen nearly simultaneously, I get 503 style errors. I've built a caching system around this command to cache the IP addresses on the local pod, but when a 10 or so pods wake up and need to create this cache, there is a large delay and often many errors. I feel like I'm doing something wrong. Getting the IP addresses of other pods on a network seems like it should be a straightforward process. So what's the best way to get them?</p>

<p>For added details, I'm using Google's kubernetes system on their container engine. Running a standard Ubuntu image. </p>

<hr>

<p><strong>Context</strong>: To add context, I'm trying to put together a shared memcached between the pods on the cluster. To do that, they all need to know eachother's IP address. If there's an easier way to link pods/instances for the purposes of memcached, that would also be helpful.</p>

<p>Have you tried</p>

<pre><code>kubectl get pods -o wide
</code></pre>

<p>This also returns IP addresses of the pods. Since this does not return ALL information <code>describe</code> returns, this might be faster.</p>
