<p>We have the following in GoogleCloud Kubernetes:
3 REST API Pods which take POSTs and send them to clients that are connected via Websocket.</p>
<p>If one of those Pods is posted on, we want to send this post to all other pods.
The question is: How / Where can we find the IPs of the other Pods?</p>

Zu Jiry
<p>You can find the pod IP using the below and try hitting the IP but suggest you expose a service to do this.</p>
<pre><code>kubectl get po -n test -o wide 
NAME   READY   STATUS             RESTARTS   AGE   IP           NODE      NOMINATED NODE   READINESS GATES
pod1   1/1     Running            0          98m   10.42.0.16   worker3   &lt;none&gt;   &lt;none&gt;        
pod6   1/1     Running            0          87m   10.44.0.26   worker1   &lt;none&gt;   &lt;none&gt;        
</code></pre>
<p>To expose a service:</p>
<pre><code>kubectl expose pod/pod1 -n test --name=svc --port=80 --target-port=80


kubectl run bb --image=busybox -n test -it --rm -- sh
If you don't see a command prompt, try pressing enter.
wget -O- svc:80
Connecting to svc:80 (10.101.174.245:80)
writing to stdout
&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;
</code></pre>
