Helm v3 Features

This is follow up and based on Helm v3 First Alpha Release is Out blog post.

Major changes introduced in Helm v3

So let's take a look at few new enhancements and changes:

  • Obviously, Tiller has been removed so Tiller haters can sigh with relief. :)
  • Release information is now stored in the Namespace.
  • helm init command has been removed.
  • The Helm home directory has been located off user's home directory.
  • The stable repository is no longer added by default.
  • The helm search command has been refactored to have sub-commands that can search the local repositories and the Helm Hub.

Tiller is now part of history

In Helm v3, Tiller has been completely removed. With Tiller gone, the security model for Helm is way more simplified. Helm v3 now respects user permissions set in your kubeconfig file and etc.

Release information

In Helm v3, release information about a particular release is now stored in the same namespace as the release itself. This means that users can now run helm install wordpress stable/wordpress in two separate namespaces, and each can be referred with helm list by changing the current namespace context.

Note: The namespace has to be pre created as Helm v3 will not create it for you.

Taking Helm v3 for a spin

Enough of talking, let's take Helm v3 for a spin.

Setting up Helm v3

As we want to use both Helm v3 and Helm v2 in our setup, we need to perform a few additional steps to ensure both versions can run simultaneously:

  1. Download latest Helm v3 release from here, and rename binary to helm3 and store it to your path.

  2. As stable repository was removed in Helm v3 we need to add it:

$ helm3 repo add stable https://kubernetes-charts.storage.googleapis.com
$ helm3 repo update

As you see we did not use helm init :)

Ok, so now we ready to use helm3.

Installing charts

Helm v3 stores release information in the namespace you do specify with --namespace flag or if no namespace is specified current set namespace context will be used:

$ kubectl create ns nginx-ingress
$ helm3 upgrade --install nginx-ingress -n nginx-ingress stable/nginx-ingress
Release "nginx-ingress" does not exist. Installing it now.

$ kubens nginx-ingress
$ helm3 ls
NAME         	NAMESPACE    	REVISION	UPDATED                             	STATUS  	CHART
nginx-ingress	nginx-ingress	1       	2019-08-27 12:58:10.258455 +0100 BST	deployed	nginx-ingress-1.17.1

Ok, let's repeat the same steps to install a few more charts:

$ kubectl create ns myapp1
$ helm3 upgrade --install postgresql -n myapp1 stable/postgresql
Release "postgresql" does not exist. Installing it now.

$ helm3 upgrade --install memcached -n myapp1 stable/memcached
Release "memcached" does not exist. Installing it now.

$ kubens myapp1
$ helm3 ls
NAME      	NAMESPACE	REVISION	UPDATED                             	STATUS  	CHART
postgresql	myapp1   	1       	2019-08-27 13:09:03.909755 +0100 BST	deployed	postgresql-6.3.2
memcached 	myapp1   	1       	2019-08-27 13:09:41.035198 +0100 BST	deployed	memcached-2.9.0

As you can see helm3 list only shows releases in the currently set namespace, which means deleting the namespace will delete all the releases there and all releases info as well. This is a much cleaner setup and more coherent. And now you can have multiple releases with the same release name for the same app using a different namespace per each release.

Very nice :)

Note: kubens used in the example above is part of kubectx tool, check it out, it is very cool one.

New Helm search functionality

The helm search command has been refactored to have sub-commands that can search the local repositories and the Helm Hub, let's check it out how it works.

$ helm3 search

Search provides the ability to search for Helm charts in the various places
they can be stored including the Helm Hub and repositories you have added. Use
search subcommands to search different locations for charts.

Usage:
  helm search [command]

Available Commands:
  hub         search for charts in the Helm Hub or an instance of Monocular
  repo        search repositories for a keyword in charts

First let's search in local repositories:

$ helm3 search repo

As we have only added stable repository, it will show the list of charts available there, any of them can be installed with helm3 install.

Ok, now I want to use cert-manager to secure my ingresses with Let's Encrypt certs, and I know it has it's own helm repository:

$ helm3 search hub cert-manager
URL                                              	CHART VERSION  	APP VERSION    	DESCRIPTION
https://hub.helm.sh/charts/emberstack/reflector  	2.19197.5      	               	A Helm chart to deploy Reflector
https://hub.helm.sh/charts/choerodon/cert-manager	0.1.0          	0.1.0          	A Helm chart for cert-manager
https://hub.helm.sh/charts/jetstack/cert-manager 	v0.10.0-alpha.0	v0.10.0-alpha.0	A Helm chart for cert-manager

Nice, I got a list of all helm repositories which have cert-manager chart, as I know the cert-manager is done by Jetstack, and I want to install that chart.

Note: Here is a little catch, helm3 search hub only shows repositories which are part of the Helm Hub, but to install the chart from there you have to first add it to your local helm repositories list:

$ helm3 repo add jetstack https://charts.jetstack.io
$ helm3 repo update

Only now you can install the charts from the jetstack helm repository.

Additional Reading

Please read the v3.0.0 Release Notes for more detailed information.

Bonus

If you are JFrog Artifactory user, check it out my blog post Charting Helm Hub Through Artifactory on how you can leverage Helm-hub-sync utility which helps you create and maintain a virtual Helm chart repository in JFrog Artifactory: self-hosted Helm Hub which can be used by the Helm client.