A Comprehensive Guide to Helm Charts with Examples

March 13, 2025 | 2 minutes read

Helm is a powerful package manager for Kubernetes that simplifies the deployment, management, and scaling of applications. Instead of manually defining complex Kubernetes YAML files, you can use Helm charts, which provide a structured and reusable way to deploy applications.

In this guide, we will explore:

  • What Helm charts are
  • Their key components
  • How to create and deploy a Helm chart
  • A practical example

What is a Helm Chart?

A Helm chart is a package that contains all the necessary Kubernetes resources to deploy an application. It includes metadata, default configurations, and templates for Kubernetes objects such as Deployments, Services, and ConfigMaps.

Key Components of a Helm Chart

  1. Chart.yaml – Contains metadata like the chart’s name, version, and description.
  2. values.yaml – Defines default configuration values for the application.
  3. templates/ – Contains Kubernetes resource templates.
  4. charts/ – Stores dependencies (if any).
  5. README.md – Provides documentation for the chart.

Installing Helm

Before using Helm, you need to install it on your system. Run the following command to install Helm:

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

Verify the installation with:

helm version

Creating a Helm Chart

To create a new Helm chart, use:

helm create mychart

This will generate a directory structure like this:

mychart/
│── Chart.yaml
│── values.yaml
│── templates/
│   ├── deployment.yaml
│   ├── service.yaml
│   ├── ingress.yaml
│── charts/
│── README.md

Example: Deploying a Simple Web Application

Let’s create and deploy a simple Nginx web server using Helm.

Step 1: Create the Chart

helm create nginx-chart

Step 2: Edit values.yaml

Modify values.yaml to customize the deployment:

replicaCount: 2

image:
  repository: nginx
  tag: latest
  pullPolicy: IfNotPresent

service:
  type: ClusterIP
  port: 80

Step 3: Deploy the Chart

Install the chart with:

helm install my-nginx ./nginx-chart

This deploys Nginx with 2 replicas on Kubernetes.

Step 4: Verify the Deployment

Check the running pods:

kubectl get pods

Check the Helm release:

helm list

Step 5: Upgrade and Uninstall

To update the deployment (e.g., changing the replica count to 3):

helm upgrade my-nginx ./nginx-chart --set replicaCount=3

To remove the deployment:

helm uninstall my-nginx

Conclusion

Helm charts make Kubernetes deployments easier, reusable, and scalable. By using Helm, you can package applications, manage configurations, and automate deployments efficiently.

Start using Helm today and simplify your Kubernetes workflows!

This version includes explicit **Introduction** and **Conclusion** sections, along with a **practical example** of deploying an Nginx web server using Helm. Let me know if you need any changes!

popular post

Automating PDF Link Testing Across Multiple Sites Using GitLab CI and Playwright

As a developer or QA engineer, you know the frustration of discovering broken …

Read More

Simplest Way to Deploy a Web App on Kubernetes (K8s)

If you’re looking to quickly deploy a web app and make it accessible via a URL …

Read More

How to Build an AI-Based Search System

In today’s digital landscape, AI-powered search systems are transforming how …

Read More