Helm and Helm Chart
Helm is the package manager for Kubernetes. It bundles manifests into a versioned chart, fills in environment-specific values at deploy time, and tracks each installation as a release that can be upgraded or rolled back.
Helm in one picture
A chart is a package, values.yaml supplies defaults, and a release is one installed instance of a chart. The same chart can be installed many times with different names, namespaces, and values.
templates and defaults"] --> H["helm install"] V["values files
per environment"] -->|"override defaults"| H H -->|"renders YAML"| K["Kubernetes cluster"] K --> R["Release
with revision history"] classDef pkg fill:#FFEDD5,color:#1E293B classDef tool fill:#326CE5,color:#ffffff classDef out fill:#D1FAE5,color:#1E293B class C,V pkg class H tool class K,R out
Chart structure
my-chart/ Chart.yaml name, chart version, appVersion values.yaml default configuration templates/ deployment.yaml service.yaml ingress.yamlapiVersion: v2name: devops-networkdescription: Helm chart for the DevOps Network web apptype: applicationversion: 0.1.2 # chart version, bump on template changesappVersion: "1.0.0" # version of the application itselfTemplates use Go templating:
containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" ports: - containerPort: {{ .Values.service.port }}values.yaml and overrides
Defaults live in values.yaml. Environment files only list what changes.
# values.yamlreplicaCount: 2image: repository: 123456789012.dkr.ecr.ap-south-1.amazonaws.com/my-app tag: "1.0.0"service: port: 3000resources: requests: { cpu: 100m, memory: 256Mi } limits: { memory: 512Mi }# prod.values.yamlreplicaCount: 4Common MistakePutting secrets in values files committed to Git. Reference Kubernetes Secrets or use an external secrets operator instead.
Releases
helm upgrade --install devops-network ./chart -f prod.values.yaml -n production --atomic --waithelm list -n productionhelm history devops-network -n productionhelm rollback devops-network 2 -n productionhelm uninstall devops-network -n productionhelm template devops-network ./chart -f prod.values.yaml # preview rendered YAML--atomic rolls back automatically if the upgrade fails.
SecurityRollback restores Kubernetes resources, not database migrations or external state. Test rollbacks before you need them.
Helmfile
Helmfile is a declarative layer over Helm. One file defines all releases and environments, and helmfile apply deploys them.
environments: dev: {} prod: {}releases: - name: devops-network chart: ./chart namespace: devops-network values: - values.yaml - "{{ .Environment.Name }}.values.yaml"helmfile -e dev diffhelmfile -e dev applyOCI chart registries
Charts can be stored in OCI registries such as ECR, GHCR, or Docker Hub.
aws ecr get-login-password --region ap-south-1 \ | helm registry login 123456789012.dkr.ecr.ap-south-1.amazonaws.com --username AWS --password-stdinhelm package ./charthelm push devops-network-0.1.2.tgz oci://123456789012.dkr.ecr.ap-south-1.amazonaws.com/helm-chartsTipUse
helm diff upgradebefore production upgrades and pin chart versions in CI.
Frequently Asked Questions
What is the difference between chart version and appVersion?
version is the version of the chart package and must change when templates change. appVersion describes the application the chart deploys. They move independently.
When should I use Helm instead of Kustomize?
Helm suits distributing and installing reusable applications with a few overridden values. Kustomize patches your own plain manifests without templating. Many teams use Helm for third-party software and Kustomize for in-house overlays.
What is a Helm release?
One installed instance of a chart in a namespace, with its own name, values, and revision history. Installing the same chart twice creates two releases.