Skip to content

Menu

Helm Cheat Sheet: Install, Upgrade, Rollback and OCI Charts (Helm 4)

Checked against Helm Helm 4.3.2 (docs for 4.3); helm-diff plugin 3.15.15 on 28 November 2026. Each section links to the official docs it was checked against.

This sheet is for people who deploy charts to Kubernetes and need the release commands, the values flags and the Helm 4 renames in one place. It follows the Helm 4.3 command reference, and the latest release on GitHub was v4.3.2 on 13 Nov 2026. Helm isn't installed in the shell used to write this, so every row was checked against the docs rather than run.

When to use what

For anything you deploy more than once, use helm upgrade --install. It installs the release when it doesn't exist and upgrades it when it does, so the same CI step works on day one and day one hundred. Plain helm install is fine for a one-off try in a scratch namespace.

Keep values in files and use --set only for the odd value that changes per run, like an image tag. Files can be reviewed in a pull request; a long chain of --set flags in a pipeline script can't be. When you pass several -f files or several --set flags, the right-most one wins, so put the environment file last.

Before an upgrade on a real cluster, look at what will change. helm template renders the YAML locally with no cluster access, which is good for review and for feeding other tools. The community helm-diff plugin goes one step further and compares the new render with what is deployed. If you write raw manifests rather than charts, the Kubernetes YAML generator gives you a starting file, and the Kubernetes MCP server lets an AI assistant read cluster state while you debug a release. When an install fails with a forbidden error, the Kubernetes RBAC explorer helps you work out which permission your CI account is missing.

On rollbacks, my rule is simple: --rollback-on-failure in CI, and a manual helm rollback after checking helm history when a human is at the keyboard. Automatic rollback hides the failed state you might want to look at, so I don't use it for first installs either.

helm rollback with no revision, or revision 0, goes back to the previous release. Revision numbers come from helm history.

helm upgrade --install api ./charts/api -n prod --create-namespace

Install the release if it's missing, otherwise upgrade it, creating the namespace on first run

From the docs, not run by us
helm install --generate-name ./mychart

Install a chart and let Helm pick the release name

From the docs, not run by us
helm upgrade api ./charts/api --rollback-on-failure

Upgrade and roll back to the last good release if it fails; this flag replaced --atomic in Helm 4

From the docs, not run by us
helm upgrade api ./charts/api --wait --timeout 10m

Wait until the release's resources are ready before reporting success; --wait alone uses the watcher strategy

From the docs, not run by us
helm history api -n prod

List the revisions of a release with their status, so you know which number to roll back to

From the docs, not run by us
helm rollback api 4 -n prod

Roll the release back to revision 4; leave the number out to go back one revision

From the docs, not run by us
helm uninstall api -n prod --keep-history

Delete the release's resources but keep its history so you can still inspect or roll back

From the docs, not run by us
helm list -A

List releases in every namespace instead of only the current one

From the docs, not run by us

With several -f files or --set flags, the last one on the command line takes priority.

helm install api ./chart -f values.yaml -f values-prod.yaml

Layer two values files; keys in values-prod.yaml override the same keys in values.yaml

From the docs, not run by us
helm upgrade api ./chart --set image.tag=1.4.2

Override one value from the command line for this run

From the docs, not run by us
helm install api ./chart --set-string build=0123

Force a value to be a string so leading zeros and number-like text survive

From the docs, not run by us
helm install api ./chart --set-json 'resources={"limits":{"cpu":"500m"}}'

Pass an object or list as JSON instead of chaining many dotted --set keys

From the docs, not run by us
helm install api ./chart --set-file config=./app.conf

Read a value from a file, handy for multi-line config or certificates

From the docs, not run by us
helm upgrade api ./chart --reset-then-reuse-values

Start from the chart's new defaults, then reapply the previous release's values and any new overrides

From the docs, not run by us
helm get values api -n prod

Print the user-supplied values the deployed release was installed with

From the docs, not run by us
helm show values bitnami/redis

Print a chart's default values.yaml before you install it

From the docs, not run by us

OCI charts don't need helm repo add; you reference them with an oci:// URL directly. In Helm 4 log in with the bare host, such as ghcr.io, not https://ghcr.io/....

helm repo add bitnami https://charts.bitnami.com/bitnami

Register a classic HTTP chart repository under a short name

From the docs, not run by us
helm repo update

Refresh the cached index of every added repository so new chart versions show up

From the docs, not run by us
helm search repo redis --versions

Search added repositories and list every available version, not only the newest

From the docs, not run by us
echo "$TOKEN" | helm registry login ghcr.io -u me --password-stdin

Log in to an OCI registry without putting the password in your shell history

From the docs, not run by us
helm push mychart-0.1.0.tgz oci://ghcr.io/me/charts

Upload a packaged chart to an OCI registry; the chart name and version become the repository and tag

From the docs, not run by us
helm install web oci://ghcr.io/me/charts/mychart --version 0.1.0

Install straight from an OCI registry at a pinned chart version

From the docs, not run by us
helm install web oci://ghcr.io/me/charts/mychart@sha256:<digest>

Install by digest so a re-pushed tag can't change what you deploy; a digest mismatch refuses to install

From the docs, not run by us
helm pull oci://ghcr.io/me/charts/mychart --version 0.1.0 --untar

Download a chart and unpack it so you can read the templates

From the docs, not run by us

helm diff is a community plugin (databus23/helm-diff), not part of Helm. Helm 4 checks plugin provenance by default, so the plugin README recommends installing from the signed release tarball rather than the git URL.

helm template api ./chart -f values-prod.yaml > rendered.yaml

Render the manifests locally without talking to a cluster, for review or other tools

Try it: kubernetes-yaml-generatorFrom the docs, not run by us
helm template api ./chart --show-only templates/deployment.yaml

Render a single template file instead of the whole chart

From the docs, not run by us
helm lint ./chart --strict

Check the chart for problems and treat warnings as failures

From the docs, not run by us
helm install api ./chart --dry-run=server

Simulate an install against the cluster's API server without persisting anything

From the docs, not run by us
helm get manifest api -n prod

Show the YAML that the deployed release actually applied

From the docs, not run by us
helm dependency update ./chart

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

From the docs, not run by us
helm diff upgrade api ./chart -f values-prod.yaml

With the helm-diff plugin, show what an upgrade would change compared with the live release

From the docs, not run by us
helm diff upgrade api ./chart --detailed-exitcode

Exit non-zero when there are changes, so a pipeline can tell 'nothing to deploy' apart

From the docs, not run by us
helm upgrade api ./chart --server-side=true

Force server-side apply on an upgrade; the default auto keeps whatever method the release used before

From the docs, not run by us
helm upgrade api ./chart --force-replace

Replace resources instead of patching them; this is the Helm 4 name for the old --force

From the docs, not run by us
helm upgrade api ./chart --server-side=true --force-conflicts

With server-side apply, take over fields that another field manager owns

From the docs, not run by us
helm upgrade api ./chart --take-ownership

Adopt existing resources that weren't created by this release instead of failing on the ownership check

From the docs, not run by us
helm install api ./chart --wait=hookOnly

Pick a wait strategy explicitly: watcher, hookOnly (the default when the flag is absent) or legacy

From the docs, not run by us

Worked example: Ship a new image tag with a preview and an automatic rollback

You want to move the api release in prod to image tag 1.4.2, see the change first, and have CI undo it if pods never become ready.

# 1. What is deployed now, and with which values?
helm history api -n prod --max 5
helm get values api -n prod > current-values.yaml

# 2. Preview the change (helm-diff plugin)
helm diff upgrade api ./charts/api -n prod \
  -f values-prod.yaml --set image.tag=1.4.2

# 3. Deploy, wait for readiness, roll back on failure
helm upgrade --install api ./charts/api -n prod \
  -f values-prod.yaml --set image.tag=1.4.2 \
  --rollback-on-failure --timeout 10m

Step 1 tells you the current revision number and saves the values in use, which is your safety net if someone set things by hand. In step 2 the diff should show only the image: line of the Deployment changing; if it shows ConfigMaps or Services changing too, your values file has drifted from what is live and you should find out why before you deploy. In step 3, --rollback-on-failure turns on waiting by itself, so Helm watches the new pods. If they aren't ready within ten minutes, Helm rolls back to the last successful revision and the command exits with an error, which fails the CI job. helm history will then show the failed revision followed by a new revision for the rollback. These commands follow the Helm 4.3 reference and weren't run here.

Common mistakes

  • Copying --atomic or --force from an old pipeline into Helm 4.

    Use --rollback-on-failure and --force-replace, the Helm 4 names for those flags, and grep your CI files for the old ones.

  • Running helm upgrade --reuse-values after the chart added new defaults, then wondering why the new keys are empty.

    Use --reset-then-reuse-values, which starts from the new chart defaults and then reapplies the old release values, or keep all values in files you pass every time.

  • Passing a number-like string such as a build ID or a version with leading zeros through --set.

    Use --set-string or put the value in a values file in quotes, so Helm doesn't turn it into a number.

  • Logging in with helm registry login https://ghcr.io/org/charts in Helm 4.

    Pass only the host, for example helm registry login ghcr.io, then use the full oci:// path in install and push commands.

  • Upgrading a Helm 3 release in Helm 4 and expecting server-side apply.

    Releases keep their previous apply method. Pass --server-side=true on the upgrade if you want to switch, and test it first in a cluster where operators also touch the same objects.

  • Deploying an OCI chart by tag and assuming the tag can't move.

    Tags can be re-pushed. Pin the digest with chart@sha256:... for production installs.