Containers & orchestration 22 entries 15 run in the sandbox

Helm cheat sheet

Install, upgrade, template and roll back chart releases. Each entry has a worked example and the flags worth knowing, and where one is easy to get wrong, the gotcha.

Charts & repositories

helm repo add <name> <url>

Register a chart repository, then refresh the local index.

helm repo add podinfo https://stefanprodan.github.io/podinfo && helm repo update
repo update
Fetch the latest chart versions from every repository.
repo list
Configured repositories.

helm show values <chart>

Print a chart's default values: the menu of everything you can configure.

helm show values bitnami/redis > redis-defaults.yaml
--version X
Values for a specific chart version.
show chart / readme
Chart metadata or documentation.

helm lint <chart-dir>

Check a chart for errors and bad practices before packaging it.

helm lint ./charts/api -f values-prod.yaml
-f FILE
Lint with specific values.
--strict
Treat warnings as errors.

helm dependency update <chart-dir>

Download the subcharts listed in Chart.yaml into charts/.

helm dependency update ./charts/api
build
Rebuild from Chart.lock exactly.
list
Show dependency status.

helm pull <chart> --untar

Download a chart and unpack it, to read its templates and defaults before you install it.

helm pull bitnami/redis --version 19.6.4 --untar
--version X
A specific chart version instead of the latest.
--untar
Unpack into a directory instead of keeping the .tgz.
-d DIR
Where to write the chart.

Gotcha Pin --version everywhere automation installs charts. Without it you get whatever was published most recently.

helm install <release> oci://<registry>/<chart>

Install charts straight from an OCI registry such as GHCR, ECR or Docker Hub, with no helm repo add.

helm upgrade --install api oci://ghcr.io/acme/charts/api --version 1.4.2 -n shop
helm registry login HOST
Authenticate to a private registry.
helm push api-1.4.2.tgz oci://HOST/PATH
Publish a packaged chart.
--version X
The chart version, stored as the OCI tag.

Gotcha OCI charts do not show up in helm search repo. You need the exact reference and version.

helm package <chart-dir>

Build a versioned chart archive (.tgz) ready to push to a repository or registry.

helm package ./charts/api --version 1.4.2 --app-version 1.4.2 -d dist/
--version
Chart version, overriding Chart.yaml.
--app-version
The application version the chart deploys.
-u
Update dependencies first.

Gotcha The chart version and appVersion are different things. Bump version whenever the chart changes, even if the image did not.

Install & upgrade

helm upgrade --install <release> <chart>

Install the release if it does not exist, upgrade it if it does. The idempotent command for CI.

helm upgrade --install web2 bitnami/nginx -n shop --set replicaCount=2
-n NS --create-namespace
Target namespace, created if missing.
-f FILE
Values file; repeat to layer them, later files win.
--atomic
Roll back automatically if the upgrade fails (implies --wait). Helm 4 calls it --rollback-on-failure.
--wait --timeout 5m
Wait for resources to become ready.
--version X
Pin the chart version.

--set <key>=<value>

Override single values on the command line. They beat every values file.

helm upgrade cache bitnami/redis -n shop --reuse-values --set master.resources.limits.memory=512Mi
precedence
Chart defaults < -f files in order < --set / --set-string.
--set-string
Force a string, for tags like 1.10 that YAML would read as a number.
--reuse-values
Start from the last release's values; can hide changed chart defaults.

Gotcha A --set applied by hand is not in Git. The next pipeline run without it quietly reverts your fix.

helm template <release> <chart>

Render the manifests locally without touching the cluster, to review exactly what will be applied.

helm template web2 bitnami/nginx --set replicaCount=2 | kubectl apply --dry-run=client -f -
-f / --set
Same value handling as install.
--show-only templates/deployment.yaml
Render one template.
upgrade --dry-run
Render against the cluster, checking installed state.

helm diff upgrade <release> <chart>

With the helm-diff plugin, preview the change an upgrade would make to the live release.

helm diff upgrade api ./charts/api -f values-prod.yaml
plugin install
helm plugin install https://github.com/databus23/helm-diff
--context 3
Lines of context around changes.

values-prod.yaml

A per-environment values file that holds only the keys that differ from the chart's defaults.

replicaCount: 3
image:
  tag: "1.4.2"
resources:
  requests:
    cpu: 250m
    memory: 256Mi
  limits:
    memory: 512Mi
ingress:
  enabled: true
  hosts:
    - host: api.example.com
      paths:
        - path: /
          pathType: Prefix
-f base.yaml -f prod.yaml
Layer files; later files win key by key.
--reuse-values
Keep the last release's values; new chart defaults are silently ignored.
--reset-then-reuse-values
Start from the new chart defaults, then apply the last release's overrides.

Gotcha Keep values files in Git. helm get values shows what is deployed; only the history in Git shows why.

Inspect & roll back

helm list -A

Every release in every namespace with its revision, status and chart version.

NAME   NAMESPACE   REVISION   UPDATED                   STATUS     CHART        APP VERSION
api    shop        14         2026-09-23 09:30:11 UTC   deployed   api-2.3.1    1.4.2
redis  shop        3          2026-09-02 14:02:40 UTC   deployed   redis-19.6.4 7.2.5
-A
All namespaces.
--failed / --pending
Only releases in those states.

helm status <release>

Current state of a release, its notes and the resources it created.

helm status cache -n shop
--revision N
Status of an older revision.
--show-resources
List the resources in the release.

helm history <release>

Revision history with timestamps, statuses and descriptions.

helm history cache -n shop --max 5
--max N
Only the last N revisions.

helm rollback <release> [revision]

Return a release to an earlier revision; omitting the revision goes back one.

helm rollback cache 1 -n shop --wait
REVISION
Target revision from helm history.
--wait
Wait until resources are ready.

Gotcha A rollback is a new revision (15 in this example), not a rewind. History keeps growing.

helm rollback <release> <last-good>

Recover a release stuck in pending-upgrade after an interrupted deploy: 'another operation is in progress'.

helm history api -n shop && helm rollback api 14 -n shop
pending-upgrade
A previous helm process died mid-upgrade and left the release locked.

Gotcha Always give CI helm steps a --timeout and let the job fail cleanly, rather than cancelling it mid-apply.

helm get values <release>

The values a release was installed with. Add --all to include chart defaults.

helm get values cache -n shop --all
--all
Merged values including defaults.
get manifest
The rendered Kubernetes YAML of the release.
--revision N
Values or manifest of an older revision.

helm uninstall <release>

Delete a release and the resources it created.

helm uninstall cache -n shop --keep-history
--keep-history
Keep release records so you can still roll back.
--dry-run
Simulate.

Gotcha PersistentVolumeClaims created by StatefulSets are not deleted by uninstall. That is usually what you want.

helm get manifest <release>

Print the Kubernetes objects Helm rendered and applied for a release revision.

helm get manifest cache -n shop --revision 1
--revision N
A past revision instead of the current one.
helm get all
Values, hooks, notes and manifest together.
helm get notes
The post-install notes the chart printed.

Gotcha This is what Helm rendered, not what is running now. Controllers and hand edits change live objects; compare with kubectl get -o yaml.

helm test <release>

Run the chart's test hooks, pods annotated helm.sh/hook: test, against a deployed release.

helm test cache -n shop --logs --timeout 2m
--logs
Print the test pods' logs.
--timeout
How long to wait for the tests to finish.

Gotcha A chart with no test hooks passes helm test trivially. Check that the chart actually ships a test before you rely on it as a gate.

Your pager is ready.

Free, instant, and it works on your phone. No signup: start as a guest and save your progress later.