0
0
Kubernetesdevops~5 mins

Updating ConfigMaps and propagation in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a ConfigMap in Kubernetes?
A ConfigMap is a Kubernetes object used to store non-confidential configuration data in key-value pairs. It allows you to separate configuration from container images to keep containers portable.
Click to reveal answer
beginner
How do you update a ConfigMap in Kubernetes?
You can update a ConfigMap by editing it with 'kubectl edit configmap <name>' or by applying a new YAML file with 'kubectl apply -f '.
Click to reveal answer
intermediate
Does updating a ConfigMap automatically update the pods using it?
No, updating a ConfigMap does not automatically update pods. Pods must be restarted or recreated to pick up the new ConfigMap values.
Click to reveal answer
intermediate
What is a common method to propagate ConfigMap changes to running pods?
A common method is to delete pods so that the Deployment or ReplicaSet recreates them with the updated ConfigMap, or to trigger a rolling update by changing pod template annotations.
Click to reveal answer
advanced
Can ConfigMap changes be automatically reflected inside a running container without restart?
ConfigMap changes mounted as files in volumes can be updated inside running containers, but applications must watch and reload the config. Environment variable changes require pod restart.
Click to reveal answer
Which command updates a ConfigMap from a YAML file?
Akubectl apply -f configmap.yaml
Bkubectl run configmap.yaml
Ckubectl create pod configmap.yaml
Dkubectl delete configmap.yaml
After updating a ConfigMap, what must you do to apply changes to pods using it?
ANothing, pods update automatically
BRestart or recreate the pods
CRun 'kubectl update pods'
DDelete the ConfigMap
How can you trigger a rolling update to propagate ConfigMap changes?
AEdit the ConfigMap directly inside the pod
BDelete the ConfigMap
CRun 'kubectl scale deployment'
DChange pod template annotations
Which ConfigMap mounting method allows live updates inside running containers?
APassed as environment variables
BEmbedded in container image
CMounted as files in volumes
DStored in pod annotations
What happens if you update a ConfigMap but do not restart pods using it?
APods continue using old config
BPods automatically reload new config
CPods crash immediately
DPods delete themselves
Explain how ConfigMap updates propagate to running pods in Kubernetes.
Think about pod lifecycle and how config is loaded.
You got /4 concepts.
    Describe the difference between ConfigMap data mounted as environment variables versus as files regarding updates.
    Consider how containers read environment variables vs files.
    You got /4 concepts.