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.

Helmchart

Helm Commands – Purpose and Business Use Cases

Helm CommandPurposeBusiness Use Case
helm repo addAdds a chart repository to your local Helm setupAllows teams to use and manage official or custom application charts from a central repository (e.g., Bitnami, internal repo)
helm repo updateUpdates information of available charts in all added reposEnsures the latest version of apps/microservices are always available for deployment
helm search repoSearches for charts in added repositoriesHelps DevOps teams find required services like MySQL, Redis, or NGINX quickly
helm installInstalls a Helm chart into the Kubernetes clusterAutomates app deployments (e.g., deploying a .NET Core app with MySQL backend in staging)
helm upgradeUpgrades an existing release with new config or versionEnables smooth rolling updates of production apps without downtime
helm rollbackRolls back a release to a previous revisionQuick recovery in case of failed deployments, improving reliability and uptime
helm listLists all Helm releases in a namespaceHelps in auditing and managing running Kubernetes apps
helm uninstallUninstalls and removes a Helm releaseSafe and clean removal of apps or microservices when decommissioning services
helm createGenerates a boilerplate Helm chart for your appStandardizes deployment templates for consistent infrastructure setup
helm templateRenders Helm templates locally without deployingUseful 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 config
  • helm install mysql bitnami/mysql – deploy MySQL as a backend
  • helm install auth-release ./auth-service – deploy .NET Auth microservice
  • helm upgrade auth-release ./auth-service – update Auth service with new features
  • helm rollback auth-release 2 – rollback to last stable version if issues found
  • helm list – list all releases for tracking and monitoring

Business Benefits:

BenefitDescription
Faster DeploymentTeams can quickly deploy complex apps across multiple environments
Version ControlApplications are versioned and can be easily rolled back
StandardizationEnsures consistent deployment standards across dev, staging, and prod
Easy TestingHelm charts can be templated and tested before deployment
ReusabilityHelm 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:

  1. 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

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *