<p>Is it possible to send requests to all pods behind a service/ingress controller based on the requests?</p>
<p>My requirement is to send requests to all the pods if the request is /send/all.</p>

<p>It's not possible because ingress controller can't do this (for sure nginx and GLBC based ingress can't do it, bud due to the way how to http works I assume this is the case for all ingress controllers).</p>

<p>Depending what your exact case is you have few options.</p>

<p>If your case is just monitoring and you can afford using control on number of request sending to your pods you can just set http <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">liveness probe</a> for your pods. Then you will be sure that if pod doesn't return correct response k8s won't send traffic to it.</p>

<p>If you need to trigger some action on all pods you have few options:</p>

<p>Use messaging - for example you can use <a href="https://github.com/kubernetes/charts/tree/master/stable/rabbitmq" rel="nofollow noreferrer">rabbitmq chart</a> to deploy rabbitmq and write some application that will handle your traffic.</p>

<p>Using DB - create some app that will set some flag in DB abd add some logic to your app to monitor the flag, or create <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">cron job</a> and to monitor the flag and trigger and trigger required actions on pods (in this case you can <a href="https://stackoverflow.com/questions/50202961/kube-config-how-to-make-it-available-to-a-rest-service-deployed-in-kubernetes/50203659#50203659">use service account</a> to give your cron job pod to k8s API to list pods.</p>
