




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. What primary role does Helm play in the Kubernetes ecosystem? A) Container runtime management B) Network policy enforcement C) Package management and deployment simplification D) Node provisioning Answer: C Explanation: Helm acts as a package manager for Kubernetes, allowing users to define, install, and upgrade complex applications through reusable charts, thereby simplifying deployments.
Question 2. Which architectural change distinguishes Helm 3 from Helm 2? A) Introduction of the Tiller component B) Removal of Tiller and adoption of client‑side only operations C) Shift from Go templates to Jinja D) Mandatory use of Helm repositories hosted on Docker Hub Answer: B Explanation: Helm 3 eliminated the server‑side Tiller component, moving all release management to the client, which improves security and simplifies installation.
Question 3. In Helm terminology, what is a “Release”?
A) A versioned chart stored in a repository B) An instantiated deployment of a chart in a Kubernetes cluster C) A Helm plugin for custom commands D) The process of deleting a chart Answer: B Explanation: A Release represents a specific instance of a chart that has been installed into a Kubernetes cluster, complete with its own configuration and state.
Question 4. Which file defines the metadata (name, version, description) of a Helm chart? A) values.yaml B) Chart.yaml C) templates/_helpers.tpl D) README.md Answer: B Explanation: Chart.yaml contains the chart’s essential metadata, including its name, version, description, and dependencies.
Question 5. What command adds a new chart repository to Helm’s local configuration? A) helm repo add
C) To list chart dependencies D) To specify the chart’s license Answer: B Explanation: values.yaml provides default values that templates can reference via .Values, and users can override these during install or upgrade.
Question 8. Which directory holds the actual Kubernetes manifest templates in a Helm chart? A) charts/ B) templates/ C) .helm/ D) docs/ Answer: B Explanation: The templates/ directory contains Go‑template files that Helm processes to generate Kubernetes manifests.
Question 9. How can you override a specific value from values.yaml at install time? A) helm install --set key=value B) helm install --override key=value C) helm install --config key=value
D) helm install --values key=value Answer: A Explanation: The --set flag allows you to specify a dot‑notation key/value pair to override defaults during installation.
Question 10. Which built‑in Helm object provides information about the current release name and namespace? A) .Chart B) .Values C) .Release D) .Capabilities Answer: C Explanation: .Release contains metadata such as .Release.Name and .Release.Namespace for the current release.
Question 11. What does the Go template function quote do when used in a Helm template? A) Converts a string to uppercase B) Wraps the argument in double quotes C) Serializes an object to JSON
D) nindent Answer: B Explanation: toYaml serializes a Go object into YAML format, preserving key ordering and indentation.
Question 14. When using nindent 4 in a Helm template, what does the 4 represent? A) Number of spaces to prepend to each line after a newline B) Number of times to repeat the indentation C) Number of characters to truncate from each line D) Number of newline characters to insert Answer: A Explanation: nindent adds a newline, then indents the resulting block by the specified number of spaces (4 in this case).
Question 15. What is the purpose of the _helpers.tpl file in a Helm chart? A) To store the chart’s version history B) To define reusable template snippets and functions C) To list external dependencies D) To configure Helm’s logging level
Answer: B Explanation: _helpers.tpl commonly contains define blocks that can be included elsewhere, facilitating reuse of labels, selectors, and other template logic.
Question 16. How do you include a helper template named mylabels inside another template? A) {{ include "mylabels". }} B) {{ .Template "mylabels" }} C) {{ render "mylabels". }} D) {{ import "mylabels". }} Answer: A Explanation: The include function renders the named template (defined with {{- define "mylabels" - }}) and returns it as a string.
Question 17. Which Helm command lists all releases in the current namespace? A) helm list --all-namespaces B) helm status --list C) helm list D) helm releases
Explanation: helm get values retrieves the values (merged from defaults and overrides) that were applied to a specific release.
Question 20. Which of the following best describes the lookup function in Helm templates? A) Retrieves a value from values.yaml by key B) Queries the Kubernetes API for existing resources at render time C) Searches a chart’s repository for a matching version D) Performs a DNS lookup for external services Answer: B Explanation: lookup enables a template to fetch live objects (e.g., Secrets, ConfigMaps) from the cluster during rendering, allowing conditional logic based on current state.
Question 21. How would you conditionally render a Service resource only when .Values.service.enabled is true? A) {{ if .Values.service.enabled }} … Service manifest … {{ end }} B) {{ when .Values.service.enabled }} … {{ end }} C) {{ unless .Values.service.enabled }} … {{ end }} D) {{ render .Values.service.enabled }} … {{ end }} Answer: A
if block evaluates the boolean; if true, the enclosed manifest is emitted.Question 22. What does the range action allow you to do in a Helm template? A) Iterate over a list or map to generate multiple manifest blocks B) Define a numeric sequence for naming resources C) Randomly select a value from a list D) Limit the number of resources created Answer: A Explanation: range loops over arrays, slices, or maps, enabling dynamic creation of repeated sections such as environment variables or sidecar containers.
Question 23. Given the following values snippet, which template expression correctly accesses the second port number?
service: ports: - 80 - 443 A) {{ .Values.service.ports[1] }}
C) helm repo update D) helm chart sync Answer: A Explanation: helm dependency update resolves the dependencies defined in Chart.yaml and downloads them into the charts/ directory.
Question 26. How can a parent chart pass a custom value to a subchart named redis? A) Set redis.customValue in the parent’s values.yaml B) Use global.redis.customValue in the parent’s values.yaml C) Define redis: { customValue: ... } under the parent’s values.yaml D) Both A and C are valid Answer: D Explanation: Directly nesting the subchart’s name (redis.customValue) or providing a map under redis: are equivalent ways to supply values to a subchart.
Question 27. What is the effect of setting global.imagePullPolicy in a parent chart’s values? A) It overrides the imagePullPolicy for all child charts that reference {{ .Values.global.imagePullPolicy }} B) It disables image pulling for the entire release
C) It forces all containers to use the Always policy regardless of child chart settings D) It has no effect unless explicitly referenced in child templates Answer: D Explanation: Global values are available to all subcharts, but they only affect behavior if the subchart’s templates reference the global key.
Question 28. Which field in a dependency entry allows you to give an alternate name to a subchart instance? A) alias B) nameOverride C) chartAlias D) tag Answer: A Explanation: The alias field creates a new logical name for the subchart, enabling multiple instances of the same chart with different configurations.
Question 29. How can you prevent a subchart from being rendered without removing it from Chart.yaml? A) Set condition: subchart.enabled in the dependency definition and provide subchart.enabled: false in values
C) "helm.sh/hook": pre-upgrade D) "helm.sh/hook": post-delete Answer: A Explanation: The pre-install hook runs before any other resources in the chart are created, useful for preparation steps.
Question 32. How can you ensure a hook resource is deleted after its successful execution? A) Set "helm.sh/hook-delete-policy": hook-succeeded annotation B) Set "helm.sh/hook-delete-policy": before-hook-creation C) Use helm hook delete command D) Helm automatically deletes hook resources; no annotation needed Answer: A Explanation: The hook-delete-policy annotation controls when hook resources are removed; hook-succeeded deletes them after a successful run.
Question 33. What does the helm test command execute? A) Runs all resources annotated with helm.sh/hook: test-success and test-failure in the chart’s templates/tests/ directory B) Executes unit tests written in Go for the chart C) Validates the chart’s schema against values.schema.json
D) Performs a dry‑run install and reports errors Answer: A Explanation: helm test creates a release of the chart’s test pods/jobs defined in templates/tests/ and monitors their success or failure.
Question 34. Which function would you use to safely convert an arbitrary object to JSON inside a template? A) toJson B) toYaml C) jsonify D) marshalJson Answer: A Explanation: toJson serializes a Go object to a JSON string, useful for embedding complex structures in ConfigMaps or annotations.
Question 35. When defining a chart schema, which JSON Schema keyword specifies required fields? A) "required" B) "mandatory" C) "must"
D) Ignore the warning; it has no effect Answer: A Explanation: appVersion is optional but recommended; it indicates the version of the application the chart deploys, and adding it resolves the warning.
Question 38. Which of the following is a recommended practice for handling sensitive data in Helm charts? A) Store passwords directly in values.yaml B) Use Kubernetes Secrets and reference them via values.yaml placeholders C) Encode all values in base64 within the chart D) Hard‑code secret data in the template files Answer: B Explanation: Secrets should be created separately (or via the chart) and referenced, avoiding plaintext credentials in version‑controlled files.
Question 39. What does the helm package command produce? A) A gzipped .tgz archive of the chart ready for distribution B) A Docker image containing the chart files C) A Helm repository index file D) A Helm plugin binary
Answer: A Explanation: helm package bundles the chart directory into a compressed archive (.tgz) that can be uploaded to a repository.
Question 40. Which annotation would you add to a Deployment to make it a Helm hook that runs after an upgrade? A) "helm.sh/hook": post-upgrade B) "helm.sh/hook": pre-upgrade C) "helm.sh/hook": post-install D) "helm.sh/hook": pre-delete Answer: A Explanation: post-upgrade hooks execute after the upgrade operation has completed, allowing post‑migration tasks.
Question 41. How can you make a Helm chart’s values file enforce that replicaCount must be an integer between 1 and 5? A) Define "type": "integer", "minimum": 1, "maximum": 5 in values.schema.json for replicaCount B) Add a comment in values.yaml stating the range C) Use a custom Go template function to validate at runtime