DevOps Blog

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.

1. Installing Helm

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

2. Adding a Helm Repository

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

3. Searching for Charts

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

4. Installing a Helm Chart

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

5. Listing Releases

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

6. Upgrading a Release

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

7. Rolling Back a Release

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

8. Uninstalling a Release

Remove a Helm-deployed application:

helm uninstall my-nginx # Keep release history (useful for debugging) helm uninstall my-nginx --keep-history

9. Inspecting Charts

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

10. Debugging Helm Deployments

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

Bonus: Helm 3 vs. Helm 2

Helm 3 removed Tiller (server-side component), making it simpler. If you're still using Helm 2, consider migrating.


Conclusion

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!