Helm Quickstart Tutorial: Managing Kubernetes Applications with Helm Charts
This tutorial explains what Helm is, how to create and customize Helm charts, and demonstrates practical commands for installing, upgrading, rolling back, and uninstalling applications on Kubernetes, highlighting Helm's benefits for simplifying deployments, version control, and CI/CD workflows.
This article introduces Helm, the open‑source package manager for Kubernetes, and explains why it is essential for DevOps practitioners who need to manage multiple applications and environments efficiently.
What is Helm? Helm packages applications as charts , which are collections of templated Kubernetes manifests. Charts can declare dependencies (e.g., a MySQL chart) and are versioned, enabling easy upgrades and rollbacks.
Benefits of using Helm include single‑command installation, dependency management, reusable compressed artifacts, release history, configurable deployments across environments, and streamlined CI/CD pipelines.
Problem Helm solves – manually writing YAML manifests leads to hard‑coded values, redundancy, lack of error handling, and no traceability. Helm addresses these issues by templating manifests and managing releases.
Creating a Helm chart from scratch can be done with a single command:
$ helm create nginxThe chart structure contains Chart.yaml , values.yaml , a templates/ directory for Kubernetes resources, templates/NOTES.txt , templates/_helpers.tpl , and optional charts/ and templates/tests directories.
Customizing templates involves editing the files in templates/ and setting values in values.yaml . Example snippet from values.yaml :
# Default values for nginx.
replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
tag: "1.21.5"
service:
type: ClusterIP
port: 80Installing the chart (with linting and dry‑run for safety):
$ helm lint nginx
$ helm install --debug --dry-run nginx nginxTo perform the actual installation, remove --dry-run :
$ helm install nginx nginxAfter installation you can retrieve the application URL using the generated NOTES.txt instructions.
Upgrading a release (e.g., changing the image tag):
$ helm upgrade nginx nginx --set image.tag=1.21.6Helm records the change in its release history, which can be inspected with helm history or helm diff .
Rollback to a previous revision is straightforward:
$ helm rollback nginx 1Uninstalling a chart removes all associated resources:
$ helm uninstall nginxReusing existing charts from public repositories (e.g., Bitnami) is done by adding the repo, updating the cache, and installing:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm repo update
$ helm install my-release bitnami/nginx -f values.yamlThe tutorial concludes with links to the original article and related resources.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.