Skip to content

Helm Chart

Package and deploy a web application using a Helm chart.

Time: ~10 minutes Difficulty: Beginner

  • Helm chart structure (Chart.yaml, values.yaml, templates/)
  • Template functions and helpers
  • Overriding values at install time
  • Upgrading and rolling back releases
  • Helm v3.13+ installed
Terminal window
helm install web-app demos/helm/chart/ \
--namespace helm-app \
--create-namespace
Terminal window
helm list -n helm-app
kubectl get pods -n helm-app
kubectl port-forward svc/web-app-simple-web-app 8080:80 -n helm-app

Open http://localhost:8080 to see nginx running.

chart/
Chart.yaml # Chart metadata (name, version)
values.yaml # Default configuration values
templates/
_helpers.tpl # Reusable template functions
deployment.yaml # Templated Deployment
service.yaml # Templated Service

Helm renders the templates by injecting values from values.yaml. The _helpers.tpl file defines common label patterns so you don’t repeat them everywhere.

  1. Override values at install time:

    Terminal window
    helm upgrade web-app demos/helm/chart/ \
    --namespace helm-app \
    --set replicaCount=4 \
    --set env.ENVIRONMENT=staging
  2. Check the release history:

    Terminal window
    helm history web-app -n helm-app
  3. Roll back to the previous revision:

    Terminal window
    helm rollback web-app 1 -n helm-app
  4. Render templates locally without deploying:

    Terminal window
    helm template web-app demos/helm/chart/
Terminal window
helm uninstall web-app -n helm-app
kubectl delete namespace helm-app

See docs/deep-dive.md for a detailed explanation of Go template syntax, helper functions, values override precedence, release lifecycle, and common Helm patterns.

Move on to Kustomize to learn environment-specific configuration without templating.