What is Helm? | With Example

Helm has become an essential tool when working with Kubernetes. As applications running on Kubernetes become more complex, managing them manually leads to poor organization and difficulties in troubleshooting issues.

This is where Helm comes in – it is the best way to manage Kubernetes applications.

In this article, we will tell you what is helm and how to use Helm charts in Kubernetes (K8s)

What is Helm

By the end of this article, you will have a solid understanding of Helm basics and be able to start using it for deploying applications on Kubernetes.

What is Helm?

Helm is a package manager for Kubernetes. It streamlines installing and managing applications on a Kubernetes cluster.

In simple terms, Helm charts help you define, install, and upgrade complex Kubernetes applications.

Just like Linux package managers such as APT and YUM, Helm manages Kubernetes charts – packages of pre-configured Kubernetes resources.

Why Use Helm?

Here are some key reasons why Helm is extremely useful:

  • Simplifies deployment of Kubernetes applications
  • Ability to package Kubernetes resources into reusable charts
  • Manage releases of deployments using a version control system
  • Facilitate sharing of Kubernetes applications

Without Helm, deploying applications on Kubernetes involves manually creating resource manifest files and then applying them using Kubectl. This can be complicated and error-prone.

Helm turns this whole process into an easy 3-step procedure – fetch the chart, customize it, and install the release.

Helm Architecture

The Helm architecture comprises of the Helm client and the Helm Library.

Here is a quick overview:

  • Helm client – Responsible for running commands such as helm install and helm upgrade. It also creates Helm chart templates and manages the repository.

  • Helm Library – The Helm Library serves as the backbone for carrying out various Helm tasks. Its primary role involves connecting with the Kubernetes API server and offering key functionalities like Merging a chart with configurations to generate a release, placing charts into Kubernetes and delivering the resulting release object, managing upgrades and removals of charts by engaging with Kubernetes, etc.

Helm Charts – Package Manager for Kubernetes

The package format in Helm is called a Chart.

A Helm chart consists of:

  1. Metadata – This includes details like the application version, name, etc.
  2. Templates – YAML definitions of Kubernetes resources such as Deployments, Services, etc. required to run the application
  3. Values file – Default configuration values injected into Templates

When Helm installs a chart, it combines the templates with configuration values provided by users to generate valid Kubernetes manifest files. This output is then applied to the Kubernetes cluster.

Benefits of using charts

  • Encapsulate application dependencies
  • Easy customization during deployment
  • Complex apps can be versioned and managed as a single package
  • Share common templates across various applications

Installing Apps Using Helm Charts

Let’s go through a simple example of using Helm to deploy the Kubernetes Dashboard application.

Step 1 – Add the Kubernetes Dashboard Chart

helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/

This adds the official Dashboard chart repository.

Step 2 – Use helm search to find the chart

helm search repo kubernetes-dashboard

Step 3 – Install the chart

helm install kubernetes-dashboard/kubernetes-dashboard \
  --name kubernetes-dashboard \
  --set service.externalPort=8080 \ 
  --set rbac.clusterRole=cluster-admin \
  --wait  

The last step fetches the Dashboard chart from the repo, customizes it using --set flags, names the release ‘kubernetes-dashboard’, and deploys it on the cluster. The --wait flag waits until all pods are ready.

That’s it! Helm charts encapsulate all the complex Dashboard configurations into an easy installation process.

You can uninstall or upgrade releases similarly using helm uninstall and helm upgrade.

Real-World Uses of Helm

Here are some examples of Helm being used in production by DevOps engineers –

  1. Deploying stable versions of software like Redis, MySQL, MongoDB, etc. Helm repositories provide pre-configured charts for popular applications.
  2. Packaging infrastructure stacks like monitoring or logging solutions (Prometheus, Grafana) into Helm charts that are reusable.
  3. Managing releases of microservices applications that have multiple loosely coupled components.
  4. Building a development pipeline around Helm to ensure standardized deployment of applications onto Kubernetes.
  5. Creating an application from scratch using a Helm umbrella chart that contains multiple sub-charts. These encompass the various services and backend jobs.

The use cases are endless! Overall, Helm truly shines in making complex application deployments on Kubernetes a breeze.

Conclusion

I hope this beginner’s guide gave you a good idea of the basics of Helm. To quickly recap –

  • Helm streamlines deploying and managing Kubernetes applications using Helm charts
  • It is a combination of the Helm client and Tiller server-side component
  • Charts allow packaging applications with their configurations as one deployable Kubernetes package
  • Common way of installing applications on Kubernetes is by using helm install

Helm simplifies running production-grade services on Kubernetes. As applications grow larger, manually applying YAML files becomes tedious. With its chart repository and robust customization features, Helm eases multi-component application deployments.

This was just an overview of Helm’s fundamentals. The official Helm documentation provides more detailed examples for getting started. Try creating your own custom charts and soon you’ll be deploying applications like a pro!

Buy me a coffeeBuy me a coffee

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.