Finally after a loong wait, the first public Helm v3 alpha release has been announced. Hurrah!
Major changes introduced in Helm v3
So let's take a look at few new enhancements:
- Obviously, Tiller has been removed so Tiller haters can sigh with relief. :)
- Release information is now stored in the Namespace.
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.
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.
Taking Helm v3 for a spin
Enough of talking, let's take Helm v3 for a spin.
Setting up Helm v3
As we do not want to destroy our Helm v2 local setup (as both versions store data in the same place by default), we need to perform additional steps to ensure both versions can run simultaneously.
Please don't test it on production cluster.
Download Helm v3 alpha release from here, and rename binary to
helm3and store it to your
Create a shell script named
h3and store it to your
#!/bin/bash export HELM_HOME=$HOME/.helm3 helm3 $*
What it will do, it will set
helm home folder to
.helm3, so such setup allows us to use both Helm versions from the same machine/container/user.
- Set it up locally:
$ h3 init $ h3 repo update
Ok, so now we ready to use
Note: Helm v3 stores release information in the current set namespace. To install releases you do not specify
--namespace flag as it was temporally removed, but the functionality will be added later one, for now you have to change namespace context:
$ kubectl create ns nginx-ingress $ kubens nginx-ingress $ h3 upgrade --install nginx-ingress stable/nginx-ingress Release "nginx-ingress" does not exist. Installing it now. $ h3 ls NAME NAMESPACE REVISION UPDATED STATUS CHART nginx-ingress nginx-ingress 1 2019-05-16 12:58:10.258455 +0100 BST deployed nginx-ingress-1.6.3
Ok, let's repeat the same steps to install a few more charts:
$ kubectl create ns myapp1 $ kubens myapp1 $ h3 upgrade --install postgresql stable/postgresql Release "postgresql" does not exist. Installing it now. $ h3 ls NAME NAMESPACE REVISION UPDATED STATUS CHART postgresql myapp1 1 2019-05-16 13:09:03.909755 +0100 BST deployed postgresql-4.2.1 $ h3 upgrade --install memcached stable/memcached Release "memcached" does not exist. Installing it now. $ h3 ls NAME NAMESPACE REVISION UPDATED STATUS CHART postgresql myapp1 1 2019-05-16 13:09:03.909755 +0100 BST deployed postgresql-4.2.1 memcached myapp1 1 2019-05-16 13:09:41.035198 +0100 BST deployed memcached-2.7.2
As you can see
helm list only shows releases in the same 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 :)
kubens used in the example above is part of kubectx tool, check it out, it is very cool one.
I recommend reading about the other changes:
- Chart dependency management requirements
- No auto-generated name by default
- Pushing Charts to OCI Registries
- CLI Command Renames
Please read the Release Notes for more detailed information.
Friendly warning: Do not use Helm v3 alpha in production!!!
If you want to have a similar fucntionality as Helm v3 provides, in production you can use Tillerless Helm v2, please read my blog post about it.