Session 1: Introduction to Helm
π¦ Session 1: Introduction to Helm
Helm is the package manager for Kubernetes, designed to simplify deployment, configuration, and lifecycle management of Kubernetes applications using reusable packages called charts.
βοΈ Prerequisites
Before using Helm, ensure the following:
- β A working Kubernetes cluster
- β
kubectlconfigured to access the cluster - β Helm CLI installed on your local system
π§ Install Helm
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bashπ§© Verify Helm Installation
helm versionπ How Helm Connects to Kubernetes
Helm does not need a server component (like Tiller in v2). It uses:
- Your existing
kubeconfigfile (~/.kube/config) - Communicates directly with Kubernetes API server
- Uses standard Kubernetes resources:
Deployments,Services,Secrets, etc. - Releases are tracked in your cluster (by default stored as Kubernetes Secrets)
In essence, Helm is just another Kubernetes client, like
kubectl, but focused on packages.
π Getting Started: Using Existing Helm Charts
The fastest way to start with Helm is by installing applications using public charts.
1οΈβ£ Add a Chart Repository
helm repo add bitnami https://charts.bitnami.com/bitnami2οΈβ£ Update the Repository Cache
helm repo update3οΈβ£ Search for a Chart
helm search repo nginx4οΈβ£ Install a Chart
helm install my-nginx bitnami/nginxThis command installs the nginx chart from the Bitnami repo as a release named my-nginx.
5οΈβ£ Verify the Installation
helm list
kubectl get allπ§° Helm Is Like APT/YUM for Kubernetes
| Platform | Install Method | Example |
|---|---|---|
| Linux | apt install nginx | Installs NGINX on system |
| Kubernetes | helm install nginx | Installs NGINX in cluster |
π§± Helm Components Overview
| Component | Description |
|---|---|
| Chart | Packaged application with Kubernetes templates |
| Repository | Collection of charts (public or private) |
| Release | Installed instance of a chart in your cluster |
| Helm CLI | Interface to install, upgrade, uninstall, or inspect charts |
π¦ Helm Chart Anatomy
A Helm chart is a structured directory containing:
mychart/
βββ Chart.yaml # Chart metadata
βββ values.yaml # Default config values
βββ templates/ # Kubernetes YAML templates
βββ charts/ # Subcharts (optional)
βββ README.md # Documentation (optional)π οΈ Create a Chart
helm create myappπ’ Helm Repositories
Helm repositories host charts and can be added easily:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm repo listπ Helm Releases
A release is a deployed instance of a chart.
Common Release Commands:
# Install
helm install my-nginx bitnami/nginx
# List
helm list
# Upgrade
helm upgrade my-nginx bitnami/nginx
# Roll back
helm rollback my-nginx 1
# Uninstall
helm uninstall my-nginxπ§ Customizing Installations
Using --set (inline):
helm install my-nginx bitnami/nginx \
--set service.type=NodePort \
--set replicaCount=2Using --values (file):
helm install my-nginx bitnami/nginx -f custom-values.yamlCombine both:
helm install my-nginx bitnami/nginx \
-f base.yaml \
--set service.type=LoadBalancerπ Preview and Debug Charts
Preview manifests without installing:
helm template my-nginx bitnami/nginxDry-run install:
helm install my-nginx bitnami/nginx --dry-run --debugπ₯ Get and Customize Chart Values
Show default values:
helm show values bitnami/nginxSave for customization:
helm show values bitnami/nginx > custom-values.yamlThen install with:
helm install my-nginx bitnami/nginx -f custom-values.yamlπ Get Values from a Running Release
helm get values my-nginx -n default --allπ§ Helm v2 vs v3
| Feature | Helm v2 | Helm v3 |
|---|---|---|
| Tiller Component | β Required | β Removed |
| Security (RBAC) | Complex | Simplified |
| CRD Support | Via Hooks | Native Support |
| Release Namespacing | Global | Scoped to Namespace |
| Chart Repositories | Helm Hub only | Helm Hub + OCI support |
| Release Storage | ConfigMaps | Kubernetes Secrets |
| Upgrade Strategy | Two-step (client + Tiller) | Single-step (client-only) |
Helm v3 is recommended. Use the 2to3 plugin to migrate from Helm v2.
π§° Common Helm CLI Reference
# Add repo
helm repo add <name> <url>
# Update repos
helm repo update
# Search
helm search repo <keyword>
# Install
helm install <release-name> <chart>
# Upgrade
helm upgrade <release-name> <chart>
# Rollback
helm rollback <release-name> <revision>
# Uninstall
helm uninstall <release-name>
# Get installed values
helm get values <release-name> -n <namespace> --all
# Show default values
helm show values <chart-name>β Summary
- Helm simplifies app deployment on Kubernetes via reusable charts.
- Works with your kubeconfigβno need for server-side components.
- Helm v3 is modern, secure, and CI/CD-friendly.
- Start by using existing charts, then build and customize your own.
- Mastering Helm is essential for Kubernetes-based DevOps and GitOps workflows.