ConfigMaps
A ConfigMap stores configuration data as plain key-value pairs and makes it available to pods without baking the config into the container image. This lets you change configuration without rebuilding or redeploying the image.
A single ConfigMap can hold many keys. Values can be anything — a short string, a JSON blob, or a multi-line file. When you mount a ConfigMap as a volume, each key becomes a file in the mounted directory. When you inject keys as environment variables, each key becomes an env var inside the container.
警告
ConfigMaps are not encrypted. Do not store passwords, tokens, or private keys in a ConfigMap — use a Secret instead.