Think of Helm as a package manager for Kubernetes — like how:
- apt is for Ubuntu/Debian
- yum is for CentOS/RedHat
- npm is for Node.js
You can use Helm to install, configure, and manage applications on Kubernetes — without writing complex Kubernetes YAML files manually every time.
Imagine installing a full app (like WordPress or PostgreSQL) on Kubernetes with just one command instead of writing dozens of config files. That’s what Helm does.
Imagine you’re deploying an app like PostgreSQL or NGINX on Kubernetes. Without Helm, you’d manually create and manage several YAML files (Deployment, Service, ConfigMap, etc.).
Helm bundles all those into a “chart”, lets you configure it with variables, and installs everything with one command.
Technically
Helm works by:
- Templating Kubernetes manifests (YAML files)
- Injecting values from a config file (
values.yaml
) - Managing the installation lifecycle of your app as a release in Kubernetes.
A Helm chart = collection of templates + configs + metadata.
🧰 What Does Helm Do?
1. Templates Your Kubernetes YAML
You don’t have to copy-paste the same YAML over and over. Helm lets you use variables and templates to make your YAML reusable and dynamic.
2. Bundles Everything Together
Helm packages your app into a chart (like a zip file) that contains:
- All the Kubernetes YAML files
- Default configuration values
- Metadata about the app
Helm is a Kubernetes package manager that uses something called charts.
- A Helm chart is a collection of YAML templates and metadata that describe a Kubernetes application — kind of like a “blueprint.”
When you run:
helm install my-app ./my-chart
Helm:
- Renders the templates (adds values from a
values.yaml
file) - Produces raw Kubernetes manifests (like Deployment, Service, Ingress, etc.)
- Applies them to the cluster using
kubectl
behind the scenes
Main Files in a Helm Chart
Here’s what a typical Helm chart folder looks like:
my-chart/
├── Chart.yaml # Metadata about the chart (name, version, description)
├── values.yaml # Default configuration values
├── templates/ # Template files for Kubernetes manifests
│ ├── deployment.yaml # Kubernetes Deployment (templated)
│ ├── service.yaml # Kubernetes Service
│ └── _helpers.tpl # Helper functions (like template snippets)
├── charts/ # Subcharts (optional dependencies)
└── .helmignore # Files to ignore (like .gitignore)
Example: values.yaml
replicaCount: 2
image:
repository: nginx
tag: stable
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
These values are injected into the templates using syntax like:
spec:
replicas: {{ .Values.replicaCount }}
Helm Chart Example — Step-by-Step
Let’s deploy an NGINX web server using Helm.
Step 1: Install Helm (CLI)
brew install helm # macOS
choco install kubernetes-helm # Windows
sudo apt install helm # Linux
Step 2: Create a Chart
helm create my-nginx
cd my-nginx
This generates:
my-nginx/
├── Chart.yaml # Metadata
├── values.yaml # Default config
├── templates/ # All K8s resource templates
│ ├── deployment.yaml
│ ├── service.yaml
│ └── _helpers.tpl # Functions/macros
├── charts/ # Subcharts (optional)
└── .helmignore # Like .gitignore
Step 3: Modify values.yaml
replicaCount: 2
image:
repository: nginx
tag: "1.21"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
tep 4: Modify templates/deployment.yaml
Templated version of a K8s Deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: nginx
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
ports:
- containerPort: {{ .Values.service.port }}
Step 5: Install It
helm install my-web-app ./my-nginx
This will:
- Render the templates
- Inject values
- Deploy resources to your Kubernetes cluster
Step 6: Upgrade or Rollback
helm upgrade my-web-app ./my-nginx # Apply changes
helm rollback my-web-app 1 # Roll back to version 1
helm uninstall my-web-app # Remove the app
5. Using Helm in CI/CD
You can use Helm in pipelines (Azure DevOps, GitHub Actions, Jenkins, etc.).
Example in Azure DevOps
- task: HelmInstaller@1
inputs:
helmVersionToInstall: 'latest'
- script: |
helm upgrade --install my-app ./my-chart \
--set image.tag=$(Build.BuildId)
Bonus: Popular Helm Charts
Helm Hub or Artifact Hub has ready-to-use charts:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm search repo bitnami
helm install my-postgres bitnami/postgresql