Kubernetes Container Orchestration Helm and Package Management 3 — Questions and Answers
Question 1: What is the effect of using `helm upgrade --install` when a release does not yet exist?
- It throws an error because the release must exist first
- It performs an install instead of an upgrade (Correct answer)
- It creates the release in a pending state awaiting approval
- It upgrades the chart version only, not the configuration
Correct answer: It performs an install instead of an upgrade
`helm upgrade --install` is idempotent — it installs the release if it doesn't exist or upgrades it if it does.
Question 2: Which Helm template function is used to look up a value with a fallback default?
- {{ .Values.key | required }}
- {{ .Values.key | default "fallback" }} (Correct answer)
- {{ .Values.key | coalesce "fallback" }}
- {{ .Values.key | fallback "fallback" }}
Correct answer: {{ .Values.key | default "fallback" }}
The `default` pipeline function returns the second argument when the first is empty or nil.
Question 3: What is stored in Helm's release secret (or configmap) in Kubernetes?
- The chart source code and templates
- The rendered manifests and release metadata encoded in the secret (Correct answer)
- The values.yaml file in plain text
- The chart's CRD definitions
Correct answer: The rendered manifests and release metadata encoded in the secret
Helm stores release state (rendered manifests, metadata, status) as base64-encoded data in Kubernetes Secrets (default) or ConfigMaps.
Question 4: How do you render Helm chart templates locally without deploying them?
- helm dry-run ./chart
- helm template myrelease ./chart (Correct answer)
- helm render ./chart --local
- helm preview ./chart
Correct answer: helm template myrelease ./chart
`helm template` renders chart templates locally and outputs the resulting Kubernetes YAML without contacting the cluster.
Question 5: What is a Helm subchart (also called a dependency chart)?
- A chart that must be installed before the parent chart
- A chart packaged within or declared as a dependency of a parent chart (Correct answer)
- A chart that extends another chart via inheritance
- A lightweight chart with no configurable values
Correct answer: A chart packaged within or declared as a dependency of a parent chart
Subcharts are dependencies declared in `Chart.yaml` under `dependencies`, downloaded into the `charts/` directory.
Question 6: In Helm, what does the `{{ include }}` function do differently than `{{ template }}`?
- It includes external files from the filesystem
- `include` can be used in pipelines because it returns a string, while `template` outputs directly (Correct answer)
- `include` renders templates asynchronously for performance
- `include` automatically escapes HTML in the output
Correct answer: `include` can be used in pipelines because it returns a string, while `template` outputs directly
`include` is preferred over `template` because its output can be piped through functions like `indent` or `nindent`.
Question 7: Which file in a Helm chart defines the minimum Helm version required to use it?
- values.yaml
- Chart.yaml (Correct answer)
- requirements.yaml
- .helmignore
Correct answer: Chart.yaml
The `kubeVersion` and `helmVersion` constraints are specified in `Chart.yaml` using SemVer range syntax.
What is the effect of using `helm upgrade --install` when a release does not yet exist?