Skip to content

Basics of helm package manager

Helm is a package manager for kubernetes. Current version of helm is 3. Helm 3 has eliminated server side component Tiller. Following are basic commands to get started with helm.

1. Installation

Helm can be installed on mac using homebrew

brew install helm

2. Basic Commands

2.1 Finding artifacts

Helm artifacts can searched on artifacthub and repo installed via helm repo add command. helm search repo searches local repo and repos installed via add command and doesn't need access to internet. However helm search hub needs access to internet to find packages available via arifacthub.

helm search hub wordpress
helm repo add brigade https://brigadecore.github.io/charts
helm search repo brigade
helm search repo kash

2.2 Installing package via helm

Install wordpress helm chart with name wpblog

helm install wpblog bitnami/wordpress

Install wordpress helm chart generating a name

helm install --generate-name bitnami/wordpress

2.2.1 Customizing Installation using helm

Getting values from charts before installation for customization

helm show values hashicorp/vault > /tmp/vaultvalues.yaml

Make necessary changes in the file /tmp/vaultvalues.yaml and install the helm chart using the file. --set and --values or -f are ways to pass values to helm chart. --set is used specify overrides on the commandline whereas --values or -f is used to specify values.yaml file used to override settings for helm chart.

helm install -f /tmp/vaultvalues.yaml hashicorp/vault --generate-name
helm install --values /tmp/vaultvalues.yaml hashicorp/vault --generate-name -n vault-storage --create-namespace

It will use /tmp/vaultvalues.yaml as the final source of truth. To perform upgrades it will be easy to edit the same file and upgrade helm chart to have a consistent view of helm chart.

2.2.2 Upgrading helm release

After changes have been made to /tmp/vaultvalues.yaml we can upgrade the helm release using

helm ugrade --install hashicorp/vault --generate-name --values /tmp/vaultvalues.yaml -n vault

2.2.3 Rollback helm release

Due to some issues a release might need to be rolledback. To rollback a helm release we would need the following command

helm rollback vault 1

where 1 is install revision needed to rollback from the deployed release.

2.2.4 Uninstall a helm release

helm release can be uninstalled using

helm unistall vault

2.2 Helm release status

To find the status of a helm release use the following command

helm list --all

Find the status of the helm release

helm status vault

2.3 Helm repo

2.3.1 Adding a helm repo

helm repo can be added using

helm repo add dev https://example.com/dev-charts

2.3.2 Listing helm repos

all installed helm repos can be listed via

helm repo list