Helm Chart
Package and deploy a web application using a Helm chart.
Time: ~10 minutes Difficulty: Beginner
What You Will Learn
Section titled “What You Will Learn”- Helm chart structure (Chart.yaml, values.yaml, templates/)
- Template functions and helpers
- Overriding values at install time
- Upgrading and rolling back releases
Prerequisites
Section titled “Prerequisites”- Helm v3.13+ installed
Deploy
Section titled “Deploy”helm install web-app demos/helm/chart/ \ --namespace helm-app \ --create-namespaceVerify
Section titled “Verify”helm list -n helm-appkubectl get pods -n helm-appkubectl port-forward svc/web-app-simple-web-app 8080:80 -n helm-appOpen http://localhost:8080 to see nginx running.
What is Happening
Section titled “What is Happening”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 ServiceHelm renders the templates by injecting values from values.yaml. The _helpers.tpl file defines common label patterns so you don’t repeat them everywhere.
Experiment
Section titled “Experiment”-
Override values at install time:
Terminal window helm upgrade web-app demos/helm/chart/ \--namespace helm-app \--set replicaCount=4 \--set env.ENVIRONMENT=staging -
Check the release history:
Terminal window helm history web-app -n helm-app -
Roll back to the previous revision:
Terminal window helm rollback web-app 1 -n helm-app -
Render templates locally without deploying:
Terminal window helm template web-app demos/helm/chart/
Cleanup
Section titled “Cleanup”helm uninstall web-app -n helm-appkubectl delete namespace helm-appFurther Reading
Section titled “Further Reading”See docs/deep-dive.md for a detailed explanation of Go template syntax, helper functions, values override precedence, release lifecycle, and common Helm patterns.
Next Step
Section titled “Next Step”Move on to Kustomize to learn environment-specific configuration without templating.