Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 38 ยท Getting Started

Installing Helm and Setting Up Your Environment

Install the Helm CLI on Linux, macOS and Windows, connect it to a cluster with kubeconfig, enable shell completion and understand version compatibility.

Helm is one static binary. Installing it takes a minute; the part that needs care is giving it a cluster to talk to and knowing which Helm versions match which Kubernetes versions. This lesson covers both, plus the environment variables and directories you will meet later.

What you need first

Helm is only the client, so you need a Kubernetes cluster and credentials for it. For learning, a local cluster is perfect: kind, minikube, k3d or Docker Desktop's built-in Kubernetes (see Local Clusters). You also need kubectl (kubectl Basics) because it is the easiest way to check what Helm created.

Verify the cluster first:

Terminal
kubectl cluster-info
kubectl get nodes

If those work, Helm will work, because both read the same kubeconfig.

Installing the CLI

Pick the method your platform prefers.

macOS and Linux with Homebrew

Terminal
brew install helm

Windows

POWERSHELL
winget install Helm.Helm
# or
choco install kubernetes-helm
# or
scoop install helm

Debian and Ubuntu (apt repository) and Fedora (dnf) both have official packages; follow the instructions on helm.sh for the current repository key, because the key location changes occasionally.

Any Linux or macOS, official script (it downloads the latest release and verifies its checksum):

Terminal
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Piping an unread script into a shell is a habit worth avoiding, which is why the example downloads the file first so you can read it.

Manual install: download the .tar.gz for your platform from the GitHub releases page, extract it and move the helm binary somewhere on your PATH, such as /usr/local/bin. Each release also publishes a checksum file you can compare against.

Check the result:

Terminal
helm version

Typical output:

TEXT
version.BuildInfo{Version:"v3.17.0", GitCommit:"...", GitTreeState:"clean", GoVersion:"go1.23.4"}

Version compatibility

Helm follows a skew policy against Kubernetes: a Helm release supports the Kubernetes version it was built against and the three minor versions before it. That is a quirk worth remembering: Helm 3.17 supports Kubernetes 1.32 down to 1.29. Running a much older Helm against a brand-new cluster can break on removed API versions.

Python Stand-in: check Helm / Kubernetes skew

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Always upgrade Helm along with your cluster, ideally to the newest patch of the current minor.

Pointing Helm at a cluster

Helm reads ~/.kube/config (or the file named by the KUBECONFIG variable), exactly like kubectl, and uses the current context. Useful flags available on every command:

Flag Meaning
--namespace / -n Namespace for the release (default: the context's namespace)
--kube-context Use a different context for this command
--kubeconfig Use a different kubeconfig file
--debug Print more detail, including the rendered manifests on errors
Terminal
kubectl config get-contexts
helm list --kube-context kind-dev -n default

Helm will happily install into whichever cluster the current context points to. Before running install, upgrade or uninstall, check kubectl config current-context; many people have changed production by accident. A shell prompt that shows the context helps.

Where Helm keeps its files

Helm follows the XDG conventions (and the Windows equivalents). helm env prints all of it:

Terminal
helm env
Variable Purpose
HELM_CACHE_HOME Downloaded charts and repository indexes
HELM_CONFIG_HOME Repository list, registry credentials
HELM_DATA_HOME Plugins
HELM_DRIVER Where releases are stored: secret (default), configmap, memory, sql
HELM_NAMESPACE Default namespace
HELM_KUBECONTEXT Default kube context

The next TryIt builds the defaults the way Helm resolves them: an environment variable wins, otherwise a platform default is used.

Python Stand-in: resolving Helm directories

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Shell completion and handy extras

Completion saves typing release names and namespaces:

Terminal
# bash (add to ~/.bashrc)
source <(helm completion bash)
# zsh
source <(helm completion zsh)
# fish
helm completion fish | source
# PowerShell
helm completion powershell | Out-String | Invoke-Expression

Other tools worth installing early: kubectl, jq for JSON output (helm list -o json), and a linter such as yamllint. Helm has a plugin system (helm plugin install ...) used for diffing releases (the popular helm-diff plugin) and similar tasks; the CI/CD chapter uses it.

Finding help

helm help lists all commands, and every command has --help: helm install --help shows each flag with a description. Reading it once is worth the time because many options (--atomic, --wait, --timeout, --create-namespace) are used daily.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which file does Helm use to find your cluster?

    Helm reads the kubeconfig (default ~/.kube/config or $KUBECONFIG) and the current context.
  2. 2. How many Kubernetes minor versions behind its build target does a Helm release support?

    Helm supports the Kubernetes version it was built for and three minors before it.
  3. 3. You want to install into another cluster for one command only. Which flag?

    --kube-context selects a different context without changing your current one.
  4. 4. Which variable changes where Helm stores release records?

    HELM_DRIVER chooses secret, configmap, memory or sql storage.

Summary

  • Helm is a single binary installed with a package manager, a script or a manual download.
  • It uses your kubeconfig and current context, so always confirm which cluster you target.
  • Keep Helm within three minor versions of your cluster's Kubernetes version.
  • helm env shows its directories; shell completion and --help make daily use faster.

Next: Your First Helm Release