Menu
Coddy logo textTech

ConfigMaps

Part of the Introduction to Kubernetes section of Coddy's Terminal journey. Lesson 26 of 45.

Settings such as a colour theme or a log level should not be baked into the image, otherwise every change means a rebuild. Kubernetes stores them in a ConfigMap: a named set of key/value pairs that Pods can read.

Create one from literal values:

kubectl create configmap app-config --from-literal=COLOR=blue --from-literal=MODE=dev

Kubernetes answers configmap/app-config created. List them with kubectl get configmaps (short form cm).

To see the values, describe the ConfigMap:

kubectl describe configmap app-config

The Data section lists every key with its value. ConfigMaps are for plain settings, not for secrets: anyone who can read the object sees the values.

challenge icon

Challenge

Beginner

Create a ConfigMap named app-config with two keys, COLOR set to blue and MODE set to dev, then describe it to see the values.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction to Kubernetes

Practice on your own: Terminal playground