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 thekube-system
namespace of your cluster, then have to add a RBAC account, as explained here.
Ressources:
- https://helm.sh
- https://v3.helm.sh
- https://helm.sh/docs/using_helm/
- https://v3.helm.sh/docs/intro/quickstart/
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://kubernetes-charts.storage.googleapis.com
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm repo list
Installing charts
Usage: helm install [NAME] [CHART] [flags]
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