1 min read #devops
On this page

Helm Operations Manual

Helm is the package manager for Kubernetes. Core concepts: chart (application template), release (installation instance of a chart), repository (chart repository), values (configuration overrides).

View

helm list -A                                              # releases in all namespaces
helm list -n <ns>
helm status <release> -n <ns>                             # current status + deployed resources
helm history <release> -n <ns>                            # version history (revision number)
helm get values <release> -n <ns>                         # currently used values
helm get values <release> -n <ns> --revision 3           # historical version values
helm get manifest <release> -n <ns>                       # final generated K8s YAML
helm get notes <release> -n <ns>                          # release notes (post-deployment prompts)

# repo
helm repo list
helm search repo <keyword>                                # search for charts
helm search repo nginx --versions                        # view all versions
helm show values bitnami/nginx                            # chart default values

Operations

# Install
helm install <name> <chart> -n <ns> --create-namespace
helm install <name> <chart> -n <ns> -f values.yaml        # custom configuration
helm install <name> <chart> -n <ns> --set replicaCount=3  # override a single value via command line

# Upgrade
helm upgrade <name> <chart> -n <ns> -f values.yaml
helm upgrade --install <name> <chart> -n <ns>             # install if not exists (idempotent)
helm upgrade <name> <chart> -n <ns> --dry-run             # simulate (see what will change)

# Rollback
helm rollback <name> <revision> -n <ns>
helm rollback <name> 1 -n <ns>                            # rollback to the first version

# Uninstall
helm uninstall <name> -n <ns>
helm uninstall <name> -n <ns> --keep-history              # keep history

# Repo management
helm repo add <name> <url>
helm repo update                                           # update local cache
helm repo remove <name>

Chart Debugging

# Local rendering (without connecting to K8s)
helm template <name> <chart> -f values.yaml | less        # view final YAML
helm template <name> <chart> -f values.yaml | kubectl diff -f -   # compare with actual

# Syntax check
helm lint <chart>

# View which K8s resources Helm has deployed
helm get manifest <release> -n <ns> | kubectl get -f - -o wide