Skip to content

10.06 Working With Helm - Basics

Abstract

Helm CLI is the command-line tool used to search, install, list, upgrade, rollback, and uninstall Kubernetes applications packaged as Helm charts.

In production, Helm helps teams deploy applications consistently using reusable charts and version-controlled configuration.


Helm CLI Overview

Helm is used from the terminal with the helm command.

Check available commands:

helm --help

Common Helm actions:

Command Purpose
helm search Search for charts
helm repo Manage chart repositories
helm install Install a chart into Kubernetes
helm list List installed releases
helm uninstall Remove a release
helm upgrade Upgrade a release
helm rollback Roll back to a previous revision

Tip

Use helm --help when you forget a command. It is faster than searching online during labs or troubleshooting.


Helm Help Commands

Use help for the main CLI:

helm --help

Use help for a subcommand:

helm repo --help

Use help for a deeper command:

helm repo update --help

Example

If you forget how to roll back a failed deployment, helm --help shows that the correct command is helm rollback.


Helm Repositories

A Helm repository stores packaged Helm charts.

Common repo commands:

helm repo --help
Command Purpose
helm repo add Add a chart repository
helm repo list List configured repositories
helm repo remove Remove a repository
helm repo update Refresh local chart repository cache
helm repo index Generate repository index for packaged charts

Note

Helm stores repository metadata locally. Run helm repo update to refresh your local cache.


Add a Helm Repository

Example: add the Bitnami repository.

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

Expected output:

"bitnami" has been added to your repositories

List repositories:

helm repo list

Update repositories:

helm repo update

Success

In production, always update repositories before installing or upgrading charts to ensure Helm has the latest chart index.


Searching for Charts

Helm can search charts from two places:

Search Type Command Description
Artifact Hub helm search hub Searches public charts listed on Artifact Hub
Local repos helm search repo Searches repositories already added locally

Search Artifact Hub:

helm search hub wordpress

Search added repositories:

helm search repo wordpress

Warning

helm search hub searches Artifact Hub, but helm install requires the chart repository to be added locally first.


Example: Search WordPress Chart

helm search hub wordpress

Example output:

URL                                                    CHART VERSION   APP VERSION   DESCRIPTION
https://artifacthub.io/packages/helm/bitnami/...       12.1.27         5.8.1         Web publishing platform for building blogs

After adding a repository:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm search repo wordpress

Tip

Prefer charts from official or verified publishers when available.


Installing a Chart

Install WordPress from the Bitnami chart:

helm install my-release bitnami/wordpress

Where:

Part Meaning
my-release Release name
bitnami/wordpress Chart name from the Bitnami repo

Example output includes:

NAME: my-release
NAMESPACE: default
STATUS: deployed
REVISION: 1
CHART: wordpress-12.1.27
APP VERSION: 5.8.1

Note

A chart installation creates a release.
The release name is used later for upgrades, rollbacks, listing, and uninstalling.


Install Into a Namespace

helm install my-release bitnami/wordpress   --namespace wordpress   --create-namespace

Tip

For production, install applications into dedicated namespaces instead of the default namespace.


Install With Custom Values

Use a values file:

helm install my-release bitnami/wordpress   -f values-prod.yaml

Override a value directly:

helm install my-release bitnami/wordpress   --set wordpressUsername=admin

Warning

Avoid passing secrets with --set because shell history may store them.


List Helm Releases

List installed releases:

helm list

List releases in all namespaces:

helm list -A

Example output:

NAME        NAMESPACE   REVISION   STATUS     CHART              APP VERSION
my-release  default     1          deployed   wordpress-12.1.27  5.8.1

Tip

helm list -A is useful when you do not remember which namespace contains the release.


Uninstall a Release

Remove the WordPress release:

helm uninstall my-release

Expected output:

release "my-release" uninstalled

Danger

Uninstalling a Helm release removes Kubernetes objects managed by that release.

Check whether persistent volumes, databases, or backups need to be retained before uninstalling.


Helm Repo Update

Refresh chart metadata from configured repositories:

helm repo update

Example output:

Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. Happy Helming!

Note

This is similar to running apt update before installing packages on Linux.


Basic WordPress Deployment Flow

Search chart
Add repository
Update repository cache
Install chart
List release
Uninstall release if needed

Commands:

helm search hub wordpress
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install my-release bitnami/wordpress
helm list
helm uninstall my-release

Useful Helm Commands

Task Command
Show Helm help helm --help
Show repo help helm repo --help
Search Artifact Hub helm search hub <keyword>
Search local repos helm search repo <keyword>
Add repo helm repo add <name> <url>
List repos helm repo list
Update repos helm repo update
Install chart helm install <release> <repo/chart>
List releases helm list
List all releases helm list -A
Uninstall release helm uninstall <release>

Production Best Practices

Recommended

  • Use meaningful release names
  • Install apps into dedicated namespaces
  • Use helm repo update before installs/upgrades
  • Use verified or official charts when possible
  • Keep custom values in version-controlled files
  • Review chart documentation before installing
  • Run dry-run before production install
  • Pin chart versions for repeatable deployments
  • Avoid storing secrets in plain values files

Dry Run Before Install

Preview the install without applying changes:

helm install my-release bitnami/wordpress   --dry-run   --debug

Render manifests locally:

helm template my-release bitnami/wordpress

Tip

Use helm template or --dry-run --debug before deploying charts in production.


Pin Chart Version

Install a specific chart version:

helm install my-release bitnami/wordpress   --version 12.1.27

Warning

Without version pinning, future installs may pull a newer chart version and behave differently.


Do's

  • Use helm --help and subcommand help frequently
  • Add trusted repositories only
  • Run helm repo update regularly
  • Use clear release names
  • Use namespaces for separation
  • Store values files in Git
  • Test installs in non-production first
  • Review generated manifests before applying

Don'ts

  • Don't install unknown charts blindly
  • Don't use the default namespace for production apps
  • Don't pass passwords directly with --set
  • Don't forget the release name
  • Don't uninstall releases without checking persistent data
  • Don't depend on stale local repo cache
  • Don't use unpinned chart versions for critical workloads

Troubleshooting Commands

Check installed releases:

helm list -A

Check configured repositories:

helm repo list

Search local repositories:

helm search repo wordpress

Update repo cache:

helm repo update

Show chart values:

helm show values bitnami/wordpress

Show chart information:

helm show chart bitnami/wordpress

Question

Chart not found?

Check:

  • Is the repository added?
  • Did you run helm repo update?
  • Are you using the correct chart name?
  • Are you searching hub or local repo correctly?

Helm Basics Summary

Quote

  • Helm CLI manages Kubernetes applications through charts
  • Repositories store reusable charts
  • helm search hub searches Artifact Hub
  • helm repo add adds a chart repository locally
  • helm install creates a release
  • helm list shows installed releases
  • helm uninstall removes a release
  • Use dry-run, version pinning, and values files for production deployments