Installing and Configuring Helm
1. Installing Helm CLI
| Platform | Command |
| macOS (Homebrew) | brew install helm |
| Linux (script) | curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| Linux (apt) | curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg && sudo apt install helm |
| Windows (Chocolatey) | choco install kubernetes-helm |
| Windows (Scoop) | scoop install helm |
| Binary | Download from github.com/helm/helm/releases and extract to $PATH |
2. Verifying Helm Installation
| Command | Output |
helm version | Client version (e.g. v3.16.x) |
helm version --short | Compact one-line version |
helm env | All Helm environment variables and resolved paths |
helm help | Full command tree |
3. Configuring Repository Settings
| File | Purpose |
$XDG_CONFIG_HOME/helm/repositories.yaml | Registered HTTP repositories |
$XDG_CACHE_HOME/helm/repository/ | Cached index files and downloaded charts |
$XDG_CONFIG_HOME/helm/registry/config.json | OCI registry credentials (Docker config format) |
4. Setting Up Kubeconfig Context
Example: Target a specific cluster + namespace
export KUBECONFIG=~/.kube/prod-config
kubectl config use-context prod-cluster
kubectl config set-context --current --namespace=apps
helm install api ./chart # uses current context + namespace
| Flag | Purpose |
--kube-context | Override active context per command |
--kubeconfig | Use alternate kubeconfig file |
--kube-apiserver | Override API server URL |
--kube-token | Bearer token for API authentication |
5. Configuring Helm Environment Variables
| Variable | Default | Purpose |
HELM_NAMESPACE | default | Release namespace |
HELM_KUBECONTEXT | current | Kubeconfig context |
HELM_DRIVER | secret | Release storage backend (secret, configmap, sql, memory) |
HELM_CACHE_HOME | OS cache dir | Cache root |
HELM_CONFIG_HOME | OS config dir | Config root |
HELM_DATA_HOME | OS data dir | Data root (plugins) |
HELM_PLUGINS | $HELM_DATA_HOME/plugins | Plugin directory |
HELM_DEBUG | false | Verbose output |
HELM_EXPERIMENTAL_OCI | (removed) | OCI is stable since 3.8; flag no longer needed |
6. Setting Default Namespace
Example: Per-shell default
export HELM_NAMESPACE=monitoring
helm list # lists releases in monitoring
helm install prom prometheus-community/prometheus
7. Configuring Helm Cache Directory
| Path (Linux) | Contents |
~/.cache/helm/repository | Repo index.yaml + downloaded .tgz |
~/.cache/helm/registry | OCI pulled chart blobs |
Note: Safe to delete; helm repo update recreates the index files.
8. Setting Up Helm Plugins Directory
| Path | Contents |
~/.local/share/helm/plugins | Installed plugins (each in its own subdir with plugin.yaml) |
| Override | export HELM_PLUGINS=/opt/helm/plugins |
9. Configuring Helm Data Directory
| OS | Default HELM_DATA_HOME |
| Linux | ~/.local/share/helm |
| macOS | ~/Library/helm |
| Windows | %APPDATA%\helm |
10. Configuring Helm Config Directory
| OS | Default HELM_CONFIG_HOME |
| Linux | ~/.config/helm |
| macOS | ~/Library/Preferences/helm |
| Windows | %APPDATA%\helm |