Recall & Review
beginner
What is a ConfigMap in Kubernetes?
A ConfigMap is a Kubernetes object that stores configuration data as key-value pairs. It helps separate configuration from container images, making apps easier to manage and update.
Click to reveal answer
beginner
How do you use a ConfigMap as a mounted volume in a Pod?
You create a volume in the Pod spec that references the ConfigMap, then mount that volume into a container's file system at a specific path.
Click to reveal answer
intermediate
What happens to the files inside a ConfigMap volume when the ConfigMap is updated?
The files inside the mounted ConfigMap volume are updated automatically within a few seconds, so the container sees the latest config without restarting.
Click to reveal answer
intermediate
Can you mount only specific keys from a ConfigMap as files in a volume?
Yes, you can specify which keys to include or rename them as files using the 'items' field in the volume definition.
Click to reveal answer
beginner
Show a simple YAML snippet to mount a ConfigMap named 'app-config' as a volume at '/etc/config'.
volumes:
- name: config-volume
configMap:
name: app-config
containers:
- name: app
volumeMounts:
- name: config-volume
mountPath: /etc/config
Click to reveal answer
What is the main purpose of using ConfigMaps as mounted volumes in Kubernetes?
✗ Incorrect
ConfigMaps provide configuration data as files or environment variables inside containers.
Which Kubernetes object do you reference to mount a ConfigMap as a volume?
✗ Incorrect
You define a volume with the configMap field pointing to the ConfigMap name.
If you update a ConfigMap, what happens to the mounted files in running Pods?
✗ Incorrect
Mounted ConfigMap files refresh automatically within seconds without restarting the Pod.
How can you mount only specific keys from a ConfigMap as files?
✗ Incorrect
The 'items' field lets you select and rename keys to mount as files.
Where do you specify the mount path for a ConfigMap volume inside a container?
✗ Incorrect
The mountPath is set under volumeMounts in the container spec.
Explain how to mount a ConfigMap as a volume in a Kubernetes Pod and why this is useful.
Think about separating config from code and how files appear inside containers.
You got /4 concepts.
Describe what happens when you update a ConfigMap that is mounted as a volume in a running Pod.
Consider how Kubernetes syncs ConfigMap data to the volume.
You got /4 concepts.