Helm Charts
Package Kubernetes apps instead of copying YAML
01 / 18
A 60-minute session on Helm fundamentals: chart structure, templates, values, releases, repositories, and an end-to-end lab to create and deploy a chart.
60minutes total
45minutes theory + walkthrough
10minutes Helm lab
5minutes quiz + recap
Recap
Kubernetes concepts from previous sessions
02 / 18
Why this recap matters before Helm
- Helm packages the same Kubernetes building blocks you already know
- Charts usually template objects like Deployments, Services, ConfigMaps, Secrets, and Ingress
- Values let you change replicas, image tags, ports, and names without editing raw YAML
- Helm does not replace Kubernetes concepts; it organizes and reuses them
Bridge to today
Previous sessions explained what these objects do. This session explains how Helm packages them into reusable, versioned charts.
Session Map
Agenda and outcomes
03 / 18
Agenda
0-5 min
Why Helm exists
5-20 min
Chart structure, templates, helpers, and values
20-30 min
Values hierarchy, install, upgrade, rollback
30-40 min
Repositories, packaging, and reuse
40-55 min
Lab: create and deploy a Helm chart
55-60 min
Quiz and takeaways
By the end, learners should be able to
- Explain why Helm is better than hand-editing YAML for repeatable installs
- Read a chart directory and identify the role of each file
- Parameterize manifests with
values.yamland templates - Install, upgrade, rollback, and inspect releases safely
- Package and publish charts through repositories
Core Idea
Helm is the package manager for Kubernetes
04 / 18
What Helm does
- Bundles Kubernetes manifests into a versioned chart
- Turns static YAML into parameterized templates
- Installs and tracks a release as one logical unit
- Makes upgrade and rollback operationally simpler
Why teams use it
- One install command instead of copying many files
- Environment-specific values without editing templates
- Versioned application packaging like software artifacts
- Shared distribution through chart repositories
helm install my-release bitnami/postgresql
helm upgrade my-release ./my-chart
helm rollback my-release 1
Chart Anatomy
Every chart follows a predictable structure
05 / 18
my-chart/
Chart.yaml
values.yaml
charts/
templates/
deployment.yaml
service.yaml
_helpers.tpl
Key files
Chart.yaml: name, version, description, dependenciesvalues.yaml: default configuration for templatestemplates/: Kubernetes YAML with Go template syntax_helpers.tpl: reusable template fragments and naming helperscharts/: packaged sub-charts and dependencies
Templating
Templates turn one chart into many environments
06 / 18
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
Template objects to know
.Release: release-specific data like name and namespace.Chart: metadata fromChart.yaml.Values: merged values supplied to the chartinclude,default,quote,required: common template helpers
Naming pattern:
{{ .Release.Name }}-{{ .Chart.Name }}
Avoid hardcoded names
Values
Values hierarchy decides which config wins
07 / 18
Override order
- 1. Chart default
values.yaml - 2. Parent chart values
- 3. User-supplied
--values custom-values.yaml - 4. Individual
--set key=valueflags
helm install web ./web-chart \
--values prod-values.yaml \
--set image.tag=1.2.4
Later sources override earlier ones. Treat --set as the highest-priority emergency override, not your main configuration strategy.
Releases
Install, upgrade, and rollback as one unit
08 / 18
Release lifecycle
helm install: creates a new releasehelm upgrade: updates an existing releasehelm history: shows release revisionshelm rollback: reverts to a prior revision
helm list
helm status my-release
helm history my-release
helm rollback my-release 1
Repositories
Repositories distribute charts like package feeds
09 / 18
What a repository contains
- Packaged chart archives such as
.tgzfiles - An
index.yamlfile that maps chart names to versions - A predictable source for installation, upgrade, and dependency resolution
- A shared distribution point for internal or public charts
Repository workflow
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm search repo nginx
helm show values bitnami/nginx
helm package ./my-chart
Lab
Create and deploy a Helm chart
10 / 18
ChartScaffold with
helm createValuesImage, service, replica count
TemplatesDeployment + Service
LintValidate chart structure
InstallCreate Helm release
UpgradeChange values and roll forward
Lab flow
- Install Helm locally
- Scaffold a new chart
- Clean up the generated defaults
- Template a Deployment and Service
- Install the release with values
- Upgrade and rollback once
Lab Architecture
One chart, one release, many rendered objects
11 / 18
Chart.yamlMetadata + version
values.yamlRuntime defaults
templates/Deployment + Service
helm lintValidate chart
helm installCreate release
KubernetesRendered manifests
Apply order
helm version
helm create web-chart
helm lint ./web-chart
helm template demo ./web-chart
helm install demo ./web-chart
helm upgrade demo ./web-chart --set image.tag=v2
Lab Runbook
Step 0: install Helm locally
12 / 18
# macOS
brew install helm
# Windows
choco install kubernetes-helm
# Linux
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
What to notice
- Install Helm before starting the chart workflow
helm versionconfirms the CLI is available locally- Package manager install is fine for the lab; teams can standardize later
Lab Runbook
Step 1: scaffold the chart
18 / 18
helm create web-chart
cd web-chart
ls
Chart.yaml
values.yaml
templates/
What to notice
helm creategives you a working starting point, not a final chart- Generated templates are useful for learning, but usually need cleanup
- Start by understanding the directory, then simplify it
Lab Runbook
Step 2: define metadata and values
13 / 18
# Chart.yaml
apiVersion: v2
name: web-chart
version: 0.1.0
appVersion: "1.0.0"
description: Demo Helm chart for a web app
# values.yaml
replicaCount: 2
image:
repository: nginx
tag: "1.27"
service:
type: ClusterIP
port: 80
What to notice
versionis the chart version;appVersionis the app versionvalues.yamlbecomes the contract between chart and operator- Keep values predictable and flat enough to override safely
Lab Runbook
Step 3: template Deployment and Service
14 / 18
# templates/deployment.yaml
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
template:
spec:
containers:
- name: web
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
# templates/service.yaml
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
What to notice
- Release name prevents collisions between installs
- Templates should read from values, not hardcode environment choices
- One chart can now render different outputs with different values files
Lab Runbook
Step 4: lint, install, upgrade, rollback
15 / 18
helm lint ./web-chart
helm template demo ./web-chart
helm install demo ./web-chart
helm upgrade demo ./web-chart --set image.tag=1.27.1
helm history demo
helm rollback demo 1
What to notice
helm lintvalidates structure and catches common mistakes earlyhelm templateshows rendered YAML before touching the clusterhelm historyandhelm rollbackmake change tracking operationally safer
Watch Outs
Common Helm mistakes
16 / 18
Mistake 1
Hardcoding names instead of using release-aware naming helpers.
Mistake 2
Stuffing environment-specific values into templates instead of values.yaml.
Mistake 3
Skipping helm lint and helm template before install or upgrade.
Quiz
5-minute knowledge check
17 / 18
1. What problem does Helm solve compared with raw Kubernetes YAML?
2. What is the difference between
Chart.yaml and values.yaml?3. Which source has higher priority:
values.yaml or --set?4. Which command renders YAML locally without installing it?
5. Which command reverts a release to a previous revision?
Takeaways
Charts package apps
Templates read values
Releases are versioned
Repos distribute charts
Lint before install
Use arrow keys or buttons