I have a typical use-case and hence i wanted to check with you guys for best opinions.
We have a situation whereby we want to scale a deployment for a component (say component A). However, the component that consumes this deployment/component (say Component B) should have the POD IP addresses set within its configs (via configmap) so it can utilize all of the pods of the component A. So essentially, component B; that consumes Component A has its own load-balancing mechanism and we have to set the IPs of all the pods that are running for Compnent-A, into config of Component-B, dynamically. We can’t make use of the ‘kubernetes service’; atleast for now, until we do some code re-writing.
So what we want to check is if there was a way such that
whenever there is change in the Pods of Component-A’s deployment (no autoscaling but say when a pod restarts, or manual replica number increased),
The config-map of Component B is updated and the IP(s) of the PODs of Component-A is added/removed/updated according to the operation, and
Component-B is restarted.