April 2018
Intermediate to advanced
374 pages
8h 35m
English
When defining a Pod specification, in addition to the mandatory name and image key, you can specify an env key. The environment key requires a name, and you can add a key that makes a reference using valueFrom: to get data from a ConfigMap.
For example, to expose our example configuration as an environment variable, you could add the following stanza to a Pod specification:
env: - name: LOG_LEVEL_KEY valueFrom: configMapKeyRef: name: example-config Key: log.level
You can include multiple environment variables in the Pod specification, and each can reference a different ConfigMap if you have your configuration split up into multiple pieces to make it easier (or more sensible) to administer.
You can also map the entirety ...
Read now
Unlock full access