Essential Helm Commands Every Kubernetes User Should Know
Helm is the package manager for Kubernetes, and it simplifies deploying and managing applications on your cluster. Whether you're a beginner or an experienced Kubernetes user, knowing the most common Helm commands can save you time and effort.
In this post, we'll cover the essential Helm commands you'll use daily.
Before using Helm, ensure it's installed:
# Download and install Helm (Linux/macOS)
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Verify installation
helm version
Helm charts are stored in repositories. Add and update them with:
# Add a repository (e.g., Bitnami)
helm repo add bitnami https://charts.bitnami.com/bitnami
# List repositories
helm repo list
# Update repository to fetch latest charts
helm repo update
Find Helm charts to deploy:
# Search for a chart (e.g., nginx)
helm search repo nginx
# Search in Artifact Hub (Helm's public chart registry)
helm search hub nginx
Deploy applications using Helm charts:
# Install a chart (e.g., nginx from Bitnami)
helm install my-nginx bitnami/nginx
# Install with a custom values file
helm install my-app -f values.yaml bitnami/nginx
# Install in a specific namespace
helm install my-app --namespace my-namespace bitnami/nginx
# Install in a specific namespace and create it if needed.
helm install my-app --namespace my-namespace --create-namespace bitnami/nginx
Check what's deployed in your cluster:
# List all releases in all namespaces
helm list -A
# List releases in a specific namespace
helm list -n my-namespace
Update an existing Helm release:
# Upgrade with new chart version or values
helm upgrade my-nginx bitnami/nginx --set service.type=LoadBalancer
# Upgrade using a values file
helm upgrade my-nginx -f new-values.yaml bitnami/nginx
Revert to a previous version if something goes wrong:
# View release history
helm history my-nginx
# Rollback to a previous revision
helm rollback my-nginx 1 # Reverts to revision 1
Remove a Helm-deployed application:
helm uninstall my-nginx
# Keep release history (useful for debugging)
helm uninstall my-nginx --keep-history
Before installing, inspect a chart's structure and values:
# Download a chart to inspect (without installing)
helm pull bitnami/nginx --untar
# Show default values for a chart
helm show values bitnami/nginx
Troubleshoot Helm installations:
# Dry-run to check for errors
helm install my-nginx bitnami/nginx --dry-run
# Debug template rendering
helm template my-nginx bitnami/nginx
Helm 3 removed Tiller (server-side component), making it simpler. If you're still using Helm 2, consider migrating.
These Helm commands will help you manage Kubernetes applications efficiently. Whether installing, upgrading, or troubleshooting, Helm makes Kubernetes deployments smoother.
What’s your favorite Helm command? Let us know in the comments!