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:
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:
Use help for a subcommand:
Use help for a deeper command:
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:
| 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.
Expected output:
List repositories:
Update repositories:
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:
Search added repositories:
Warning
helm search hub searches Artifact Hub, but helm install requires the chart repository to be added locally first.
Example: Search WordPress Chart
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:
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
Tip
For production, install applications into dedicated namespaces instead of the default namespace.
Install With Custom Values
Use a values file:
Override a value directly:
Warning
Avoid passing secrets with --set because shell history may store them.
List Helm Releases
List installed releases:
List releases in all namespaces:
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:
Expected output:
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:
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 updatebefore 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:
Render manifests locally:
Tip
Use helm template or --dry-run --debug before deploying charts in production.
Pin Chart Version
Install a specific chart version:
Warning
Without version pinning, future installs may pull a newer chart version and behave differently.
Do's
- Use
helm --helpand subcommand help frequently - Add trusted repositories only
- Run
helm repo updateregularly - 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
defaultnamespace 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:
Check configured repositories:
Search local repositories:
Update repo cache:
Show chart values:
Show chart information:
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
hubor localrepocorrectly?
Helm Basics Summary
Quote
- Helm CLI manages Kubernetes applications through charts
- Repositories store reusable charts
helm search hubsearches Artifact Hubhelm repo addadds a chart repository locallyhelm installcreates a releasehelm listshows installed releaseshelm uninstallremoves a release- Use dry-run, version pinning, and values files for production deployments