Common config in Kubernetes ConfigMap

3/16/2020

Kubernetes already provides a way to manage configuration with ConfigMap.

However, I have a question/problem here.

If I have multiple applications with different needs deployed in Kubernetes, all these deployments might share and access some common config variables. Is it possible for ConfigMap to use a common config variable?

-- edwin
configuration
configuration-management
devops
kubernetes

1 Answer

3/16/2020

There are two ways to do that.

  • Kustomize - Customization of kubernetes YAML configurations (developed as kubernetes sigs, and had been integrated into kubectl command line). But currently it isn't mature enough if compare with helm chart

https://github.com/kubernetes-sigs/kustomize

  • Helm chart - The Kubernetes Package Manager. Its vaules.yaml can define the vaule for same configuration files (in your case, they are configmap) with variables.

https://helm.sh/

-- BMW
Source: StackOverflow