Kubernetes  

How to Use Kubernetes Helm Charts for Application Deployment

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:

  • Kubernetes → Kitchen

  • YAML files → Ingredients

  • Helm Chart → Recipe

  • Helm → Chef who follows recipe

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:

  • Deployment

  • Service

  • ConfigMaps

  • Secrets

Release

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

Example:

  • Chart: Node.js App

  • Release: node-app-v1

Values.yaml

This file allows you to customize your deployment.

Example:

  • Number of replicas

  • Image version

  • Environment variables

Why Use Helm for Kubernetes Deployment?

  • Avoid repetitive YAML writing

  • Easy version control

  • Faster deployments

  • Easy rollback

  • Better configuration management

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:

  • Downloads chart

  • Creates Kubernetes resources

  • Deploys application

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:

  • templates/

  • values.yaml

  • Chart.yaml

Step 3: Edit templates (Deployment, Service)

Step 4: Deploy:

helm install my-app ./my-app

Before vs After Using Helm

Before Helm:

  • Multiple YAML files

  • Manual configuration

  • Difficult updates

  • No version control

After Helm:

  • Single reusable chart

  • Easy configuration via values.yaml

  • One command deployment

  • Simple rollback

Common Issues and Fixes

  1. Chart not installing

  • Run:

helm repo update
  1. Pod not running

  • Check:

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

  • Verify values.yaml

  1. Upgrade failed

  • Check logs and rollback

Advantages

  • Simplifies Kubernetes deployments

  • Reusable templates

  • Easy configuration management

  • Supports CI/CD pipelines

  • Version control and rollback support

Disadvantages

  • Learning curve for beginners

  • Template debugging can be tricky

  • Misconfiguration can affect multiple environments

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.