Docsity

Exam Contributor Developing Helm Charts Practice Exam, Exams of Technology

Toggle sidebar
bg1
Exam Contributor Developing Helm
Charts Practice Exam
**Question 1.** Which component of Helm 3 is responsible for rendering chart templates into
Kubernetes manifests?
A) Tiller
B) Helm CLI
C) kube-apiserver
D) Helm Repository
Answer: B
Explanation: In Helm 3 the Helm CLI (client) performs template rendering locally; Tiller was
removed.
**Question 2.** In a chart’s `Chart.yaml`, the field `appVersion` is used to:
A) Define the Helm chart version using semantic versioning.
B) Specify the version of the application the chart deploys.
C) List the required Kubernetes API versions.
D) Set the default namespace for releases.
Answer: B
Explanation: `appVersion` records the version of the underlying application, not the chart itself.
**Question 3.** Which directory contains the Go template files that generate Kubernetes
resources?
A) `templates/`
B) `charts/`
C) `values/`
D) `hooks/`
Answer: A
Explanation: The `templates/` directory holds the manifest templates that Helm renders.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56

Partial preview of the text

Download Exam Contributor Developing Helm Charts Practice Exam and more Exams Technology in PDF only on Docsity!

Charts Practice Exam

Question 1. Which component of Helm 3 is responsible for rendering chart templates into Kubernetes manifests? A) Tiller B) Helm CLI C) kube-apiserver D) Helm Repository Answer: B Explanation: In Helm 3 the Helm CLI (client) performs template rendering locally; Tiller was removed. Question 2. In a chart’s Chart.yaml, the field appVersion is used to: A) Define the Helm chart version using semantic versioning. B) Specify the version of the application the chart deploys. C) List the required Kubernetes API versions. D) Set the default namespace for releases. Answer: B Explanation: appVersion records the version of the underlying application, not the chart itself. Question 3. Which directory contains the Go template files that generate Kubernetes resources? A) templates/ B) charts/ C) values/ D) hooks/ Answer: A Explanation: The templates/ directory holds the manifest templates that Helm renders.

Charts Practice Exam

Question 4. When installing a chart, Helm creates a release. Which of the following best describes a release? A) A packaged .tgz file stored in a repository. B) A specific instance of a chart deployed to a Kubernetes cluster. C) The version number of a chart. D) A collection of subcharts. Answer: B Explanation: A release is a running instance of a chart with a unique name in a cluster. Question 5. Which Helm command updates the dependencies listed in a chart’s Chart.yaml? A) helm dep build B) helm dependency update C) helm upgrade D) helm repo add Answer: B Explanation: helm dependency update resolves and downloads chart dependencies. Question 6. In Helm templates, the built‑in object {{ .Values }} represents: A) The chart’s metadata. B) The release name. C) User‑provided configuration values. D) The Kubernetes API capabilities. Answer: C

Charts Practice Exam

Answer: A Explanation: define creates a named template; it must be quoted. Question 10. When overriding a subchart’s value from the parent chart, which key should be used? A) global B) subchart C) dependencies D) subchartName Answer: B Explanation: Values are overridden using the subchart’s name as the top‑level key. Question 11. What is the purpose of values.schema.json in a Helm chart? A) To define default values. B) To validate user‑provided values against a JSON schema. C) To list chart dependencies. D) To store secret data. Answer: B Explanation: The schema file enforces data types and required fields for values. Question 12. Which Helm hook type runs after a resource is successfully deleted? A) pre-delete B) post-delete C) pre-upgrade D) post-install

Charts Practice Exam

Answer: B Explanation: post-delete hooks execute after the delete operation completes. Question 13. How can you assign a higher execution priority to a Helm hook? A) By setting hook-weight annotation with a larger integer. B) By naming the hook file with a numeric prefix. C) By placing the hook in the hooks/ directory. D) By adding priority: high in Chart.yaml. Answer: A Explanation: helm.sh/hook-weight annotation determines hook ordering; larger values run later. Question 14. Which command runs the tests defined in a chart’s templates/tests/ directory? A) helm test <release> B) helm lint <chart> C) helm verify <release> D) helm upgrade --test Answer: A Explanation: helm test creates test pods defined under templates/tests/. Question 15. What does the helm package command produce? A) A Docker image. B) A compressed .tgz chart archive. C) A Helm repository index file.

Charts Practice Exam

D) helm.sh/hook-delete-policy: never Answer: B Explanation: hook-succeeded removes the hook resource when it finishes successfully. Question 19. How can you pass a secret value to a chart without storing it in values.yaml? A) Use the --set-string flag with the secret. B) Store it in a ConfigMap and reference it. C) Use an external secret manager and the lookup function. D) Encode it in base64 inside Chart.yaml. Answer: C Explanation: The lookup function can retrieve Kubernetes secrets at render time, enabling external secret management. Question 20. Which Helm command validates a chart against its values.schema.json without installing it? A) helm lint B) helm verify C) helm test D) helm inspect values Answer: A Explanation: helm lint checks the chart and validates values against the schema. Question 21. When using the default function in a template, what is returned if the first argument is empty? A) An error is thrown. B) The second argument (default value).

Charts Practice Exam

C) The string “null”. D) The original empty value. Answer: B Explanation: default provides a fallback value when the first argument is nil or empty. Question 22. Which of the following statements about the global values key is true? A) It can only be used in library charts. B) It propagates values to all subcharts automatically. C) It overrides the chart’s appVersion. D) It is ignored during Helm upgrades. Answer: B Explanation: global values are shared across the parent chart and its subcharts. Question 23. What is the effect of setting helm.sh/hook-weight: "-5" on a hook? A) The hook will run before hooks with higher (less negative) weight. B) The hook will be ignored. C) The hook will run after all other hooks. D) The weight must be positive; Helm will reject it. Answer: A Explanation: Hooks are ordered by weight; lower (more negative) values run earlier. Question 24. Which command lists all releases in the current Kubernetes context? A) helm list B) helm status C) helm history

Charts Practice Exam

D) --set cannot override nested values. Answer: B Explanation: Command‑line --set values have the highest precedence. Question 28. Which annotation disables a subchart’s deployment without removing it from Chart.yaml? A) helm.sh/disable: true B) condition: subchart.enabled C) tags: disabled D) enabled: false in the parent values. Answer: D Explanation: Setting subchart.enabled: false in parent values disables that subchart. Question 29. What does the helm lint command check for? A) Only syntax errors in templates. B) Chart structure, template rendering, and schema validation. C) Runtime performance of the chart. D) Security vulnerabilities in container images. Answer: B Explanation: helm lint validates chart files, renders templates, and checks schemas. Question 30. Which of the following is the correct way to reference a file’s contents inside a template? A) {{ .Files.Get "config.yaml" }} B) {{ .File.Read "config.yaml" }}

Charts Practice Exam

C) {{ .Values.Get "config.yaml" }} D) {{ .Chart.File "config.yaml" }} Answer: A Explanation: .Files.Get reads a file from the chart archive. Question 31. When a Helm release is rolled back, which resource version is restored? A) The latest successful deployment. B) The initial install version only. C) The version specified by helm rollback --revision. D) The chart’s version in the repository. Answer: C Explanation: helm rollback restores the release to a specific revision number. Question 32. Which command signs a Helm chart using a GPG key? A) helm sign <chart.tgz> B) helm package --sign C) helm verify --sign D) helm gpg sign <chart> Answer: B Explanation: helm package --sign creates a signed provenance file. Question 33. In Helm, the lookup function is used to: A) Retrieve values from another chart. B) Query live Kubernetes objects during template rendering. C) Search for files inside the chart archive.

Charts Practice Exam

C) Set requiredAPIVersion in values.yaml. D) Helm cannot enforce API version checks. Answer: A Explanation: .Capabilities.APIVersions.Has checks for supported API groups/versions. Question 37. Which of the following is a valid way to define a map variable inside a template? A) {{ $myMap := dict "key1" "value1" "key2" "value2" }} B) {{ $myMap = {"key1":"value1"} }} C) {{ $myMap := {"key1":"value1"} }} D) {{ $myMap := map "key1":"value1" }} Answer: A Explanation: dict creates a map in Go templates. Question 38. When using helm upgrade --install, what happens if the release does not exist? A) Helm returns an error. B) Helm creates a new release (install). C) Helm upgrades a dummy release. D) Helm only validates the chart. Answer: B Explanation: --install causes Helm to install the chart if the release is absent. Question 39. Which annotation is used to specify that a hook should be deleted before a new hook of the same name is created? A) helm.sh/hook-delete-policy: hook-succeeded

Charts Practice Exam

B) helm.sh/hook-delete-policy: before-hook-creation C) helm.sh/hook-delete-policy: hook-failed D) helm.sh/hook-delete-policy: never Answer: B Explanation: before-hook-creation removes previous hook resources prior to creating a new one. Question 40. In a chart’s values.yaml, which syntax denotes a list of strings? A) mylist: [ "a", "b", "c" ] B) mylist: "a,b,c" C) mylist: { a, b, c } D) mylist: "a" "b" "c" Answer: A Explanation: YAML list syntax uses brackets or hyphens; the bracket form is valid. Question 41. Which Helm command displays the rendered manifests for a chart without installing it? A) helm template B) helm render C) helm preview D) helm diff Answer: A Explanation: helm template outputs the rendered Kubernetes YAML. Question 42. What does the {{- (dash) syntax do in a Helm template?

Charts Practice Exam

Question 45. Which of the following best describes the purpose of the helm test command’s “test pods”? A) They replace the main application pods. B) They run temporary containers to verify chart functionality. C) They permanently add monitoring sidecars. D) They create a new namespace for the release. Answer: B Explanation: Test pods are short‑lived containers that perform functional checks. Question 46. In Helm, the {{ .Capabilities.KubeVersion.Version }} expression returns: A) The version of Helm itself. B) The version of the Kubernetes cluster. C) The chart’s required Kubernetes version. D) The version of the Docker engine. Answer: B Explanation: .Capabilities.KubeVersion.Version reflects the cluster’s version string. Question 47. Which of the following is a recommended practice for handling secrets in Helm charts? A) Store raw secret values in values.yaml. B) Encode secrets in base64 and place them in the chart. C) Use external secret management tools and reference them via lookup. D) Hard‑code secrets in the template files. Answer: C Explanation: External secret managers reduce risk; lookup can fetch existing secrets.

Charts Practice Exam

Question 48. What does the helm get manifest <release> command output? A) The original chart files. B) The rendered Kubernetes manifests of the release. C) The release’s history. D) The values used for the release. Answer: B Explanation: helm get manifest shows the final manifest applied to the cluster. Question 49. Which Helm feature allows you to share a chart across multiple repositories without duplication? A) Chart aliasing B) OCI registry support C) Chart mirrors D) Chart version pinning Answer: C Explanation: Chart mirrors let you point to the same chart in different repository URLs. Question 50. When a chart uses a named template defined in _helpers.tpl, how is it invoked? A) {{ include "mychart.mytemplate". }} B) {{ template "mychart.mytemplate". }} C) {{ .Files.Get "mytemplate" }} D) {{ define "mychart.mytemplate" }} Answer: B

Charts Practice Exam

Answer: B Explanation: --keep-history retains the release record after deletion. Question 54. What is the effect of adding {{- if .Values.enabled }} around a resource definition? A) The resource will always be rendered. B) The resource is rendered only when enabled is true. C) Helm will throw an error if enabled is missing. D) The resource will be rendered as a comment. Answer: B Explanation: The if block conditionally includes the resource based on the value. Question 55. Which Helm command can be used to view a chart’s metadata without downloading the chart archive? A) helm show chart <repo/chart> B) helm inspect chart <repo/chart> C) helm get chart <repo/chart> D) helm view chart <repo/chart> Answer: A Explanation: helm show chart displays the Chart.yaml contents. Question 56. In a Helm chart, the {{ .Release.IsUpgrade }} boolean indicates: A) The chart is being installed for the first time. B) The current operation is an upgrade. C) The release is a pre‑release version.

Charts Practice Exam

D) The release is a rollback. Answer: B Explanation: .Release.IsUpgrade is true during an upgrade operation. Question 57. Which of the following best explains the purpose of the helm dependency build command? A) It validates the chart’s schema. B) It packages the chart and its dependencies into a single archive. C) It resolves dependencies and places them in the charts/ directory. D) It removes unused dependencies. Answer: C Explanation: helm dependency build downloads and extracts required subcharts. Question 58. What does the helm repo add command do? A) Uploads a chart to a remote repository. B) Registers a new chart repository URL locally. C) Deletes a chart from the local cache. D) Generates an index.yaml for a repository. Answer: B Explanation: helm repo add adds a remote repository definition to the local Helm config. Question 59. Which annotation controls the cleanup policy for a Helm hook that creates a Job? A) helm.sh/hook-delete-policy: hook-succeeded B) helm.sh/hook-delete-policy: before-hook-creation