Codesmith Blog

Introduction to Helm

Written by Donald Blanc | Oct 5, 2019 10:46:00 PM
Kubernetes Helm has revolutionized the container and cloud industry. In this blog we will briefly discuss what Helm is, why it is important, and the problems Helm is solving. Let us go into greater details surrounding Helm.
Helm is the package manager for Kubernetes. Kubernetes also is known as K8s. It helps to Build, Deliver, and Scale containerized applications. The name Kubernetes came about from the mangled conventional pronunciation of a Greek word, κυβερνήτης, which means helmsman or pilot. Helm is ironically named to help you navigate the murky waters of cloud computing and containerized applications.
Helm is the tool that installs, uninstalls, configures, and updates features and packages for Kubernetes. It is analogous to Yum or Apt in many Linux distributions. It makes it easier to organize Kubernetes objects in a packaged application that anyone can download and install in one click or configure their specific needs. In Helm, these objects are called charts. According to Wikipedia, a helmsman or helm is a person who steers a ship, submarine or other various maritime vessels. Helm is the most optimal and ideal way to share, find and use software built on Kubernetes. It lets you deploy, fetch and manage the lifecycle of your applications.

Helm is important for several reasons:

  • It improves productivity; instead of engineers spending time on deploying test environments to test their Kubernetes cluster, developers can deploy a pre-tested app via a Helm chart and focus on developing their application. It can be difficult to get started with Kubernetes and learn how to deploy production-grade applications. However, Helm provides one-click deployment of apps, making it much easier to get started and deploy your first application, even if you don’t have extensive container experience.
  • One of the key aspects of Helm is that it reduces complexity. Deployments of Kubernetes-orchestrated apps can be extremely complex. Using incorrect values in configuration files or failing to roll apps correctly from YAML templates can break deployments. Helm Charts allow the community to preconfigure applications, predefine values that are fixed by providing a consistent interface for changing configurations. This dramatically reduces complexity and eliminates deployment errors by locking out incorrect configurations.
  • Helm is production-ready out of the box. Running Kubernetes in production with all its components (deployments, namespaces, pods, etc.) is difficult and prone to error. With a tested, stable Helm Chart, users can deploy to production with confidence, and reduce the complexity of maintaining a Kubernetes App Catalog. Previously, it was much more difficult to share the Kubernetes applications and replicate them between environments. With Helm, this is no duplicate effort. Once a developer has created a chart, tested and stabilized once, it can be reused across multiple groups in an organization and outside it.

There are two main components that comprise the Helm:

  • The Helm Client is the tool that allows developers to create new charts, manage chart repositories and interact with the Tiller Server.
  • The Tiller Server is a server that runs inside the Kubernetes cluster. It interacts with the Helm client and translates chart definitions and configurations to Kubernetes API commands. Tiller combines a chart and its configuration to build a release. Tiller is also responsible for upgrading charts, uninstalling and deleting them from the Kubernetes cluster.

Let’s take a look at this example of a chart template:

A chart template is a mechanism by which the creator of the chart can define variables that users can modify upon installation. Those variables are called values, and a chart must have reasonable defaults for all values to ensure the chart installs correctly. All template files are stored in charts template/ folder. To provide a value for a template in a specific chart, you provide a file called values.yaml inside of a chart which contains default values.

Now let’s take a look at this example of a template file:

Summary

To summarize, Helm is an important new component of Kubernetes that simplifies deployments and get you up and running much more quickly. Helm is a package manager, like Yum or Apt, which lets you package together objects comprising a Kubernetes application and install them with one click. This is only an introduction into Helm but I recommend reading Helm’s comprehensive documentation to fully understand how Helm works and how to create charts that will be stable and reusable.