Helm: Why DevOps Engineers Love it?

by | 28.05.2021 | Engineering

Kubernetes doesn’t have reproducibility built-in.

At least, that’s what we hear most people complain as a cloud native consultation firm serving both startups and enterprises.

I have been using Kubernetes for a while now, and it stands up to the mark of being a gold standard container orchestration tool. Sharing is caring, so I wrote a blog about it too.

A thing people often forget is that Kubernetes never was intended to have reproducibility in its scope. Still, its presence under CNCF ☂ makes it natively compatible with other projects specializing in managing reproducibility.

So, in this post, let’s dive in through a CNCF graduated project that supports k8s natively and can be a solution to all your reproducibility problems.

How does one get reproducibility from k8s?

The answer is simple, use a package manager that would install packages in your cluster.

The package would contain a reproducible template that can be used to create your entire scalable infrastructure with one command and remove the manual effort of listing each file using kubectl.

The CNCF ☂ provides you with a project named Helm. Learn more about CNCF here.

What is Helm?

Helm is a package manager that has native support for Kubernetes (from the 1.4 release). Now a graduated CNCF project, Helm resulted from a collaboration between Deis (a container tooling business that Microsoft now owns) and Google.

Helm allows you to install packages in your cluster, much like you would use apt, yum on your laptop. Just define the components that you want to install in your application, and it will take care of the installation and configuration of these components, saving you from headaches.

Helm Deployment Life Cycle
Helm Deployment Life Cycle Source: Microsoft

Despite its appearance, its reach extends well beyond that of a mere package manager. It’s a breathing project and changes heavily from version to version, with more functionalities added to it with the subsequent release. However, let’s start at the beginning and understand what’s capable of with a high-level overview.

Helm: The package manager for Kubernetes

DevOps teams use Kubernetes YAML files to configure Kubernetes workload. These YAML files define everything required for container deployment. Everything from how each Pod must be configured to how the Kubernetes cluster handles load balancing must be specified in those YAML files.

As a result, in order to set up a new Kubernetes workload, you must first build a YAML file for that workload. To do it manually, you’ll need to create multiple YAML files, one for each task.

Helm Charts

Rather than writing individual YAML files for each application, you can create a Helm chart and let Helm deploy the application to the cluster for you. Helm charts are collections of templates for multiple Kubernetes resources that work together to construct an application. When deploying a Helm chart on several Kubernetes clusters, it can be customized. Helm charts can be built in such a way that environment or deployment-specific configurations can be extracted to a separate file, and afterward, these values can be specified when the Helm chart is deployed.

Helm Chart Process
Helm Chart Process Source: Microsoft

You can use one chart with different variables in your development, staging, and production environments—no need for multiple charts.

Helm repository

Now that you’ve generated your chart, what should you do? You upload it to a repository.

Is it necessary to download the entire repository to install those charts? No way! Helm includes a public library for the most often used charts, similar to Docker Hub.

You can also construct and host your own chart repository online and download charts from these repositories. You would find most of the charts required by you already hosted on the Helm repository. Explore the repository here.

Helm Repository
Helm Repository Source: Microsoft

Because a chart repository is essentially an index.yaml file served from a static web server, you can make one anywhere you want. This allows you to have a private chart on your intranet or local server.

You can also try other open-source alternatives like ChartMuseum, an open-source Helm Chart Repository server written in Go (Golang), with support for cloud storage backends, including Google Cloud Storage, Amazon S3, Microsoft Azure Blob Storage, and other cloud providers.

Easy Updates

Helm has the ability to adjust application configurations during deployment. The DevOps team may set the Kubernetes resources used in the application and all of the environment-specific needs for those resources. This allows teams to reuse a single Helm chart across many environments and easily update dependencies of previously deployed infrastructure.

Rollbacks

Helm keeps track of all the versions of your releases in a database. So, if something goes wrong during deployment, reverting to the prior version is as simple as one command.

Drawbacks

Troubleshooting and Debugging

If I am honest, Helm is quite complex. As the entire system is dependent on templating Helm charts, it is complicated to design and debug big applications that may include several Kubernetes resources. The more Helm charts there are, the more complicated the system becomes. Consider how long it would take a team to identify and fix a bug in a Helm chart template that has been used several times across several Kubernetes resources in a complicated application.

Learning curve

Helm makes it easier to manage Kubernetes clusters. However, producing the first Helm chart is not as straightforward as running a few commands. The procedure is highly complex, with a high learning curve that may take some time for DevOps teams to adjust. Helm aims to make things as simple as possible by providing extensive documentation on how to perform things.

Final Thoughts

With its versioned charts, Helm has proven to be a valuable tool in maintaining today’s complex infrastructures. Furthermore, the project has reduced the time it takes to develop environments in production services and locally.

Another option for reproducibility is to use Kustomize, a template-free way to customize application configurations and manage Kubernetes workloads. Both Helm and Kustomize are used depending upon use cases, and let’s keep the details for some other day.

Feel free to try Helm out and we are a text away if you want help accelerating your cloud native or reproducibility adoption.

You can check a few of our recent deep dives here:

Happy Learning!

Join the Community

The DevOps Awareness Program

Subscribe to the newsletter

Join 100+ cloud native ethusiasts

#wearep3r

Join the community Slack

Discuss all things Kubernetes, DevOps and Cloud Native

More stories from our blog

Linkerd: Looming on Service Meshes

Linkerd: Looming on Service Meshes

Microservices and service meshes have become a staple of the industry as companies realize the full potential of creating an independent architecture that allows for easier scale up, agile development, resilience and streamlined deployment. Many of these applications...

What’s new in Flux v0.17.0?

What’s new in Flux v0.17.0?

Flux2 came with its new update a while ago, and it is sheer exciting for the users because it brought a lot of new features. It also made a lot of new enhancements and updates. We will take a look at the entire catalogue in this article. So, without further a due,...

What’s new in Portainer v2.7.0 BE?

What’s new in Portainer v2.7.0 BE?

A few days ago, Portainer Business Edition came up with their new update. It is quite a massive update with many new features, bug fixes, enhancements and much more. In this article, we will see all of those in a nutshell. Let's start What is Portainer? Portainer is...

DVC (Git For Data): A Complete Intro

DVC (Git For Data): A Complete Intro

As a data scientist or ML engineer, have you ever faced the inconvenience of experimenting with the model? When we train the model, the model file is generated. Now, if you want to experiment with some different parameters or data, generally people rename the existing...

Recap of the Cloud Native Meetup Saar #3

Recap of the Cloud Native Meetup Saar #3

We are looking back on a very successful third edition of our Cloud Native Meetup Saar #3! Togetherer with our co-host anynines, we enjoyed a fun afternoon filled with great speakers, intriguing topics and thoughtful conversations! We welcomed a total of three...

Portainer Ambassador Series ft. Fabian Peter

Portainer Ambassador Series ft. Fabian Peter

Portainer arranged a fun and informative discussion through a one-hour special named “Ambassador Series” on 1st July 2021. It was pretty amazing to see Savannah Peterson as the host and two other guests. One is our very own CEO of p3r.one, Fabian Peter and the other...

What’s new in Longhorn v1.2.0?

What’s new in Longhorn v1.2.0?

Longhorn came with their new update. It is full of surprises. We will peel off one by one to see all the latest updates, features, bug fixes and much more. This one is a much-awaited update, and we will see all of it in a moment. So, without further a due, let's...

Kubernetes Stateful Friend: What’s more to etcd?

Kubernetes Stateful Friend: What’s more to etcd?

The Kubernetes control plane consists of various components, and one of such components is etcd. Anyone starting to learn k8s come across it and memorizes quickly that it’s a key-value pair for Kubernetes with persistence store. But, what’s more to it? Why do we need...

What’s New in Flux 1.24.0?

What’s New in Flux 1.24.0?

Flux 1.24 is out this month with couple of updates and Important notices. Let’s get around what are the updates in the new release. But, first, let’s do a quick intro on Flux. What is Flux? Flux is a tool that checks to see if the status of a cluster matches the git...

Event Driven Architecture Demystified (For Pros)

Event Driven Architecture Demystified (For Pros)

Event-Driven Architecture or EDA is talked about with pride inside any organization. But, through last few months, I have noticed a trend that the definition of EDA is not consistent across people and organizations. It’s vague. EDA is something where you have events...

Interested in what we do? Looking for help? Wanna talk about software strategy?