There are two primary ways to expose configuration data into your container:
- Connecting the keys from one or more ConfigMaps into environment variables that are set for your Pod
- Kubernetes can map the data from one or more ConfigMaps into volumes that are mounted in your Pod
The primary difference is that environment variables are typically set once at the start of invoking your container and are generally simple string values, where as ConfigMaps mounted as data in volumes can be more complex and will get updated if you update the ConfigMap resource.