I have multiple pods for the same microservices in a kubernetes cluster. Each pod has exactly one instance of the microservice. All these pods are behind a network load balancer. I hit the LB with /refresh end point, and this refreshed only config for the container of the pod that it load balanced. Is there a way to refresh configs for containers of all pods for this microservice by not individually call each containers?
There is currently no way in Kubernetes to do this without making a request to all endpoints individually. You can get all endpoint addresses from the service with kubectl get endpoints <service-name>
.
See also Kubenetes: Is it possible to hit multiple pods with a single request in Kubernetes cluster and the referenced GitHub issue #18755.