ConfigMap¶
ConfigMap is an API object used in Kubernetes to store non-confidential data in key-value pairs.^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md] It allows for the decoupling of environment-specific configuration from container images, ensuring that applications remain portable across different environments^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md#L48-L50].
Core Functionality¶
As a specific type of [[Volume]], the ConfigMap is primarily designed to handle configuration files, such as environment variables or database initialization settings^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md#L50-L52] Pods can consume ConfigMaps as environment variables, command-line arguments, or as configuration files in a volume^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md].
Characteristics¶
- Data Format: Unlike [[Secrets]], which are used for sensitive data, ConfigMaps are intended for non-sensitive data^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md].
- Storage: Data is stored in plain text (or base64 for binary data) without the specific encoding mechanisms applied to sensitive objects^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md].
- Consumption: When injected into a container, the ConfigMap creates a directory or files that reflect the key-value data defined in the object^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md].
Related Concepts¶
- Kubernetes
- [[Secrets]]
- [[Volume]]
Sources¶
^[400-devops__06-Kubernetes__k8s-ithelp__Day16__README.md]