fabric8io / spring-cloud-kubernetes

Kubernetes integration with Spring Cloud
Apache License 2.0
702 stars 198 forks source link

Parallel of Spring Config Server in Kubernetes #87

Open deepank-sharma opened 6 years ago

deepank-sharma commented 6 years ago

This is just a question. We are using Spring Config Server today, We have multiple apps, environments etc. Configs for which are activated using spring application name and spring profile active arguments. What is the best approach that we can take to have the same flexibility over Kubernetes. Config Map is definitely an option, but if we use fabric8 maven plugin to deploy our apps into a Kubernetes cluster, and we need different configs for different environment, how do we inject configs per environment based on spring profiles. Any POC or a github repository would be useful. Thanks in advance. Cheers !!

nkravi commented 6 years ago

We did the same thing. We started with spring cloud later moved on to kubernetes. Kubernetes is way more clean way of maintaining configuration for different environments . Developer need not worry about where the application runs. There are many ways of using config maps (environment variable, as file). We have used it as a file.

deepank-sharma commented 6 years ago

@nkravi Thanks for your response. Can you share some information on how do you manage and deploy your Pods with different config maps per environment using the same image. If there is a POC repository would be really helpful. Also what are the ways you have implemented to refresh the configs in the application. Thanks in advance.

ravi-k8 commented 5 years ago

I am also looking for a solution in which configMap properties are loaded based on the activated profile like dev ,prod.

@deepank-sharma Please post if you have got any solution. Thanks in advance.