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?
- A.Both objects unchanged, because namePrefix only adds a label
- B.ConfigMap qa-settings, while the Deployment still references settings
- C.ConfigMap qa-settings, with the Deployment's volume reference also changed to qa-settings
- 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
- Generating a Pod manifest skeleton
- Downward API Pod IP as env
- fsGroup for shared volume ownership
- Indexed Job completion index
- Pulling and unpacking a chart locally
- Watching Pod status changes live
- tcpSocket probe for a non-HTTP server
- ExternalName Service for an outside host
- StatefulSet per-Pod DNS name
- Ways to consume a Secret in a container
- Checking quota usage in a namespace