How to send a request to all running pods

5/17/2020

Assuming that the pods have exposed port 80.

How to send a requets to all the running pods, rather than 1.

Since the load balancer would route the traffic to only 1 pod. (Note : using HAproxy load balancer here, FYI)

-- shrw
kubernetes

1 Answer

5/17/2020

There is no particular way, kubectl exec only works one container at a time so you will need to call it into a loop if you want to use it on many.

-- coderanger
Source: StackOverflow