CertLumen

Certified Kubernetes Application Developer (CKAD) · Section 4 · 25% of the exam

Understand ConfigMaps

One of the objectives of the Certified Kubernetes Application Developer (CKAD) exam, in the section “Application Environment, Configuration and Security”. Here is what it covers, the points to remember and a question to try.

What it covers

ConfigMaps and Secrets keep configuration out of container images. This lesson shows how to create each one, the ways to consume them (environment variables, envFrom, volumes), what updates automatically and what does not, and the security limits of Secrets.

Points to remember

  • ConfigMaps hold non-confidential configuration; Secrets hold sensitive data; both are namespaced and limited to 1 MiB.
  • kubectl create configmap/secret generic accepts --from-literal, --from-file (key = file name) and --from-env-file (one key per line).
  • Consume them with env valueFrom (configMapKeyRef, secretKeyRef), envFrom (configMapRef, secretRef, optional prefix) or volumes.
  • Volume-mounted ConfigMaps and Secrets update eventually; environment variables and subPath mounts never update without a Pod restart.
  • A Pod can reference only ConfigMaps and Secrets in its own namespace; a missing required reference blocks the container.

Try a question

A security review finds that Secret values can be read from the etcd data files with etcdctl. Which change addresses this finding?

  1. AEnable encryption at rest for Secrets with an EncryptionConfiguration on the kube-apiserver
  2. BConvert the Secrets to use stringData instead of data so the stored values are no longer readable
  3. CMove the values into a ConfigMap
  4. DBase64-encode the values twice
Show the answer

A. Defences for Secrets: RBAC with least privilege, encryption at rest, avoiding Secrets in version control, and short-lived credentials. Base64 gives no protection.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson ConfigMaps and Secrets teaches this objective (about 50 minutes), and 14 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 24 objectives · Next objective →