Helm
Q1: What is Helm and why is it used?
Ans: Helm is a package manager for Kubernetes that simplifies the deployment and management of applications. It uses charts (pre-configured Kubernetes resources) to install, upgrade, and manage applications consistently across environments.
Q2: What is a Helm Chart?
Ans: A Helm Chart is a collection of YAML templates and configuration files that define a Kubernetes application. It includes metadata (Chart.yaml), default values (values.yaml), templates, and dependencies.
Q3: Explain the structure of a Helm Chart.
Ans: A Helm Chart typically contains: 1. Chart.yaml β metadata about the chart. 2. values.yaml β default configuration values. 3. templates/ β Kubernetes manifest templates. 4. charts/ β dependent charts. 5. NOTES.txt β post-installation instructions.
Q4: What is the difference between Helm v2 and Helm v3?
Ans: Helm v2 used Tiller (a server-side component) for managing releases, which introduced security concerns. Helm v3 removed Tiller, improved security, added support for library charts, and enhanced CRD management.
Q5: How do you install a Helm Chart?
Ans: You install a chart using `helm install
Q6: What is a Helm Release?
Ans: A Helm Release is an instance of a chart deployed to a Kubernetes cluster. Each release has a unique name and maintains its own configuration and history.
Q7: How do you upgrade a Helm Release?
Ans: You upgrade a release using `helm upgrade
Q8: How do you rollback a Helm Release?
Ans: You rollback using `helm rollback
Q9: What is the purpose of values.yaml?
Ans: values.yaml defines default configuration values for a chart. These values can be overridden during installation or upgrade using `-f custom-values.yaml` or `--set key=value`.
Q10: How do you override Helm values?
Ans: Values can be overridden by: 1. Passing a custom values file with `-f`. 2. Using `--set key=value` for inline overrides. 3. Combining multiple values files for layered configuration.
Q11: What are Helm Hooks?
Ans: Helm Hooks are lifecycle events that allow you to run specific actions before or after certain operations (install, upgrade, delete). Examples include running jobs before a chart is installed or cleaning up resources after deletion.
Q12: What is the difference between Helm dependency and subchart?
Ans: Dependencies are external charts referenced in Chart.yaml, while subcharts are charts placed inside the `charts/` directory. Dependencies can be versioned and updated independently.
Q13: How do you manage Helm chart dependencies?
Ans: Dependencies are defined in Chart.yaml under `dependencies`. You run `helm dependency update` to fetch and update them. They are stored in the `charts/` directory.
Q14: What is Helm Template?
Ans: `helm template
Q15: How do you test a Helm Chart?
Ans: You can test charts using `helm lint` to validate syntax and best practices, and `helm test
Q16: What are Helm Library Charts?
Ans: Library charts are reusable chart components that contain only templates and helpers, not deployable resources. They allow sharing of common logic across multiple charts.
Q17: How does Helm handle secrets?
Ans: Helm does not encrypt secrets by default. Secrets are managed as Kubernetes resources. For secure handling, you can integrate Helm with external secret managers (Vault, Sealed Secrets, SOPS).
Q18: What is the difference between `helm uninstall` and `helm delete`?
Ans: In Helm v3, `helm uninstall` removes a release. In Helm v2, the command was `helm delete`. Both remove release resources but keep history unless `--purge` is used.
Q19: What are some best practices for Helm?
Ans: 1. Use semantic versioning for charts. 2. Keep values.yaml minimal and override in environment-specific files. 3. Use library charts for shared templates. 4. Test charts with `helm lint` and CI/CD pipelines. 5. Store charts in a repository for version control.
Q20: What is a Helm Repository?
Ans: A Helm Repository is a collection of charts stored and shared via HTTP. You can add repositories using `helm repo add` and search/install charts from them. Popular repositories include Artifact Hub and Bitnami.