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
  • βœ… kubectl configured 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 kubeconfig file (~/.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/bitnami

2️⃣ Update the Repository Cache

helm repo update

3️⃣ Search for a Chart

helm search repo nginx

4️⃣ Install a Chart

helm install my-nginx bitnami/nginx

This 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

PlatformInstall MethodExample
Linuxapt install nginxInstalls NGINX on system
Kuberneteshelm install nginxInstalls NGINX in cluster

🧱 Helm Components Overview

ComponentDescription
ChartPackaged application with Kubernetes templates
RepositoryCollection of charts (public or private)
ReleaseInstalled instance of a chart in your cluster
Helm CLIInterface 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=2

Using --values (file):

helm install my-nginx bitnami/nginx -f custom-values.yaml

Combine 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/nginx

Dry-run install:

helm install my-nginx bitnami/nginx --dry-run --debug

πŸ“₯ Get and Customize Chart Values

Show default values:

helm show values bitnami/nginx

Save for customization:

helm show values bitnami/nginx > custom-values.yaml

Then 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

FeatureHelm v2Helm v3
Tiller Componentβœ… Required❌ Removed
Security (RBAC)ComplexSimplified
CRD SupportVia HooksNative Support
Release NamespacingGlobalScoped to Namespace
Chart RepositoriesHelm Hub onlyHelm Hub + OCI support
Release StorageConfigMapsKubernetes Secrets
Upgrade StrategyTwo-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.