Introduction

If you have ever tried deploying applications directly on Kubernetes using YAML files, you already know how complex and repetitive it can become. Managing multiple configuration files, environment variables, and versions is not easy, especially in real-world production environments.

This is where Helm comes in.

Helm is often called the "package manager for Kubernetes." It helps you define, install, and manage Kubernetes applications using reusable templates called Helm Charts.

In this guide, you will learn how to use Kubernetes Helm Charts for application deployment in simple words, with practical examples and real-world understanding.

What is Helm in Kubernetes?

Helm is a tool that simplifies Kubernetes deployments by packaging all required resources into a single reusable unit called a Chart.

Instead of writing multiple YAML files again and again, you create a template once and reuse it.

Real-World Analogy

Think of Helm like a food delivery app:

Without Helm, you manually mix ingredients every time. With Helm, you just reuse the recipe.

Key Concepts of Helm

Chart

A Helm Chart is a collection of files that describe a Kubernetes application.

It includes:

Release

A release is a running instance of a chart in your Kubernetes cluster.

Example:

Values.yaml

This file allows you to customize your deployment.

Example:

Why Use Helm for Kubernetes Deployment?

Step 1: Install Helm

On Ubuntu/Linux:

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Verify installation:

helm version

Step 2: Add a Helm Repository

Helm repositories are like app stores.

Example:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

Step 3: Search for a Chart

helm search repo nginx

You will see available charts.

Step 4: Install a Helm Chart

Example: Deploy Nginx

helm install my-nginx bitnami/nginx

This command:

Check status:

kubectl get pods

Step 5: Customize Deployment Using values.yaml

You can override default values.

Example values.yaml:

replicaCount: 2
service:
  type: NodePort

Install with custom values:

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

Step 6: Upgrade an Application

helm upgrade my-nginx bitnami/nginx -f values.yaml

This updates your running application without downtime.

Step 7: Rollback Deployment

If something breaks, you can rollback.

Check history:

helm history my-nginx

Rollback:

helm rollback my-nginx 1

Step 8: Uninstall a Release

helm uninstall my-nginx

This removes all resources created by the chart.

Creating Your Own Helm Chart

Step 1: Create chart

helm create my-app

Step 2: Folder structure:

Step 3: Edit templates (Deployment, Service)

Step 4: Deploy:

helm install my-app ./my-app

Before vs After Using Helm

Before Helm:

After Helm:

Common Issues and Fixes

  1. Chart not installing

helm repo update
  1. Pod not running

kubectl describe pod <pod-name>
  1. Wrong configuration

  1. Upgrade failed

Advantages

Disadvantages

Final Thoughts

Using Helm Charts in Kubernetes is a must-have skill for modern DevOps engineers.

It transforms complex deployments into simple, repeatable processes. Once you start using Helm, managing Kubernetes applications becomes faster, cleaner, and more efficient.