Cloud / HELM Interview Questions
How do you manage Helm chart dependencies and subcharts? Explain the library chart pattern.
Helm chart dependencies allow composing complex applications from smaller, reusable components. Since Helm v3, dependencies are managed in Chart.yaml under dependencies.
Defining Dependencies: dependencies: - name: postgresql version: "10.x.x" repository: "https://charts.bitnami.com/bitnami" condition: postgresql.enabled
Key fields: repository (HTTPS, OCI, or local path), condition (conditional inclusion), tags (batch enabling), alias (multiple instances).
Managing Dependencies: Run helm dependency update to download .tgz files to charts/ and generate Chart.lock.
Library Charts: Special chart type (type: library) containing only templates and helpers, no resources. Define helpers in templates/_macros.tpl with {{- define "mylib.deployment" -}}. Usage: {{ include "mylib.deployment" . }}. Bitnami's Common Library Chart is a popular example.
Global Values: Pass configuration to all subcharts: global: imageRegistry: myregistry.com. Subcharts access via .Values.global.imageRegistry.
More Related questions...