Helm workshop: Ecosystem

Helm’s configuration is stored in the environment variable $HELM_CONFIG_HOME , by default $HOME/.config/helm

All the environment variables are described in the documentation there.

Here are a few tools (with a wide adoption) that will add capabilities to Helm.

Plugins

There are several plugins in order to extend Helm’s features.

Some of them are really useful (kubeval, diff, secrets).

Helmfile

Helmfile is a really useful tool that allows you to declare the state of the releases on your cluster.

It helps keeping a central view of the releases deployed on a given cluster.

It automatically configures repositories, pulls dependencies and it is very helpful to build CI/CD workflows.

Of course it uses Helm under the hood and a few modules/plugins such as secrets decryption, helm diff

These steps are very basic, you should have a look at the documentation for further details.

Install the helmdiff plugin (used by helmfile)

1helm plugin install https://github.com/databus23/helm-diff

We’ll make use of some examples provided by CloudPosse

1git clone git@github.com:cloudposse/helmfiles.git
2cd helmfiles

Let’s say we want to install the kubernetes dashboard and the reloader tool.

1cat > releases/kubernetes-dashboard/dev.yaml <<EOF
2installed: True
3banner: "Workshop cluster"
4EOF

Now we’ll create our main helmfile.yaml that describes all the releases we want to install

1cat > helmfile.yaml <<EOF
2helmfiles:
3  - path: "releases/kubernetes-dashboard/helmfile.yaml"
4    values:
5      - releases/kubernetes-dashboard/dev.yaml
6  - path: "releases/reloader/helmfile.yaml"
7    values:
8      - installed: True
9EOF

Now we can see what changes will be applied.

 1helmfile diff
 2Adding repo stable https://charts.helm.sh/stable
 3"stable" has been added to your repositories
 4
 5Comparing release=kubernetes-dashboard, chart=stable/kubernetes-dashboard
 6********************
 7
 8        Release was not present in Helm.  Diff will show entire contents as new.
 9
10

The command helm sync will install the releases

 1helmfile sync
 2Adding repo stable https://charts.helm.sh/stable
 3"stable" has been added to your repositories
 4
 5Affected releases are:
 6  kubernetes-dashboard (stable/kubernetes-dashboard) UPDATED
 7
 8Upgrading release=kubernetes-dashboard, chart=stable/kubernetes-dashboard
 9Release "kubernetes-dashboard" does not exist. Installing it now.
10NAME: kubernetes-dashboard
11...

You can list all the releases managed by the local helmfile.

1helmfile list
2NAME                    NAMESPACE       ENABLED LABELS
3kubernetes-dashboard    kube-system     true    chart:kubernetes-dashboard,component:monitoring,namespace:kube-system,repo:stable,vendor:kubernetes
4reloader                reloader        true    chart:stakater/reloader,component:reloader,namespace:reloader,repo:stakater,vendor:stakater

Delete all the releases

1helmfile delete
2Listing releases matching ^reloader$
3reloader        reloader        1               2021-02-16 10:10:35.378800455 +0100 CET deployed        reloader-v0.0.68        v0.0.68
4
5Deleting reloader
6release "reloader" uninstalled

➡️ Next: Build a Helm chart

Posts in this series