Skip to main content

Kubernetes with Helm: Kubernetes for Absolute Beginners

 Kubernetes has become the de facto standard for orchestrating containers in production environments. However, as powerful as Kubernetes is, managing its configurations manually can become complicated and time-consuming. This is where Helm comes in—a package manager that simplifies deploying applications in Kubernetes.

In this blog post, we'll explore the fundamentals of Kubernetes and Helm from the ground up. Whether you're just getting started with container orchestration or looking for an easier way to manage your workloads, this guide is tailored for you.


Table of Contents

  1. What is Kubernetes?

  2. Kubernetes Core Concepts

  3. Why Kubernetes Can Be Complex

  4. Introduction to Helm

  5. How Helm Simplifies Kubernetes

  6. Installing Helm and Setting Up a Cluster

  7. Working with Helm Charts

  8. Creating Your First Helm Chart

  9. Best Practices with Helm

  10. Conclusion


1. What is Kubernetes?

Kubernetes (often abbreviated as K8s) is an open-source platform developed by Google (now maintained by CNCF) for automating deployment, scaling, and management of containerized applications.

Think of Kubernetes as the operating system for your container-based applications. Instead of manually running Docker containers on servers, Kubernetes provides you with tools to:

  • Deploy containers at scale

  • Ensure applications remain available

  • Manage network, storage, and configurations

  • Perform rolling updates and rollbacks


2. Kubernetes Core Concepts

Before diving into Helm, it’s essential to understand some Kubernetes fundamentals:

a. Pod

A Pod is the smallest deployable unit in Kubernetes. It can hold one or more containers, usually tightly coupled.

b. Node

A Node is a worker machine (virtual or physical) in the Kubernetes cluster that runs the application workload.

c. Cluster

A Cluster is a set of nodes that Kubernetes manages.

d. Deployment

A Deployment manages a set of identical pods and helps with updates and scaling.

e. Service

A Service exposes your application running on pods, enabling other applications or users to access it.

f. ConfigMap and Secret

These are used to manage configuration data. ConfigMap stores non-sensitive data, while Secret stores sensitive info like passwords or API keys.

g. Namespace

A Namespace provides scope for resources in a cluster. Think of it like a project or an environment (e.g., dev, staging, prod).


3. Why Kubernetes Can Be Complex

Kubernetes is incredibly powerful, but with power comes complexity:

  • YAML configurations can get lengthy and error-prone.

  • Managing multiple microservices becomes cumbersome.

  • Handling versioning and releases of applications manually is inefficient.

  • Copy-pasting Kubernetes manifests across environments increases the risk of human error.

This is where Helm becomes valuable.


4. Introduction to Helm

Helm is often referred to as the “package manager for Kubernetes.” Similar to how apt works on Ubuntu or npm works for Node.js, Helm helps install, upgrade, and manage Kubernetes applications.

What Can Helm Do?

  • Install applications using “charts”

  • Roll back to previous versions of a deployment

  • Manage application configurations

  • Simplify CI/CD pipelines for Kubernetes


5. How Helm Simplifies Kubernetes

Instead of writing long Kubernetes manifests (YAML files) for deployments, services, and config maps, Helm uses charts—which are pre-configured packages of Kubernetes resources.

For example, if you want to deploy a PostgreSQL database in Kubernetes, you can use a Helm chart instead of writing deployment YAMLs from scratch.

With just one command:

bash
helm install my-postgres bitnami/postgresql

You get a fully configured, ready-to-use PostgreSQL deployment.


6. Installing Helm and Setting Up a Cluster

Step 1: Install Helm

Helm can be installed on macOS, Windows, or Linux.

For macOS:

bash
brew install helm

For Linux:

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

For Windows:

Download the latest release from the Helm GitHub page and extract it into your system path.

Step 2: Set Up a Kubernetes Cluster

If you’re a beginner, you can use Minikube or Kind to set up a local Kubernetes cluster.

Install Minikube:

bash
brew install minikube minikube start

Once Minikube is running, verify Helm can access your cluster:

bash
kubectl get nodes

7. Working with Helm Charts

What is a Helm Chart?

A Helm Chart is a collection of files that describe a Kubernetes application. At its core, a chart includes:

  • Chart.yaml: Metadata about the chart

  • values.yaml: Default configuration values

  • templates/: Directory with Kubernetes YAML templates

Using a Chart from a Repository

Helm has a public chart repository called Artifact Hub, where you can find official charts for popular applications like MySQL, Redis, WordPress, Jenkins, etc.

Example: Install NGINX Ingress Controller

bash
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update helm install my-nginx ingress-nginx/ingress-nginx

Upgrade a Release

bash
helm upgrade my-nginx ingress-nginx/ingress-nginx --set controller.replicaCount=2

Uninstall a Release

bash
helm uninstall my-nginx

8. Creating Your First Helm Chart

Let’s say you want to deploy a simple web application.

Step 1: Create a New Chart

bash
helm create my-webapp

This creates the following structure:

markdown
my-webapp/ Chart.yaml values.yaml templates/ deployment.yaml service.yaml ...

Step 2: Customize the Chart

Edit values.yaml:

yaml
replicaCount: 2 image: repository: nginx tag: latest pullPolicy: IfNotPresent service: type: ClusterIP port: 80

Step 3: Install the Chart

bash
helm install my-webapp ./my-webapp

Step 4: Verify the Installation

bash
kubectl get all

If needed, you can override default values:

bash
helm install my-webapp ./my-webapp --set replicaCount=3

9. Best Practices with Helm

  • Use values.yaml to manage configuration: Avoid hardcoding values in templates.

  • Use semantic versioning in Chart.yaml to manage versions properly.

  • Keep secrets outside Helm charts: Integrate with external secret managers (e.g., HashiCorp Vault or Kubernetes Secrets).

  • Leverage Helm Hooks for pre-install and post-install operations.

  • Use helm lint to validate charts before deploying.

  • Version control your Helm charts: Use Git to track changes and enable CI/CD.

  • Test locally with Kind or Minikube before deploying to production clusters.

  • Namespace-aware installations: Use --namespace flag to isolate deployments.


10. Conclusion

Helm takes the complexity of Kubernetes and simplifies it dramatically. For beginners, it provides a gentler learning curve and an efficient path to managing real-world applications in production.

By abstracting Kubernetes manifests into reusable templates and values, Helm not only saves time but also promotes best practices in DevOps and infrastructure as code. Whether you're deploying a single service or a complex microservices architecture, Helm empowers you to manage everything more easily, consistently, and reliably.

So, if you're new to Kubernetes, don’t just stop at writing raw YAML files—embrace Helm and make your Kubernetes journey smoother and more scalable.

Comments

Popular posts from this blog

Laravel 10 — Build News Portal and Magazine Website (2023)

The digital landscape is ever-evolving, and in 2023, Laravel 10 will emerge as a powerhouse for web development . This article delves into the process of creating a cutting-edge News Portal and Magazine Website using Laravel 10. Let’s embark on this journey, exploring the intricacies of Laravel and the nuances of building a website tailored for news consumption. I. Introduction A. Overview of Laravel 10 Laravel 10 , the latest iteration of the popular PHP framework, brings forth a myriad of features and improvements. From enhanced performance to advanced security measures, Laravel 10 provides developers with a robust platform for crafting dynamic and scalable websites. B. Significance of building a News Portal and Magazine Website in 2023 In an era where information is king, establishing an online presence for news and magazines is more crucial than ever. With the digital audience constantly seeking up-to-the-minute updates, a well-crafted News Portal and Magazine Website beco...

Laravel 10 — Build News Portal and Magazine Website (2023)

Learn how to create a stunning news portal and magazine website in 2023 with Laravel 10 . Follow this comprehensive guide for expert insights, step-by-step instructions, and creative tips. Introduction In the dynamic world of online media, a powerful content management system is the backbone of any successful news portal or magazine website. Laravel 10, the latest iteration of this exceptional PHP framework, offers a robust platform to build your digital empire. In this article, we will dive deep into the world of Laravel 10 , exploring how to create a news portal and magazine website that stands out in 2023. Laravel 10 — Build News Portal and Magazine Website (2023) News websites are constantly evolving, and Laravel 10 empowers you with the tools and features you need to stay ahead of the game. Let’s embark on this journey and uncover the secrets of building a successful news portal and magazine website in the digital age. Understanding Laravel 10 Laravel 10 , the most recent vers...

Google Ads MasterClass 2024 - All Campaign Builds & Features

  Introduction to Google Ads in 2024 Google Ads has evolved tremendously over the years, and 2024 is no different. Whether you are a small business owner, a marketer, or someone looking to grow their online presence, Google Ads is an essential tool in today’s digital landscape. What Is Google Ads? Google Ads is a powerful online advertising platform that allows businesses to reach potential customers through search engines, websites, and even YouTube. It gives businesses the ability to advertise their products or services precisely where their audience is spending their time. From local businesses to global enterprises, Google Ads helps companies of all sizes maximize their online visibility. The Importance of Google Ads for Modern Businesses In 2024, online competition is fiercer than ever. Businesses need to stand out, and Google Ads offers a way to do that. With the platform's variety of ad formats and targeting options, you can reach people actively searching for your product ...