Taking Helm 3 For a Spin

Taking Helm 3 For a Spin

4 min read

Helm is the package manager for Kubernetes. It allows you to install applications on your Kubernetes cluster in a similar manner to yum/apt for Linux distributions.

Helm introduces several familiar concepts such as:

  • Charts which are the Helm packages (like deb/rpm)
  • Helm repositories which hold charts (similar to package repos)
  • A CLI with install/upgrade/remove commands.

Helm also has several other features such as integrated testing hooks, built-in rollbacks, release history, nested packages (chart of charts, chart dependencies) that make it really powerful for the full lifecycle of a cluster application.

Helm 2 was the latest stable version of Helm and while it is production-ready, it has faced significant resistance in adoption due to two factors:

  • Helm includes some basic templating capabilities which have lead a lot of people to falsely assume that Helm is just a templating solution like kustomize, k8comp, kdeploy, ktmpl, etc.
  • Helm 2 was based on a server component (called Tiller) which was traditionally very difficult to manage and secure.

For the first point, we have already explained that Helm is not a templating solution. It is a package manager that also happens to include templating capabilities. At the moment there isn’t any other comparable solution that offers ALL capabilities of Helm. 

For the second point, the Helm team has now released Helm 3 and it doesn’t depend on Tiller anymore!

Finally, Helm is a client only application. It uses the same RBAC security constraints as all other standard Kubernetes applications.

Helm without Tiller for non-believers

The Helm 3 executable is available at https://github.com/helm/helm/releases. I used it successfully on a brand new Kubernetes cluster running locally (Docker for desktop).

Normally with Helm 2, you are required to install Tiller using the special helm init command. Helm 2 will complain about Tiller even when you simply ask it for its version.

> helm version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Error: could not find tiller

But with Helm 3, Tiller is a thing of the past. 

> helm version
version.BuildInfo{Version:"v3.0.0-alpha.1", GitCommit:"b9a54967f838723fe241172a6b94d18caf8bcdca", GitTreeState:"clean"}

You can also ask Helm 3 to show current releases on a fully empty cluster and it will happily comply (of course showing that nothing is installed)

Kostis@NOMAD-PRO C:UsersKostis

> helm ls

NAME NAMESPACE   REVISION    UPDATED STATUS  CHART

Using Helm 3 with Helm 2 charts

Helm 3 introduces several changes to charts which you can read in the release notes. But for the purposes of this demo, I wanted to use an unchanged Helm 2 chart with Helm 3 as this is the most probable scenario for companies that are already using Helm 2

I used the example application mentioned in the Codefresh quick start guide. You can find the source code in https://github.com/codefresh-contrib/python-flask-sample-app. It is a very simple Python application with a dockerfile and Helm chart created with Draft.

After checking out the code (feel free to use your own image in values.xml) we can install the Helm package with

helm install my-first-release charts/python

We can verify the installation with both normal kubectl commands

> kubectl get pods

NAME                                  READY STATUS RESTARTS   AGE

my-first-release-python-f5b8d7879-mxwd9   1/1 Running   0 1m




Kostis@NOMAD-PRO C:workspacepython-flask-sample-app

> kubectl get svc

NAME                  TYPE       CLUSTER-IP EXTERNAL-IP   PORT(S) AGE

kubernetes            ClusterIP  10.96.0.1  <none>    443/TCP    20m

my-first-release-python   LoadBalancer 10.97.170.21   localhost 80:31270/TCP   1m

As well as with the Helm command:

> helm ls

NAME                NAMESPACE   REVISION    UPDATED                             STATUS      CHART

my-first-release    default     1           2019-07-04 19:25:58.1223443 +0300 EEST  deployed python-v0.3.0

The application includes a service so it is easy to test in the browser.

Helm 3 has recently achieved general availability status. You can download it today and play with it if you want to see with your own eyes that Tiller is removed from the picture. You can already deploy Helm 3 applications with Codefresh using our Helm step and we will update all dashboards and graphical UI support for Helm 3 in Q1 2020.

Ready to Get Started?
  • safer deployments
  • More frequent deployments
  • resilient deployments