CKAD Application Deployment Practice Question
Which THREE of the following are valid fields in a Helm chart's values.yaml file that can be used in templates?
⚠ Common exam trap
A common mix-up: candidates confuse the content of `values.yaml` (plain YAML data) with Go template syntax used in template files, leading them to select options that contain `{{ }}` directives as if they were valid values.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
replicaCount: 3
`replicaCount: 3` is a standard top-level key in a Helm chart's `values.yaml` file. This file contains plain YAML key-value pairs that are injected into templates via the `.Values` object (e.g., `{{ .Values.replicaCount }}`). It is not a template directive itself, but a data source for templates.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
replicaCount: 3
Why this is correct
In Helm, values.yaml is a YAML file that supplies configuration defaults, and replicaCount is a conventional top-level scalar key (type integer). It is accessed in deployment templates via {{ .Values.replicaCount }} to set the replicas spec. This is valid because values.yaml accepts any YAML primitives, and Helm later merges this value with user-provided overrides such as --set replicaCount=5.
- ✗
{{ .Chart.Name }}
Why it's wrong here
This snippet is a Go template expression referencing the built-in chart object, not a values.yaml field. Inside a template, .Chart.Name outputs the name from Chart.yaml, but values.yaml cannot contain Go template actions—it is data only. A valid field would be a plain key like chartName: mychart; the curly-brace syntax is interpreted by the template engine after YAML parsing and is meaningless as a YAML key/value.
- ✗
{{- include "common.labels" . }}
Why it's wrong here
This is a Go template action, not a YAML field. The {{- ... }} syntax invokes a named template (common.labels) and the dash trims preceding whitespace; such logic belongs only in template files under templates/, not in values.yaml, which must contain pure data. Placing this in values.yaml would break chart parsing because Helm treats values as YAML, and an include directive is undefined there.
- ✓
service: type: ClusterIP port: 80
Why this is correct
This block makes the top-level key service, with its value a nested dictionary (a mapping) containing the scalar keys type and port. Values.yaml supports arbitrary depth, and this structure is a widely used convention to bundle service settings so templates can refer to {{ .Values.service.type }} and {{ .Values.service.port }}. The specific values (ClusterIP and 80) are valid YAML scalars, so this is a legal Helm values field.
- ✓
image: repository: nginx tag: latest
Why this is correct
This defines another nested mapping, with the key image holding subkeys repository and tag. It follows the common pattern of grouping container image metadata in values.yaml, often used with a full image string in templates like {{ .Values.image.repository }}:{{ .Values.image.tag }}. While similar in shape to the service block, its purpose is different—it sets the container registry and tag, and it is perfectly valid because YAML mappings can be nested arbitrarily.
Go deeper
Related to this question
About these practice questions
One of 826 original CKAD practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.