Installing and Configuring Helm

1. Installing Helm CLI

PlatformCommand
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
BinaryDownload from github.com/helm/helm/releases and extract to $PATH

2. Verifying Helm Installation

CommandOutput
helm versionClient version (e.g. v3.16.x)
helm version --shortCompact one-line version
helm envAll Helm environment variables and resolved paths
helm helpFull command tree

3. Configuring Repository Settings

FilePurpose
$XDG_CONFIG_HOME/helm/repositories.yamlRegistered HTTP repositories
$XDG_CACHE_HOME/helm/repository/Cached index files and downloaded charts
$XDG_CONFIG_HOME/helm/registry/config.jsonOCI 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
FlagPurpose
--kube-contextOverride active context per command
--kubeconfigUse alternate kubeconfig file
--kube-apiserverOverride API server URL
--kube-tokenBearer token for API authentication

5. Configuring Helm Environment Variables

VariableDefaultPurpose
HELM_NAMESPACEdefaultRelease namespace
HELM_KUBECONTEXTcurrentKubeconfig context
HELM_DRIVERsecretRelease storage backend (secret, configmap, sql, memory)
HELM_CACHE_HOMEOS cache dirCache root
HELM_CONFIG_HOMEOS config dirConfig root
HELM_DATA_HOMEOS data dirData root (plugins)
HELM_PLUGINS$HELM_DATA_HOME/pluginsPlugin directory
HELM_DEBUGfalseVerbose 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/repositoryRepo index.yaml + downloaded .tgz
~/.cache/helm/registryOCI pulled chart blobs
Note: Safe to delete; helm repo update recreates the index files.

8. Setting Up Helm Plugins Directory

PathContents
~/.local/share/helm/pluginsInstalled plugins (each in its own subdir with plugin.yaml)
Overrideexport HELM_PLUGINS=/opt/helm/plugins

9. Configuring Helm Data Directory

OSDefault HELM_DATA_HOME
Linux~/.local/share/helm
macOS~/Library/helm
Windows%APPDATA%\helm

10. Configuring Helm Config Directory

OSDefault HELM_CONFIG_HOME
Linux~/.config/helm
macOS~/Library/Preferences/helm
Windows%APPDATA%\helm