Many applications require configuration using some combination of configuration
files, command line arguments, and environment variables. These configuration
artifacts are decoupled from image content in order to keep containerized
The ConfigMap object provides mechanisms to inject containers with
configuration data while keeping containers agnostic of OpenShift Container Platform. A
ConfigMap can be used to store fine-grained information like individual
properties or coarse-grained information like entire configuration files or JSON
The ConfigMap API object holds key-value pairs of configuration data that
can be consumed in pods or used to store configuration data for system
components such as controllers. ConfigMap is similar to secrets, but
designed to more conveniently support working with strings that do not contain
sensitive information. For example:
ConfigMap Object Definition
bar: L3Jvb3QvMTAw (2)
||Contains the configuration data.
||Points to a file that contains non-UTF8 data, for example, a binary Java keystore file.
Enter the file data in Base 64.
You can use the
binaryData field when you create a ConfigMap from a binary
file, such as an image.
Configuration data can be consumed in pods in a variety of ways. A ConfigMap
can be used to:
Populate the value of environment variables.
Set command-line arguments in a container.
Populate configuration files in a volume.
Both users and system components can store configuration data in a