Helm Basics: Charts, Values, Releases, and Kustomize
Package parameterized Kubernetes manifests with Helm charts, manage releases and rollbacks, and know when Kustomize is simpler.
TL;DR
Helm packages Kubernetes YAML into reusable charts (Chart.yaml, templates/, values.yaml), tracks each deployment as a versioned release, and supports helm upgrade and helm rollback. If you only patch your own manifests per environment, Kustomize (built into kubectl -k) is simpler and template-free.
Why it exists
Copy-pasting Deployment and Service YAML across 10 microservices or 3 environments drifts fast. Helm solves two problems: distributing third-party software (like ingress-nginx or cert-manager) as versioned packages, and parameterizing manifests with typed/merged values.yaml overrides.
Mental model
Think of Helm as a template renderer + release tracker:
- Chart: the package directory (
Chart.yamlmetadata,values.yamldefaults,templates/*.yamlGo templates). - Values (
-f prod-values.yaml,--set): inputs merged overvalues.yamlat render time. - Release: one live installation in a namespace, stored as revision secrets (
sh.helm.release.v1.<name>.v<rev>) soupgradeandrollbackwork.
Do it
A minimal chart layout:
my-app/
├── Chart.yaml # name, version, appVersion
├── values.yaml # default values
└── templates/
├── deployment.yaml # Go template using {{ .Values.image.tag }}
└── service.yamlCommon lifecycle commands (marked # not run because helm is not installed in this local environment):
# Render manifests locally before touching any cluster (not run)
helm template web ./my-app -f values-prod.yaml
# Install or upgrade idempotently in one command (not run)
helm upgrade --install web ./my-app \
--namespace prod --create-namespace \
-f values-prod.yaml \
--wait --timeout 5m
# Inspect release history and roll back to revision 2 (not run)
helm history web -n prod
helm rollback web 2 -n prodWhen Kustomize is enough
Kustomize is built directly into kubectl apply -k and avoids Go templates ({{ include ... }}) completely:
- Use Helm when consuming third-party charts, publishing reusable app packages, or managing complex conditional resources.
- Use Kustomize when you own the YAML and only need environment overlays (
base/+overlays/prod/for replicas, image tags, or ConfigMap patches).
Gotchas
- Helm hooks & CRDs: CRDs placed in
crds/are installed onhelm installbut never upgraded or deleted by Helm to protect cluster data. --setvs-f:--setsilently breaks on commas, dots, and types (e.g.,123456parsed as float); always prefer-f values.yamlfiles.- Blindly upgrading: always run
helm templateor thehelm diffplugin in CI beforehelm upgradein production. - Release secrets bloat: set
--history-max 10onhelm upgradeso old revision Secrets don't pile up inetcd.
Production checklist
- Pin chart versions (
--version 1.2.3) in CI and GitOps manifests - Store environment overrides in Git-tracked
values-<env>.yamlfiles, not ad-hoc--setflags - Run
helm lintandhelm template ... | kubeconform -strictin CI - Set
--history-max 10and--atomic(or GitOps reconciliation) for safe failed-upgrade recovery
Check yourself
Check Yourself
1. What happens to a Helm chart's crds/ directory when you run helm upgrade?
2. Your team deploys 4 internal services using your own Kubernetes YAML, differing only in replica count and image tag per environment. Which tool is the simpler fit?
Sources
Related Notes
ConfigMaps and Secrets in Kubernetes
Store non-sensitive config in ConfigMaps, understand why Secrets are only base64 by default, and configure encryption at rest or external secret managers.
Kubectl Cheatsheet
Essential kubectl commands for inspecting resources, applying manifests, tailing logs, and debugging Pods.