Spring Cloud Kubernetes ConfigWatcher

Photo by Ross Findon on Unsplash
  • Event :: Which is the default mode where it Watches for the changes on the Configmap or secrets by using the WebSockets of Kubernetes API. Any Event produces a re-check on the configuration and on detecting the change reload is triggered. This is where the Role setup comes to rescue where a view role set on the service account was required in order to listen for the config map changes.
  • Polling :: You have the option to set the polling period that periodically recreates the configuration from config map and secrets to see if it has changed.
  • Using HTTP where application needs to be exposed with /refresh actuator endpoint and should be accessible from within the cluster.
  • Using Spring Cloud Bus with the help of message broker running inside the cluster.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amit Kumar

Amit Kumar

A passionate programmer with curiosity to learn and share the knowledge.