Spring cloud config with kubernetes

7/31/2018

I was evaluating spring cloud config as a way to externalize my app configs. Long term goal is to get my app on to kubernetes. Is it advisable to go with spring cloud config or better adopt config map once I am in kubernetes.

-- Anand Sunderraman
kubernetes
spring-cloud-config

1 Answer

7/31/2018

It depends what you're trying to do. If you want your config centralised in a github repository or if kubernetes isn't your only deployment platform then you might prefer the spring cloud config server.

If you're just trying to externalise your configuration so that your spring boot apps play well in kubernetes then you could certainly use configmaps. Or if you don't have that many properties you might even just set environment variables. If some of the config is more sensitive then you'd want to look at secrets (a question that can get more complex, depending on how sensitive the config is).

You mention kubernetes as a 'long term goal' so perhaps you need a strategy for the short-term too. Perhaps you could use overriding with environment variables for now. It depends how much overriding you're likely to do and what your transitional platform is.

-- Ryan Dawson
Source: StackOverflow