Advanced
Searching inInstall guides
How to search
  • Paste an error message in quotes, e.g. "permission denied", to find the fix table that explains it.
  • Choose an area and a part of the guide (install, first settings, daily use, security, fixes) to go straight to the right step.
  • "two words" finds the exact phrase.
  • Plain words find names, texts and examples.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search
Try:

Guide 12Helm · Kubernetes

Install and set up Helm

Helm is the package manager for Kubernetes. One chart holds all the YAML of an app (Deployment, Service, Ingress, ConfigMaps …) with settings you can change in a values.yaml file. You install monitoring, ingress controllers, cert-manager or your own apps with one command, upgrade them and roll back when something breaks. This guide installs Helm, adds chart repositories, installs and upgrades a real chart, and shows how to write and check your own.

  • 10 Lessons
  • 11 Commands

$ run as a normal user# run as root (or with sudo)

12.1

Know it before you install

A chart is the package. A release is one installed copy of a chart in a namespace. Every install or upgrade makes a new revision, so you can go back with rollback.

ItemValue
Programhelm (one binary, no server part)
Talks tothe cluster in your kubeconfig (like kubectl)
Repositories list~/.config/helm/repositories.yaml
Chart cache~/.cache/helm/
Release dataSecrets in the release namespace (sh.helm.release.v1.NAME.vN)
Chart sourcesHTTP repos (helm repo add) and OCI registries (oci://…)

What you need: a working kubectl with a kubeconfig (see the kubectl guide).

12.2

Install on Linux (RHEL and Ubuntu)

The official binary works on every distribution. Choose the newest version from github.com/helm/helm/releases (here v3.19.0) and check the download:

VER=v3.19.0
curl -fsSLO https://get.helm.sh/helm-$VER-linux-amd64.tar.gz
curl -fsSLO https://get.helm.sh/helm-$VER-linux-amd64.tar.gz.sha256sum
sha256sum -c helm-$VER-linux-amd64.tar.gz.sha256sum
helm-v3.19.0-linux-amd64.tar.gz: OK
tar -xzf helm-$VER-linux-amd64.tar.gz
install -m 0755 linux-amd64/helm /usr/local/bin/helm
helm version

Other ways: Fedora dnf install helm; Ubuntu snap install helm --classic. On ARM use linux-arm64.

Turn on completion:

echo 'source <(helm completion bash)' >> ~/.bashrc

12.3

First configuration: repositories

Add the repositories of the charts you use, then update the index:

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm repo list
helm search repo prometheus-community/kube-prometheus-stack --versions | head -5

Many projects now publish charts in OCI registries — no repo add needed:

helm show chart oci://ghcr.io/traefik/helm/traefik
helm pull oci://ghcr.io/traefik/helm/traefik --version 37.1.0

Remember

Never install a chart without a fixed --version. Without it, the next run can install a new major version with breaking changes.

12.4

Install, change and roll back a release

First look at the settings the chart offers, and write only the ones you change into your own values file:

helm show values jetstack/cert-manager --version v1.19.1 > cert-manager-defaults.yaml
values/cert-manager.yaml
crds:
  enabled: true
replicaCount: 2
resources:
  requests:
    cpu: 50m
    memory: 128Mi

Install (or upgrade, with the same command), wait until it is healthy, and check:

helm upgrade --install cert-manager jetstack/cert-manager --version v1.19.1 -n cert-manager --create-namespace -f values/cert-manager.yaml --wait --timeout 5m
helm list -A
helm status cert-manager -n cert-manager
helm get values cert-manager -n cert-manager
helm history cert-manager -n cert-manager

When an upgrade breaks something, go back to the last good revision:

helm rollback cert-manager 1 -n cert-manager --wait
helm uninstall cert-manager -n cert-manager

At work

helm upgrade --install works the first time and every time after, so pipelines use only this one command. Add --atomic (Helm 3) to roll back by itself when the upgrade fails.

Commands in this lesson

12.5

Check before you change

See the exact YAML before it reaches the cluster:

helm template web ./charts/web -f values/prod.yaml | less
helm upgrade --install web ./charts/web -f values/prod.yaml --dry-run=server
helm diff upgrade web ./charts/web -f values/prod.yaml

(helm diff is a plugin: helm plugin install https://github.com/databus23/helm-diff.)

12.6

Write your own chart

helm create web
tree web
web
├── Chart.yaml
├── values.yaml
├── charts/
└── templates/
    ├── deployment.yaml
    ├── service.yaml
    ├── ingress.yaml
    └── _helpers.tpl
helm lint web
helm package web
helm push web-0.1.0.tgz oci://registry.example.com/charts

In the templates, values come from values.yaml, for example image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}". Change version in Chart.yaml for every chart change and appVersion for every app version.

Real uses at work:

  • Install cluster add-ons: monitoring (kube-prometheus-stack), cert-manager, ingress controllers, external-secrets.
  • Deploy your own apps with one chart and one values file per environment (dev, test, prod).
  • GitOps: Argo CD and Flux install Helm charts from Git.

Commands in this lesson

12.7

Make it safe

Security checklist:

  • Pin chart versions; read the changelog before a major upgrade.
  • Read what a chart creates (helm template) — look for ClusterRoles, privileged Pods and hostPath.
  • Use charts from the official project or a trusted registry; verify signed charts (helm verify, --verify).
  • No passwords in values files in Git: use external-secrets, Sealed Secrets or SOPS.
  • Release data is stored in Secrets: limit who can read Secrets in the namespace.
  • Give the CI user RBAC rights only in the namespaces it deploys to.

Commands in this lesson

12.8

Update and remove

Download the new version and install it the same way. Remove it with:

rm /usr/local/bin/helm
rm -rf ~/.config/helm ~/.cache/helm

Removing the helm program does not remove the releases from the cluster; use helm uninstall for that.

12.9

Fix common problems

ProblemCauseFix
Kubernetes cluster unreachableNo or wrong kubeconfig.kubectl get nodes first; export KUBECONFIG=….
cannot re-use a name that is still in useA release with this name exists.Use helm upgrade --install, or another name.
another operation (install/upgrade/rollback) is in progressA run crashed and left the release pending-*.helm history NAME; helm rollback NAME LAST_GOOD.
UPGRADE FAILED: … field is immutableThe chart changed a field that can not change (for example a selector).Read the upgrade notes; sometimes uninstall and install again.
My values are not usedWrong key or wrong indentation.helm get values NAME; compare with helm show values.
Error: INSTALLATION FAILED: … timed out waiting for the conditionPods do not become ready.kubectl get pods -n NS, kubectl describe pod, kubectl logs.
no matches for kind "…" in version …The CRDs are missing.Install the CRDs first (often crds.enabled=true).

12.10

Next steps

1Why always use --version with helm install?

Without it you get the newest chart, which can be a new major version with breaking changes.

2An upgrade broke the app. Which command brings the old version back?

All commands in this chapter