Kubernetes docs describe configuring pods with ConfigMaps. doc ![]()
Use the 'kubectl create configmap' command to create configmaps from directories, files, or literal values:
kubectl create configmap <map-name> <data-source>
# Understanding ConfigMaps
ConfigMaps allow you to decouple configuration artifacts from image content to keep containerized applications portable. The ConfigMap API resource stores configuration data as key-value pairs. The data can be consumed in pods or provide the configurations for system components such as controllers. ConfigMap is similar to Secrets, but provides a means of working with strings that don’t contain sensitive information. Users and system components alike can store configuration data in ConfigMap.
Note: ConfigMaps should reference properties files, not replace them. Think of the ConfigMap as representing something similar to the Linux /etc directory and its contents. For example, if you create a Kubernetes Volume from a ConfigMap, each data item in the ConfigMap is represented by an individual file in the volume.
.
This separation of concerns closely matches the environment config repos we have been creating with our own deployments.
Also notice the similar pattern of using a Map for config & grouping with filesystem abstractions of directories and files.
Kubernetes also separate secrets from general config.
Looks to me like vault will still be a better solution for secrets. For the sake of this discussion what interests me is the pattern of separating an app (or micro-cluster) from config and secrets. doc
.