Skip to content

Head first Helm

Get started

alias helm="helm --kubeconfig=$HOME/tmp/kubeconfig.yaml"

Add repo

helm repo add bitnami https://charts.bitnami.com/bitnami
helm search repo bitnami

Warm up commands

helm repo update
helm repo list

helm install bitnami/mysql --dry-run
helm install bitnami/mysql --generate-name

helm show chart bitnami/mysql

helm list
helm list --all

helm uninstall mysql-1612624192

helm status mysql-1612624192

helm search hub
helm search repo

helm install happy-panda bitnami/wordpress
helm status happy-panda
helm show values bitnami/wordpress

helm get hooks
helm get manifest
helm get notes
helm get values
helm get all

helm env

Upgrade & rollback

helm get values happy-panda
echo 'mariadb.auth.username: user1' > panda.yaml
helm upgrade -f panda.yaml happy-panda bitnami/wordpress
helm get values happy-panda
helm rollback happy-panda 1
helm history happy-panda -n default

Package sources

The helm install command can install from several sources:

  • A chart repository (as we’ve seen above)
  • A local chart archive (helm install foo foo-0.1.1.tgz)
  • An unpacked chart directory (helm install foo path/to/foo)
  • A full URL (helm install foo https://example.com/charts/foo-1.2.3.tgz)
helm lint web-ping

helm repo add stable https://charts.helm.sh/stable
helm install --set service.type=LoadBalancer --set service.externalPort=8008 --set env.open.DISABLE_API=false repo stable/chartmuseum --version 2.13.0 --wait
helm repo add local $(kubectl get svc repo-chartmuseum -o jsonpath='http://{.status.loadBalancer.ingress[0].*}:8008')

# pack
helm package web-ping

# upload zip
curl --data-binary "@web-ping-0.1.0.tgz" $(kubectl get svc repo-chartmuseum -o jsonpath='http://{.status.loadBalancer.ingress[0].*}:8008/api/chart s')

# check index
curl $(kubectl get svc repo-chartmuseum -o jsonpath='http://{.status.loadBalancer.ingress[0].*}:8008/index.yaml')

helm repo update
helm search repo web-ping

Reference

  • https://helm.sh
  • Learning Helm (Matt Butcher, Matt Farina, and Josh Dolitsky
  • https://artifacthub.io
  • Learn Kubernetes in a Month of Lunches (ELTON STONEMAN)

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback: dig +short txt issue.imzye.com
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Buy Me a Coffee