January 2019
Intermediate to advanced
484 pages
11h 48m
English
ConfigMap is a resource that allows you to leave your configuration outside a Docker image. It injects the configuration data as key-value pairs into pods. Its properties are similar to secrets, but, whereas secrets are used to store sensitive data, such as passwords, ConfigMaps are used to store insensitive configuration data.
Like secrets, ConfigMaps could be based on files, directories, or specified literal value. They also have a similar syntax to secrets but use kubectl create configmap:
// create configmap# kubectl create configmap example --from-file=config/app.properties --from-file=config/database.propertiesconfigmap "example" created
Since two config files are located in the same folder name, config, we could pass a ...
Read now
Unlock full access