Shoomer

  • Docker
    DockerShow More
    Monolith to Microservices: A Docker + K8s Migration Story
    8 Min Read
    Docker Security Best Practices | Scout Trivy Scans
    8 Min Read
    CI/CD with Docker and Kubernetes with Examples YML
    10 Min Read
    Docker Networking Deep Dive | Bridge, Host, Overlay
    9 Min Read
    Docker Volumes and Bind Mounts Explained with Examples
    7 Min Read
  • Kubernetes
    KubernetesShow More
    Zero to Hero Kubernetes Crash Course – Minikube, kubectl, Helm Quickstart
    7 Min Read
    Spring Boot Web Crash Course 2025 – REST APIs, Controllers, Get/Post
    7 Min Read
    K8s Crash Course – Learn Containers to Clusters (Hands-On in 2025)
    7 Min Read
    Spring Data JPA Crash Course 2025 – Repository, Query Methods & Paging
    7 Min Read
    Spring Boot for Web Development – Crash Course with Thymeleaf & MVC
    7 Min Read
  • CICD Pipelines
    CICD PipelinesShow More
    What is GitOps with ArgoCD: Deep Dive into Architecture
    10 Min Read
    CI/CD with Docker and Kubernetes with Examples YML
    10 Min Read
  • Pages
    • About Us
    • Contact Us
    • Cookies Policy
    • Disclaimer
    • Privacy Policy
    • Terms of Use
Notification Show More
Font ResizerAa
Font ResizerAa

Shoomer

  • Learning & Education
  • Docker
  • Technology
  • Donate US
Search
  • Home
  • Categories
    • Learning & Education
    • Technology
    • Docker
  • More Foxiz
    • Donate US
    • Complaint
    • Sitemap
Follow US
Home » Kubernetes Helm Charts: A Complete Tutorial
Kubernetes

Kubernetes Helm Charts: A Complete Tutorial

shoomer
By shoomer
Last updated: June 11, 2025
Share

Managing Kubernetes deployments efficiently can be challenging, especially as environments grow larger and more complex. Helm, Kubernetes’ package manager, simplifies lifecycle management by representing configurations as reusable templates called charts. Helm makes it easy to deploy, upgrade, and manage applications in Kubernetes clusters.

Contents
Table of ContentsWhat is Helm? Concepts and BasicsChartsValuesTemplatesInstalling and Upgrading Helm ChartsInstalling a Helm ChartUpgrading a Helm ChartCreating a Custom Helm ChartStep 1 – Create a Chart SkeletonStep 2 – Edit TemplatesStep 3 – Define Default ValuesStep 4 – Install and TestOptional – Packaging and Sharing the ChartUsing Dependencies in HelmStep 1 – Add a DependencyStep 2 – Update DependenciesStep 3 – Use Dependency ValuesFinal Thoughts

This complete tutorial covers foundational Helm concepts, steps to install and upgrade charts, how to create custom Helm charts, and managing chart dependencies.

Table of Contents

  1. What is Helm? Concepts and Basics
    • Charts
    • Values
    • Templates
  2. Installing and Upgrading Helm Charts
  3. Creating a Custom Helm Chart
  4. Using Dependencies in Helm
  5. Final Thoughts

What is Helm? Concepts and Basics

Helm is a tool that streamlines Kubernetes deployment configurations into reusable packages called charts. Charts are collections of YAML files and templates that define Kubernetes resources.

Charts

A Helm chart is a package containing Kubernetes resource configurations. It consists of these components:

  • Charts: Templates for Kubernetes objects like Deployments, Services, and ConfigMaps.
  • Values: Override default configurations with custom inputs.
  • Dependencies: Reusable charts nested as subcharts.

Directory Structure of a Helm Chart:

my-chart/
  Chart.yaml          # Metadata about the chart
  values.yaml         # Default configuration values
  templates/          # Kubernetes manifests in template format
    deployment.yaml   # Sample Deployment resource
    service.yaml      # Sample Service resource

Values

Values are dynamic inputs to Helm templates. They allow users to customize a chart. For example:

  • A chart might define replicas in the values.yaml file: replicas: 3

Users can override this with a custom values.yaml during Helm installation:

helm install my-app ./my-chart -f custom-values.yaml

Templates

Templates use Go templating to dynamically render Kubernetes manifests. For example:

spec:
  replicas: {{ .Values.replicas }}

When a user provides replicas = 3 in the values.yaml, Helm renders:

spec:
  replicas: 3

Key Takeaways:

  • Chart = Static package.
  • Values.yaml = Dynamic inputs.
  • Template = Customizable resource file generated at runtime.

Installing and Upgrading Helm Charts

Helm simplifies the process of deploying charts by using the helm install and helm upgrade commands.

Installing a Helm Chart

Step 1: Add a Helm Repository
Helm repos host charts for deployment. For example, add the official Bitnami repo:

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

Step 2: Install a Chart
Use helm install to deploy a chart in a Kubernetes cluster:

helm install my-mysql bitnami/mysql

Command Breakdown:

  • my-mysql is the release name.
  • bitnami/mysql points to the MySQL chart in the Bitnami repo.

Check running resources:

kubectl get all

Upgrading a Helm Chart

Helm uses helm upgrade to modify or redeploy an existing release.

Update with an override:

helm upgrade my-mysql bitnami/mysql --set auth.rootPassword=MySecurePass

View the status of the deployed release:

helm status my-mysql

Diagram of Installation and Upgrade:
Helm Installation Flow
The chart templates are rendered dynamically and sent to the Kubernetes API server for deployment.


Creating a Custom Helm Chart

Creating custom Helm charts allows you to package your application’s resources for easy deployment.

Step 1 – Create a Chart Skeleton

Use helm create to scaffold a new chart:

helm create my-app

Generated Directory Structure:

my-app/
  Chart.yaml         # Metadata (name, version, description)
  values.yaml        # Configurable parameters
  templates/         # Kubernetes templates
    deployment.yaml  # Default Deployment manifest
    service.yaml     # Default Service manifest

Step 2 – Edit Templates

Customize Kubernetes templates, for example, deployment.yaml in templates/:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-app
spec:
  replicas: {{ .Values.replicas }}
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
    spec:
      containers:
      - name: app
        image: nginx
        ports:
        - containerPort: 80

Step 3 – Define Default Values

Update values.yaml to specify default settings:

replicas: 2

Step 4 – Install and Test

Deploy the chart:

helm install my-app ./my-app

Test the deployment:

kubectl get pods

Optional – Packaging and Sharing the Chart

Helm can package a chart into a .tgz file:

helm package my-app

The packaged chart can be distributed or uploaded to a Helm repository.


Using Dependencies in Helm

Helm supports dependencies between charts, allowing one chart to include reusable subcharts.

Step 1 – Add a Dependency

Edit the main chart’s Chart.yaml to reference dependent charts:

dependencies:
- name: redis
  version: 16.0.0
  repository: https://charts.bitnami.com/bitnami

Step 2 – Update Dependencies

Download the listed dependencies with:

helm dependency update ./my-app

Helm downloads the Redis chart and places it in the charts/ directory.

Step 3 – Use Dependency Values

Override dependencies in values.yaml:

redis:
  auth:
    password: myredissecret

Deploy with dependencies:

helm install my-app ./my-app

Visual Reference of Dependence Flow:
Helm Dependencies
The parent chart (my-app) uses the Redis subchart to deploy both resources seamlessly.


Final Thoughts

Helm charts simplify Kubernetes deployments by transforming configurations into reusable packages. With the ability to customize templates, manage dependencies, and handle upgrades effortlessly, Helm is essential for any Kubernetes developer or operator.

Use this guide as your go-to resource for getting started with Helm, mastering advanced concepts, and navigating real-world deployments. Start managing Kubernetes workloads with confidence today!

Share This Article
Facebook Email Copy Link Print
Previous Article CI/CD with Docker and Kubernetes with Examples YML
Next Article Complete guide on Auto-Scaling in Kubernetes (HPA/VPA)
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Empowering Tomorrow's Leaders through Understanding Child Development and Learning

Learning to thrive

Daily Feed

Zero to Hero Kubernetes Crash Course – Minikube, kubectl, Helm Quickstart
June 23, 2025
Spring Boot Web Crash Course 2025 – REST APIs, Controllers, Get/Post
June 23, 2025
K8s Crash Course – Learn Containers to Clusters (Hands-On in 2025)
June 23, 2025
Spring Data JPA Crash Course 2025 – Repository, Query Methods & Paging
June 23, 2025

You Might Also Like

Kubernetes

Running Stateful Applications in Kubernetes (at Scale)

June 11, 2025
DockerKubernetes

Monolith to Microservices: A Docker + K8s Migration Story

June 11, 2025
Kubernetes

Complete guide on Auto-Scaling in Kubernetes (HPA/VPA)

June 11, 2025
Kubernetes

Kubernetes Crash Course 2025 – Learn K8s in 60 Minutes for Beginners

June 23, 2025
@Copyright 2025
  • Docker
  • Technology
  • Learning & Education
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?