helm is a kind of apt-get for kubernetes. As tiller poses a potential security threat, we will focus here on helm v3, the current stable release.

With helm v2, you had to install tiller component in the kube-system namespace of your cluster, then have to add a RBAC account, as explained here.

Ressources:

Installation

Just download from Github Helm Releases and put the helm binary in one of your PATH’s folder.

Usage

Repositories

To be able to use helm, you have to add repositories:

helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm repo list

Search for charts

Search for nginx chart:

$ helm search repo nginx
NAME                                    CHART VERSION   APP VERSION     DESCRIPTION                         
bitnami/nginx                           13.2.1          1.23.1          NGINX Open Source is a web server that can be a...
bitnami/nginx-ingress-controller        9.3.3           1.3.0           NGINX Ingress Controller is an Ingress controll...
bitnami/nginx-intel                     2.1.1           0.4.7           NGINX Open Source for Intel is a lightweight se...
stable/nginx-ingress                    1.41.3          v0.34.1         DEPRECATED! An nginx Ingress controller that us...
stable/nginx-ldapauth-proxy             0.1.6           1.13.5          DEPRECATED - nginx proxy with ldapauth
stable/nginx-lego                       0.3.1                           Chart for nginx-ingress-controller and kube-lego
bitnami/kong                            5.0.2           2.7.0           Kong is a scalable, open source API layer (aka ...
stable/gcloud-endpoints                 0.1.2           1               DEPRECATED Develop, deploy, protect and monitor...

Add --versions for all available versions:

$ helm search repo nginx --versions

Installing charts

Usage: helm install [NAME] [CHART] [flags]

Example: https://engineering.bitnami.com/articles/deploy-a-production-ready-mariadb-cluster-on-kubernetes-with-bitnami-and-helm.html

helm install mariadb stable/mariadb -f values-production.yaml --set rootUser.password=root --set replication.password=root

Get helm charts sources

helm fetch --untar bitnami/mariadb-galera

Generate k8s manifests from helm charts

helm template release-name mariadb-galera

To dynamically apply generated manifests with kubectl:

helm template release-name mariadb-galera | kubectl apply -f -

Get chart available values

helm show values bitnami/mariadb-galera

Get chart available versions

helm search repo bitnami/mariadb-galera --versions

Deploy charts from self-hosted repositories

Here is an example with custom hostpath-provisioner helm chart.

Clone repository:

git clone ssh://git@git-server/helm-chart-repo.git

Enter the cloned repository:

cd helm-charts-repo

Then install hostpath-provisioner (or anything else):

helm install hostpath-release-name hostpath-provisioner -f your-values.yaml