0

I would like kubernetes when i'm sending a request to a Service which response is 204 would be send to all the pods in the ReplicaSet and not only one.

For example GET to http://srvaxivln090:30000/hotel/start This will start a service to start consume messages from a jms-queue.

I have a 3 ReplicaSet and when sending the request only one POD starts to consume the messages from the queue (the one taht receives the request)

How can i configure kubernetes that for certain requests/rules the request will be send to all the pods ?

Thank you

  • I don't think Kubernetes has this functionality out of the box. You may be able to achieve it with a external load balanced service. And have your rules configured in the external load balancer that you control – Colwin Apr 04 '18 at 16:57
  • Answer is here: https://stackoverflow.com/questions/49612412/kubenetes-is-it-possible-to-hit-multiple-pods-with-a-single-request-in-kubernet – Ramandeep Singh Sep 09 '20 at 13:45

1 Answers1

0

This was asked for as a feature and then denied.

However, kubectl get endpoints <your-service> provides a list of IPs that you can use to route to each of the pods. You can build a little something that does this (you probably want -o json) and mirrors the requests across each of them.

Xiong Chiamiov
  • 13,076
  • 9
  • 63
  • 101