Skip to content
$ lynuxpro
← Helm

LESSON 2 OF 15 · BEGINNER · 22 MIN

Installing charts and repositories

Free previewLesson 2 of the 2 free lessons in this Pro course.Unlock all 15

HOW IT WORKSWhere values come from, and which wins

1values.yamlchart defaults-f my-values.yamlfirst file-f prod.yamlsecond file--set ui.message=...command lineMerged valueslast one winsTemplatesrendered with themManifestPODINFO_UI_MESSAGE
1/5

Start from the chart's defaults. helm show values lists every setting.

$ helm show values podinfo/podinfo

Most of the Helm you do in your first months is installing other people's charts: an ingress controller, cert-manager, Grafana, a database for a test environment. This lesson covers how to find charts, how repositories work, how to read a chart's settings before installing, and the rules that decide which value wins when you pass settings from several places. That last part trips up even experienced engineers, so take your time with it.

In simple words

  • Chart repository: a web server that hosts charts, like an app store for Helm.
  • OCI registry: a container registry (ECR, GHCR, Harbor) that can also store charts.
  • values.yaml override: your own file of settings passed with -f, which replaces the chart's defaults.
  • --set: a way to change one value on the command line, such as --set replicaCount=3.
  • Value precedence: the rule for which setting wins: --set beats -f files, which beat the chart's defaults.

Two kinds of chart sources

Charts are published in two ways:

SourceHow you use itExamples
HTTP repositoryhelm repo add NAME URL, then refer to charts as NAME/CHARTGrafana, Jetstack (cert-manager), Argo, most open-source projects
OCI registryNo repo add; refer to charts directly as oci://HOST/PATH/CHARTGitHub Container Registry, Docker Hub, Amazon ECR, Harbor, Artifactory

An HTTP repository is just a web server with an index.yaml file listing every chart and version, plus the chart archives (.tgz files). An OCI registry stores charts the same way it stores container images. OCI is where the ecosystem is heading, and lesson 10 covers it in depth. This lesson focuses on HTTP repositories because you will meet them everywhere.

Adding and managing repositories

helm repo add podinfo https://stefanprodan.github.io/podinfohelm repo add grafana https://grafana.github.io/helm-chartshelm repo update
SHELLbashutf-8 · 3L
"podinfo" has been added to your repositories"grafana" has been added to your repositoriesHang tight while we grab the latest from your chart repositories......Successfully got an update from the "podinfo" chart repository...Successfully got an update from the "grafana" chart repositoryUpdate Complete. ⎈Happy Helming!⎈
OUTPUTterminalutf-8 · 6L

The name you choose (podinfo, grafana) is a local alias; it only exists on your machine. Helm saves the list in a config file and caches each repository's index locally:

cat ~/.config/helm/repositories.yaml | head -8
SHELLbashutf-8 · 1L
apiVersion: ""generated: "0001-01-01T00:00:00Z"repositories:- name: podinfo  url: https://stefanprodan.github.io/podinfo  caFile: ""  certFile: ""  keyFile: ""
OUTPUTterminalutf-8 · 8L

The cached index is a snapshot. When a project publishes a new chart version, you will not see it until you run helm repo update. "chart not found" errors are very often just a stale cache, which is why Helm's own error message says (try 'helm repo update').

Other repository commands:

helm repo listhelm repo remove grafana
SHELLbashutf-8 · 2L

In CI pipelines, every job starts with an empty Helm config, so the pipeline must run helm repo add and helm repo update before installing. Forgetting that is a classic "works on my laptop" failure.

Finding charts

There are two searches, and they look in different places:

helm search hub grafanahelm search repo podinfo --versions
SHELLbashutf-8 · 2L
URL                                                                            	CHART VERSION	APP VERSION	DESCRIPTIONhttps://artifacthub.io/packages/helm/grafana/grafana                           	8.6.4        	11.3.1     	The leading tool for querying and visualizing time series and metrics.https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack	66.2.1       	v0.78.1    	kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rulesNAME           	CHART VERSION	APP VERSION	DESCRIPTIONpodinfo/podinfo	6.7.1        	6.7.1      	Podinfo Helm chart for Kubernetespodinfo/podinfo	6.6.3        	6.6.3      	Podinfo Helm chart for Kubernetespodinfo/podinfo	6.5.4        	6.5.4      	Podinfo Helm chart for Kubernetes
OUTPUTterminalutf-8 · 7L
  • helm search hub searches Artifact Hub, the public catalogue of charts from many publishers. Use it to discover what exists, then open the page to find the repository URL.
  • helm search repo searches only the repositories you have added. Without --versions it shows only the latest version of each chart.

--version accepts semantic version constraints, which is handy for "the newest 6.6 patch":

helm search repo podinfo --version "~6.6"
SHELLbashutf-8 · 1L
NAME           	CHART VERSION	APP VERSION	DESCRIPTIONpodinfo/podinfo	6.6.3        	6.6.3      	Podinfo Helm chart for Kubernetes
OUTPUTterminalutf-8 · 2L

Before trusting a chart from Artifact Hub, check who publishes it (a verified publisher badge, the project's own organisation), when it was last updated and whether it is signed. A chart runs whatever images and permissions its templates say, so treat it like any other code you run in production.

Read before you install

Every chart has a values.yaml file with its defaults. Those defaults are the chart's settings menu: anything you can change is in there. Read it first:

helm show values podinfo/podinfo
SHELLbashutf-8 · 1L
# Default values for podinfo.replicaCount: 1logLevel: infoui:  color: "#34577c"  message: ""image:  repository: ghcr.io/stefanprodan/podinfo  tag: ""  pullPolicy: IfNotPresentservice:  type: ClusterIP  port: 9898resources:  requests:    cpu: 1m    memory: 16Mi
OUTPUTterminalutf-8 · 21L

Real charts are much longer; the Grafana and kube-prometheus-stack defaults run to thousands of lines. Redirect them to a file and search it: helm show values grafana/grafana > grafana-defaults.yaml. Other useful views:

helm show chart podinfo/podinfohelm show readme podinfo/podinfo
SHELLbashutf-8 · 2L

show chart prints the chart's metadata (Chart.yaml), and show readme usually has a table of the important parameters.

Overriding values

You change settings in two ways:

  1. A values file with -f (or --values): a YAML file containing only the keys you want to change. This is what you commit to Git.
  2. --set on the command line: quick one-off changes and CI variables such as an image tag.

Create a values file:

printf 'replicaCount: 2\nui:\n  message: "Hello from values.yaml"\n  color: "#0f766e"\n' > my-values.yamlcat my-values.yaml
SHELLbashutf-8 · 2L
replicaCount: 2ui:  message: "Hello from values.yaml"  color: "#0f766e"
NORMALyamlutf-8 · 4L

You never copy the whole values.yaml; you write only your changes, and Helm merges them over the defaults. Maps are merged key by key, so setting ui.message does not erase ui.color. Lists are not merged: if you set a list, your list replaces the default list completely.

Which value wins

When the same key is set in several places, Helm applies them in this order, and the last one wins:

  1. The chart's own values.yaml (lowest priority)
  2. Each -f file, in the order given on the command line
  3. --set, --set-string, --set-json and --set-file (highest priority)

helm template renders a chart locally without installing anything, which makes it perfect for testing this. Add a second file that also sets the message:

printf 'ui:\n  message: "Hello from prod.yaml"\n' > prod.yamlhelm repo add podinfo https://stefanprodan.github.io/podinfohelm template web podinfo/podinfo -f my-values.yaml -f prod.yaml -s templates/deployment.yaml | grep -A1 PODINFO_UI
SHELLbashutf-8 · 3L
            - name: PODINFO_UI_COLOR              value: "#0f766e"            - name: PODINFO_UI_MESSAGE              value: "Hello from prod.yaml"
OUTPUTterminalutf-8 · 4L

The color came from my-values.yaml (nothing later changed it) and the message from prod.yaml (the later file). Now add --set:

helm template web podinfo/podinfo -f my-values.yaml -f prod.yaml --set ui.message=override -s templates/deployment.yaml | grep -A1 MESSAGE
SHELLbashutf-8 · 1L
            - name: PODINFO_UI_MESSAGE              value: "override"
OUTPUTterminalutf-8 · 2L

This ordering is how teams layer configuration: -f values-common.yaml -f values-prod.yaml --set image.tag=$CI_COMMIT_SHA.

The --set syntax

--set takes key=value pairs. Dots go into nested maps, commas separate several pairs, and square brackets index lists:

helm template t podinfo/podinfo --set env.GREETING=hi --set-string env.BUILD=0042 -s templates/deployment.yaml | grep -A7 "env:"
SHELLbashutf-8 · 1L
          env:            - name: PODINFO_UI_COLOR              value: "#34577c"            - name: BUILD              value: "0042"            - name: GREETING              value: "hi"          resources:
OUTPUTterminalutf-8 · 8L

The gotchas, all of which cause real outages:

You writeHelm readsFix
--set build=0042the number 42--set-string build=0042
--set enabled=truethe boolean true (usually what you want)--set-string if the chart wants the text "true"
--set tag=1.10the number 1.1--set-string tag=1.10 or quote in a values file
--set msg=a,bmsg=a plus a broken key bescape the comma: --set 'msg=a\,b'
--set nodeSelector.kubernetes\.io/os=linuxa key containing a dotescape dots inside key names with a backslash

Lists and JSON:

helm template t podinfo/podinfo --set 'ui.message=a\,b' -s templates/deployment.yaml | grep -A1 MESSAGE
SHELLbashutf-8 · 1L
            - name: PODINFO_UI_MESSAGE              value: "a,b"
OUTPUTterminalutf-8 · 2L

For anything more complex than a scalar, prefer a values file. --set-json takes JSON (--set-json 'tolerations=[...]') and --set-file key=path reads a value from a file, useful for certificates or scripts.

To remove a default entirely, set it to null (for example --set resources=null). Helm deletes the key before rendering.

Install with your values

Put it together. Pin the chart version, choose a namespace, and pass your file and a --set:

helm install web podinfo/podinfo --version 6.6.3 -n demo --create-namespace -f my-values.yaml --set ui.message="Hello from --set"helm get values web -n demo
SHELLbashutf-8 · 2L
NAME: webLAST DEPLOYED: Sun Nov 29 14:31:07 2026NAMESPACE: demoSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:1. Get the application URL by running these commands:  echo "Visit http://127.0.0.1:8080 to use your application"  kubectl -n demo port-forward deploy/web-podinfo 8080:9898USER-SUPPLIED VALUES:replicaCount: 2ui:  color: "#0f766e"  message: Hello from --set
OUTPUTterminalutf-8 · 15L

Three habits from this command are worth keeping:

  • Always pin --version. Without it, Helm installs whatever is newest today, and tomorrow's install of the "same" command may be a different chart.
  • Always pass -n. Releases belong to a namespace; helm list only shows the current namespace unless you add -A.
  • --create-namespace creates the namespace if needed. Without it, installing into a missing namespace fails.

helm get values shows only what you supplied. Add --all to see the full merged result, which is what the templates actually received.

Release names and common errors

Release names must be lowercase letters, digits, dashes and dots, at most 53 characters, and unique within a namespace. If you do not care about the name, --generate-name picks one:

helm install podinfo/podinfo --generate-name -n demohelm list -n demo
SHELLbashutf-8 · 2L

Errors you will see in your first week:

helm install web podinfo/podinfo -n demo   # fails: name in usehelm install x podinfo/podinfo --version 9.9.9   # fails: no such version
SHELLbashutf-8 · 2L
Error: INSTALLATION FAILED: cannot re-use a name that is still in useError: INSTALLATION FAILED: chart "podinfo" matching 9.9.9 not found in podinfo index. (try 'helm repo update'): no chart version found for podinfo-9.9.9
OUTPUTterminalutf-8 · 2L

The first means a release called web already exists in that namespace; use helm upgrade (next lesson) or pick another name. The second means the version is not in your cached index: check helm search repo --versions and run helm repo update.

Download a chart to inspect it

Sometimes you want to read the templates before installing, or vendor a chart into your Git repository. helm pull downloads the archive; --untar unpacks it:

helm pull podinfo/podinfo --version 6.7.1helm pull podinfo/podinfo --untarls podinfo
SHELLbashutf-8 · 3L
Chart.yaml  README.md  templates  values.yaml
OUTPUTterminalutf-8 · 1L

You can install from that local directory with helm install web ./podinfo. Reading templates/ is the best way to find out what a value really does when the README is vague.

Summary

  • Charts come from HTTP repositories (helm repo add, then repo/chart) or OCI registries (oci://...).
  • Run helm repo update before searching or installing; the local index is a cached snapshot.
  • helm search hub finds charts on Artifact Hub; helm search repo searches your repositories.
  • helm show values lists every setting. Override with -f files (later files win) and --set (wins over files).
  • Use --set-string for values that must stay text, and escape commas and dots.
  • Pin --version, pass -n, and check what you supplied with helm get values.

CHECK YOUR UNDERSTANDING

3 quick questions

  1. 1. Which value wins: chart defaults, -f prod.yaml, or --set replicaCount=5?

  2. 2. You pass --set build=0042. What does the template receive?

  3. 3. helm install says chart not found right after the project released it. First thing to try?

You've finished the free preview of Helm

Upgrade to Pro to unlock the remaining 13 lessons, every practice lab and a certificate when you finish.

See plans