ThisCalculator

Everyday

Helm Commands Cheat Sheet: Install, Upgrade, Debug

Updated · Standard formula, shown below

Helm Commands Cheat Sheet: Install, Upgrade, Debug

Helm commands help you install, inspect, upgrade, roll back, and remove applications packaged as charts in Kubernetes. This cheat sheet covers the everyday Helm 3 workflow, with examples you can adapt to your cluster, namespace, and chart.

What Helm manages

A Helm chart is a package of files that describes Kubernetes resources, such as Deployments and Services. Installing a chart creates a Helm release: a named, versioned instance of that chart, with configuration values and a revision history. The Kubernetes cluster must be reachable and your account must have permission to perform the requested operations.

Helm commands generally take the form helm COMMAND, with options such as -n for a namespace and -f for a values file. Examples below use Helm 3 syntax; check helm help or helm COMMAND --help for the options supported by your installed version.

Start with these commands

  • helm version — print the Helm client version.
  • helm help — show top-level help; use helm help list for command-specific help.
  • helm list -A — list releases across namespaces. Use helm list -n dev to limit the list to one namespace.
  • helm status my-release -n dev — show a release’s status and related information.
  • helm get values my-release -n dev — show values supplied for the release. Add --all to include computed values from the chart.
  • helm history my-release -n dev — show revisions recorded for the release.

A release name is not necessarily the chart name. The namespace matters too: many commands operate in the current namespace unless you pass -n or --namespace.

Find and prepare a chart

For a chart stored in a repository, add the repository and refresh its index before searching or installing:

helm repo add example https://charts.example.org
helm repo update
helm search repo example
helm show chart example/app
helm show values example/app

The repository URL above is illustrative; use the URL supplied by the chart publisher. helm search repo searches repositories configured on your machine. helm show values displays the chart’s configurable defaults, which helps you choose settings instead of guessing their names.

Charts can also be installed from a local directory or archive. For a chart directory, use its path, such as ./my-chart. To inspect or validate a chart before installation, useful commands include:

  • helm lint ./my-chart — check a chart for common structural and template issues.
  • helm template my-release ./my-chart — render Kubernetes manifests locally without installing them.
  • helm show readme example/app — display the chart’s README when one is included.

Local rendering is useful for review, but it does not prove that resources will work in a live cluster. Cluster capabilities, permissions, admission policies, and existing resources can affect the outcome.

Install and customize

A basic install from a repository chart looks like this:

helm install my-release example/app -n dev --create-namespace

--create-namespace creates the namespace if it does not already exist. To provide configuration, use a values file or set individual values:

helm install my-release example/app -n dev \
  -f values-dev.yaml \
  --set replicaCount=2

Helm combines chart defaults with supplied values; a values file is generally easier to review and repeat than a long sequence of --set flags. For values containing punctuation or commas, quoting and escaping may be necessary. Confirm the chart’s expected keys with helm show values or its documentation.

To render the proposed resources without applying them, use helm template. For a cluster-aware preview, helm install --dry-run --debug my-release example/app -n dev can help show what Helm would do. Dry-run output may include rendered configuration, so treat it as potentially sensitive when sharing logs.

Upgrade, rollback, and uninstall

Use helm upgrade to apply a newer chart or changed configuration to an existing release:

helm upgrade my-release example/app -n dev -f values-dev.yaml

To install when absent and upgrade when present, use helm upgrade --install. This is common in repeatable deployment scripts:

helm upgrade --install my-release example/app -n dev \
  -f values-dev.yaml

Helm records release revisions, which you can inspect with helm history. To return to an earlier revision, specify its number:

helm rollback my-release 2 -n dev

A rollback reapplies the selected release revision; it is not a general backup or a guarantee that external data will be restored. Review the application’s storage and migration behavior before relying on rollback.

To remove a release, run helm uninstall my-release -n dev. This removes the resources managed by that release in the usual case, but persistent data and resources not owned by the release may have different lifecycles. Check the chart and Kubernetes storage configuration before uninstalling anything important.

Debug common problems

  • Release not found: check the spelling, namespace, and helm list -A output. A release in one namespace will not appear in a list restricted to another.
  • Chart not found: verify the repository was added, run helm repo update, and check the chart reference. A repository chart usually has the form repo-name/chart-name.
  • Permission or connection errors: check the active Kubernetes context with kubectl config current-context, cluster access, and namespace permissions. Helm uses Kubernetes access configured for the client.
  • Values appear ineffective: confirm the exact key and value type expected by the chart. Inspect applied values with helm get values and render templates to see the generated manifests.
  • Upgrade fails: inspect the error and release status with helm status and helm history. A failed upgrade may leave a release in a state that needs investigation before another change.

Do not assume that deleting a release or retrying an upgrade is harmless. For production changes, review rendered output, use the intended namespace and values file, and understand which resources or data might be affected.

Frequently Asked Questions

What is the difference between a Helm chart and a release?
A chart is the package and template set. A release is an installed instance of that chart, identified by a release name and namespace and tracked through revisions.

How do I see all Helm releases?
Run helm list -A to list releases across namespaces. Without -A, Helm lists releases in the selected or current namespace.

How do I install a specific chart version?
Use helm install my-release repo/chart --version 1.2.3, replacing the example version with one available from the chart publisher. You can search versions with helm search repo repo/chart --versions.

Does Helm install Kubernetes?
No. Helm manages chart releases through a Kubernetes cluster; it does not install the cluster itself. You need a configured, reachable cluster and appropriate permissions.

How can I see what an install will create?
Use helm template to render manifests locally, or run an install or upgrade with --dry-run --debug to preview the proposed operation. Review output for sensitive values before sharing it.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.