<p>I have bunch of applications in a Kubernetes cluster, they connect to each other, like SpringBoot application connect to RabbitMQ. They all are in containers.</p>

<p>Usually standalone SpringBoot app reads configs from application.yaml/bootstrap.yaml but AFAIK in case of Kubernetes cluster it reads it from ConfigMap, and address of counter services should be stored there ( is it?)</p>

<p>So the question is: in case of RabbitMQ pod's redeploy ( e.g. fail and restart) how SpringBoot is triggered to reread new configs? Who triggers it? When?</p>

J.J. Beam
<p><a href="https://spring.io/projects/spring-cloud-kubernetes" rel="nofollow noreferrer">Spring cloud kubernetes</a> has <a href="https://cloud.spring.io/spring-cloud-static/spring-cloud-kubernetes/1.0.0.M2/multi/multi__propertysource_reload.html" rel="nofollow noreferrer">proertysource reload</a> feature and is able to trigger an application reload when a related ConfigMap or Secret changes. So if rabbitmq endpoint changes you can update the configMap and application will reload automatically and pick up the new config. But in a real production scenario you will have a stable endpoint for rabbitmq exposed via kubernetes <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">services</a>. Even though pod IPs may change the service IP or DNS will remain same.</p>

<p>The rabbitmq should be deployed as <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">StatefulSet</a> providing table, unique network identifiers.</p>
