Installing charts from repos and OCI

Helm · Essentials · 8 min

This is how you install most third-party software on a cluster.

For a classic repository, add it once and refresh its index:

  • helm repo add prometheus-community https://prometheus-community.github.io/helm-charts then helm repo update.
  • helm search repo prometheus searches added repos; --versions lists all versions.
  • helm show values prometheus-community/prometheus prints the chart's default values: read them before installing.

Charts in OCI registries need no repo add; you reference them directly: helm install cache oci://registry.example.com/charts/redis --version 1.2.0.

Installing:

  • helm install <release> <chart> -n <ns> --create-namespace.
  • Always pin --version: otherwise you get the latest chart, which can change under you.
  • helm upgrade --install installs if the release doesn't exist and upgrades if it does, the idempotent form used in scripts and CI.
  • --wait waits until the resources are ready, and --timeout 10m bounds it.

Inspecting and removing:

  • helm list -n ns, helm status <release> (shows the chart's NOTES), helm get manifest <release> (what was applied), helm get values <release> (what you supplied).
  • helm uninstall <release> -n ns deletes the resources and history. PVCs created by StatefulSets are usually left behind on purpose.

Check whether a chart's publisher still maintains it; public chart catalogues do change.

Example

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

helm show values prometheus-community/kube-prometheus-stack > defaults.yaml

helm upgrade --install monitoring prometheus-community/kube-prometheus-stack \
  --version 77.0.0 -n obs --create-namespace --wait --timeout 10m

helm status monitoring -n obs
helm get manifest monitoring -n obs | grep -c '^kind:'
helm uninstall monitoring -n obs

Remember

  • helm repo add + update for HTTP repos; oci:// references need no add
  • Pin --version; use upgrade --install in automation
  • helm get manifest/values shows what a release really contains

Watch out for

  • Installing without --version and getting a new major chart version on the next run.

Check yourself

  1. Which command is safe to run repeatedly in CI whether or not the release already exists?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: helm.sh/docs/intro/using_helm/