Customizing Helm Behavior

1. Configuring Helm Environment

VariableDefault
HELM_NAMESPACEdefault
HELM_KUBECONTEXTCurrent context
HELM_CACHE_HOME~/.cache/helm
HELM_CONFIG_HOME~/.config/helm
HELM_DATA_HOME~/.local/share/helm
HELM_DEBUGfalse
Inspecthelm env

2. Setting Default Namespace

Example: Per-shell default

export HELM_NAMESPACE=platform
helm list   # lists platform ns by default

3. Configuring Kubeconfig Path

SourcePrecedence
--kubeconfig flagHighest
KUBECONFIG envMulti-file colon-separated
~/.kube/configDefault

4. Setting Repository Cache

OperationCommand
View cachels $(helm env HELM_CACHE_HOME)/repository
Clear cacherm -rf $(helm env HELM_CACHE_HOME)/repository/*
Refreshhelm repo update

5. Configuring Plugins Path

PathDetail
$HELM_DATA_HOME/pluginsDefault plugins directory
helm env HELM_PLUGINSPrint resolved path

6. Setting Registry Config

FilePurpose
$HELM_CONFIG_HOME/registry/config.jsonOCI registry credentials
helm registry loginWrites credentials
helm registry logoutRemoves credentials

7. Enabling Experimental Features

FeatureEnablement
OCI supportGA since Helm 3.8 — no flag needed
Server-side applyAvailable via --server-side on install/upgrade
Experimental flagsHELM_EXPERIMENTAL_* env vars when applicable

8. Configuring Max History

Example: Limit revision history

helm upgrade --install api ./chart --history-max 10
# Default: 10 in Helm 3 (0 = unlimited)

9. Setting Debug Output

FlagEffect
--debugVerbose; show rendered templates on error
HELM_DEBUG=trueEquivalent env
--v=NKlog verbosity (1-10)

10. Using Custom Configuration

Example: Pipeline-isolated config

export HELM_CACHE_HOME=/tmp/helm/cache
export HELM_CONFIG_HOME=/tmp/helm/config
export HELM_DATA_HOME=/tmp/helm/data
helm repo add stable https://charts.helm.sh/stable
helm repo update