I am deploying a spring boot application and is considering various options for externalize configuration. I came to know below options.
1) ConfigMap
2) properties/yaml file in Git and a process in container to watch for changes and restart the application with new properties if there are any changes.
This is not only related to application only, But can be relevant for other components as well like proxies(apache RP,nginx)/load balancers etc.
Thanks
Both are good options to handle configuration.
Git approach has the advantage of versioned configuration but you'll need an extra container to be coded and maintained.
For me configmap is the best option. As it is a Kubernetes native object you don't need a git repo nor a git container, it is just stored and preserved in etcd, much more easy to maintain.
Moreover, there are some open source projects that can help you with using configmaps: I use kube-backup to have a versioned copy of every config,and configmapcontroller to auto-rollout deployments when a configmap changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With