CertKeen

Certified Kubernetes Application Developer (CKAD) · Free practice question 6 of 12

Kustomize namePrefix and references

A base at Kynance Water defines ConfigMap `settings` and a Deployment that mounts it. The overlay adds `namePrefix: qa-`. What does the rendered output contain?

  1. A.Both objects unchanged, because namePrefix only adds a label
  2. B.ConfigMap qa-settings, while the Deployment still references settings
  3. C.ConfigMap qa-settings, with the Deployment's volume reference also changed to qa-settings
  4. D.ConfigMap settings unchanged, because namePrefix affects only Deployments
Show answer and explanation

Correct answer: C. ConfigMap qa-settings, with the Deployment's volume reference also changed to qa-settings

Why: namePrefix prepends the prefix to the names of all resources in the kustomization and updates known references, such as ConfigMap volume and envFrom references in Pod templates, so the Deployment points to qa-settings. It is not limited to Deployments, and it changes names rather than adding labels.

More free Certified Kubernetes Application Developer (CKAD) questions