Customizing Helm Behavior
1. Configuring Helm Environment
| Variable | Default |
|---|---|
HELM_NAMESPACE | default |
HELM_KUBECONTEXT | Current context |
HELM_CACHE_HOME | ~/.cache/helm |
HELM_CONFIG_HOME | ~/.config/helm |
HELM_DATA_HOME | ~/.local/share/helm |
HELM_DEBUG | false |
| Inspect | helm env |
2. Setting Default Namespace
3. Configuring Kubeconfig Path
| Source | Precedence |
|---|---|
--kubeconfig flag | Highest |
KUBECONFIG env | Multi-file colon-separated |
~/.kube/config | Default |
4. Setting Repository Cache
| Operation | Command |
|---|---|
| View cache | ls $(helm env HELM_CACHE_HOME)/repository |
| Clear cache | rm -rf $(helm env HELM_CACHE_HOME)/repository/* |
| Refresh | helm repo update |
5. Configuring Plugins Path
| Path | Detail |
|---|---|
$HELM_DATA_HOME/plugins | Default plugins directory |
helm env HELM_PLUGINS | Print resolved path |
6. Setting Registry Config
| File | Purpose |
|---|---|
$HELM_CONFIG_HOME/registry/config.json | OCI registry credentials |
helm registry login | Writes credentials |
helm registry logout | Removes credentials |
7. Enabling Experimental Features
| Feature | Enablement |
|---|---|
| OCI support | GA since Helm 3.8 — no flag needed |
| Server-side apply | Available via --server-side on install/upgrade |
| Experimental flags | HELM_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
| Flag | Effect |
|---|---|
--debug | Verbose; show rendered templates on error |
HELM_DEBUG=true | Equivalent env |
--v=N | Klog verbosity (1-10) |