
- One or more template files that render Kubernetes resources.
- A
values.yamlfile for default, configurable values. - A
Chart.yamlfile that contains chart metadata.
values.yaml (or values supplied on the CLI) and render standard Kubernetes manifests.
Example: a Service and a Deployment template in a single file. Notice the templating expression {{ .Values... }} used to inject values from values.yaml.
values.yaml that pairs with the template above:
Chart.yaml file describing the chart. Important fields include apiVersion, name, version, appVersion, description, type, and dependencies. Below is a real-world example from a WordPress chart:
apiVersion in Chart.yaml refers to the chart API version (not the Kubernetes resource apiVersion). Use apiVersion: v2 for charts targeting Helm 3. Helm 3 charts can use newer features such as dependencies and library charts.
Chart directory layout
A typical chart directory looks like this:
dependencies section in Chart.yaml to declare external charts and conditions to enable/disable them. When working with dependencies locally, use:
charts/ directory with required dependencies so they are included at render/install time.
Best practices and next steps
- Keep values that change per-environment in
values.yamland override them withhelm upgrade --install -f production-values.yamlor--seton the CLI. - Use
helm templateto render charts locally and inspect the generated Kubernetes manifests without applying them. - Validate rendered manifests with
kubectl apply --dry-run=server -f -to ensure they are accepted by the API server. - Version charts independently of the application using the
versionfield inChart.yaml.
- Helm documentation: https://helm.sh/docs/
- Helm chart best practices: https://helm.sh/docs/topics/chart_best_practices/
- Bitnami charts repository (example): https://charts.bitnami.com/bitnami
- Kubernetes documentation: https://kubernetes.io/docs/