
Kubernetes simplifies container orchestration, but managing applications at scale can be challenging. Helm, the package manager for Kubernetes, helps streamline deployment, versioning, and rollback of applications.
In this guide, we’ll cover:
- Installing and setting up Helm (Install guide)
- Helm charts and repositories
- Deploying applications with Helm
- Advanced templating and customization
- Managing releases and rollbacks
- FAQs for troubleshooting and interview prep
Prerequisites
Ensure you have:
- A running Kubernetes cluster (minikube, kind, or cloud-based)
- kubectl installed and configured
- Helm installed
Step 1: Installing Helm
macOS & Linux (via script)
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Windows (via Chocolatey)
choco install kubernetes-helm
Verify installation:
helm version
Step 2: Understanding Helm Charts & Repositories
Helm uses charts to define Kubernetes applications. A chart is a package containing YAML files, templates, and dependencies.
Add the official Helm repository:
helm repo add stable https://charts.helm.sh/stable
helm repo update
List available charts:
helm search repo stable
Step 3: Deploying Applications with Helm
Install Nginx using a Helm chart:
helm install my-nginx stable/nginx-ingress
Verify deployment:
kubectl get pods
Customize Values
Override default values with a custom values file:
controller:
replicaCount: 2
Install with custom values:
helm install my-nginx stable/nginx-ingress -f values.yaml
Step 4: Managing Releases & Rollbacks
List Helm releases:
helm list
Upgrade a release:
helm upgrade my-nginx stable/nginx-ingress --set controller.replicaCount=3
Rollback to a previous version:
helm rollback my-nginx 1
Uninstall a release:
helm uninstall my-nginx
Step 5: Creating a Custom Helm Chart
Generate a new chart:
helm create mychart
Customize values.yaml:
replicaCount: 2
image:
repository: nginx
tag: latest
Deploy the chart:
helm install myapp ./mychart
FAQs:
Q1: How do I troubleshoot Helm deployments?
Use the following commands:
helm status myapp
kubectl get pods
kubectl describe pod <pod-name>
Q2: How do I list all Helm releases?
helm list --all-namespaces
Q3: How do I delete all Helm releases?
helm list --short | xargs -L1 helm uninstall
Q4: How do I use Helm in CI/CD pipelines?
Use Helm in GitHub Actions:
- name: Deploy with Helm
run: |
helm upgrade --install myapp ./mychart
Q5: How do I store Helm releases in GitOps workflows?
Use Helmfile:
helmfile apply
Conclusion
Helm makes Kubernetes application deployment efficient and scalable. In this guide, we covered:
✅ Installing Helm and setting up repositories
✅ Deploying applications with Helm charts
✅ Managing releases, upgrades, and rollbacks
✅ Creating custom Helm charts
✅ FAQs for troubleshooting and best practices
Master Helm to streamline Kubernetes workflows and manage applications effectively! 🚀
📢 Have questions or feedback? Drop a comment below or connect with me on Twitter/X@spysood!
Originally published on Medium.