How to package a Kubernetes app with a Helm chart
Helm charts bundle templated Kubernetes manifests with a values file so one app deploys across environments. Scaffold with helm create, template with values, then install, upgrade, and roll back releases.
Package a Kubernetes app with Helm
Helm is the package manager for Kubernetes. A chart bundles templated manifests plus a values.yaml of defaults, so the same app can deploy to dev, staging, and production with different settings. Helm tracks each install as a release you can upgrade and roll back.
Prerequisites
- Helm 3 installed (
helm version). - A reachable cluster and existing manifests to template.
Steps
1. Scaffold a chart
helm create myapp
This generates Chart.yaml, values.yaml, and a templates/ directory with sample manifests.
2. Template the Deployment
Replace hardcoded values with template expressions:
spec:
replicas: {{ .Values.replicaCount }}
template:
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
3. Expose configuration in values.yaml
replicaCount: 3
image:
repository: registry.example.com/myapp
tag: "1.0.0"
Keep defaults sensible; override per environment at install time.
4. Render and lint the chart
Validate before deploying:
helm lint ./myapp
helm template myapp ./myapp
helm template prints the rendered manifests so you can review them.
5. Install a release
helm install myapp ./myapp --namespace prod --create-namespace
Override values inline or with a file: --set image.tag=1.0.1 or -f values-prod.yaml.
6. Upgrade and roll back
helm upgrade myapp ./myapp --set image.tag=1.1.0
helm history myapp
helm rollback myapp 1
Verification
Run helm list -n prod and confirm the release status is deployed. Check the rendered objects exist with kubectl get all -n prod. Perform an upgrade and confirm helm history records a new revision; roll back and confirm it reverts.
Next Steps
Add a _helpers.tpl for shared labels, validate inputs with a JSON schema, store the chart in an OCI registry, and wire Helm into a GitOps tool so chart changes deploy automatically.
Prerequisites
- Helm installed
- A Kubernetes cluster
- Existing Kubernetes manifests
Steps
- 1Scaffold a chart
- 2Template the Deployment
- 3Expose configuration in values.yaml
- 4Render and lint the chart
- 5Install a release
- 6Upgrade and roll back