Mastering Helm: Top Kubernetes Commands You Need to Know
Helm is a package manager for Kubernetes, just like apt
for Ubuntu or yum
for CentOS. Helm simplifies the deployment, upgrade, rollback, and management of Kubernetes applications using Helm charts.
Helm Commands – Purpose and Business Use Cases
Helm Command | Purpose | Business Use Case |
---|---|---|
helm repo add | Adds a chart repository to your local Helm setup | Allows teams to use and manage official or custom application charts from a central repository (e.g., Bitnami, internal repo) |
helm repo update | Updates information of available charts in all added repos | Ensures the latest version of apps/microservices are always available for deployment |
helm search repo | Searches for charts in added repositories | Helps DevOps teams find required services like MySQL, Redis, or NGINX quickly |
helm install | Installs a Helm chart into the Kubernetes cluster | Automates app deployments (e.g., deploying a .NET Core app with MySQL backend in staging) |
helm upgrade | Upgrades an existing release with new config or version | Enables smooth rolling updates of production apps without downtime |
helm rollback | Rolls back a release to a previous revision | Quick recovery in case of failed deployments, improving reliability and uptime |
helm list | Lists all Helm releases in a namespace | Helps in auditing and managing running Kubernetes apps |
helm uninstall | Uninstalls and removes a Helm release | Safe and clean removal of apps or microservices when decommissioning services |
helm create | Generates a boilerplate Helm chart for your app | Standardizes deployment templates for consistent infrastructure setup |
helm template | Renders Helm templates locally without deploying | Useful for debugging and previewing YAMLs before actual deployment |
Real-World Business Use Case
Example: E-Commerce App Deployment
Scenario:
An e-commerce platform uses microservices for user authentication, product catalog, and order processing. Each service is developed in .NET Core and communicates with a shared MySQL database.
Helm in Action:
helm create auth-service
– scaffold deployment confighelm install mysql bitnami/mysql
– deploy MySQL as a backendhelm install auth-release ./auth-service
– deploy .NET Auth microservicehelm upgrade auth-release ./auth-service
– update Auth service with new featureshelm rollback auth-release 2
– rollback to last stable version if issues foundhelm list
– list all releases for tracking and monitoring
Business Benefits:
Benefit | Description |
---|---|
Faster Deployment | Teams can quickly deploy complex apps across multiple environments |
Version Control | Applications are versioned and can be easily rolled back |
Standardization | Ensures consistent deployment standards across dev, staging, and prod |
Easy Testing | Helm charts can be templated and tested before deployment |
Reusability | Helm charts can be reused across different microservices or teams |
Real-Time Business Use Case: .NET App + MySQL Deployment
Scenario:
A company needs to deploy a microservice-based Order Management System with a .NET Core backend and MySQL database on Kubernetes using Helm.
Helm Chart Structure for .NET App (dotnet-app
)
dotnet-app/
│
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ └── ingress.yaml
Sample Values.yaml
image:
repository: myrepo/dotnet-orders
tag: "1.0.0"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
mysql:
host: my-mysql.default.svc.cluster.local
port: 3306
user: root
password: admin123
database: appdb
Deployment Steps:
- Install MySQL:
helm install my-mysql bitnami/mysql --set auth.rootPassword=admin123,auth.database=appdb
2.Create your .NET Helm Chart:
helm create dotnet-app
3. Update deployment.yaml to connect to MySQL (via env variables)
4.Install the .NET App:
helm install dotnet-release ./dotnet-app
5.Verify Deployment:
kubectl get pods,svc
Business Use Case Justification:
- ✅ Modular Deployment: Each service can be independently versioned, upgraded, or rolled back.
- ✅ Database as a Helm Release: Quick reusability across environments.
- ✅ CI/CD Ready: Helm charts are version-controlled and can be used in pipelines.
- ✅ Easy Scaling: Just edit
values.yaml
or use HPA YAML in templates. - ✅ Multi-Environment Friendly: Different values for dev/staging/prod via
-f dev-values.yaml
.
#Kubernetes #DevOps #KubernetesCommands #HelmCharts #CloudNative #K8s #CICD #DevOpsTools #InfrastructureAsCode