Previous Database Replication & Sharding NET-Architecture-Overview Next

All about Helm

What is Helm?

Helm is a package manager for Kubernetes that simplifies the process of defining, installing, and managing applications. It is often compared to package managers for Linux, such as apt or yum, but for Kubernetes applications. Instead of manually creating and managing dozens of configuration files for complex applications, Helm bundles all the necessary resources into a single package called a Charts.

Key concepts

  • Charts: A collection of files that define the resources needed for a Kubernetes application, versioned and shareable.
  • Templates: Go templates used within charts to create customizable Kubernetes manifest files.
  • Values: Configuration parameters for a chart, defined in a values.yaml file, allowing reuse across environments.
  • Release: A running instance of a chart deployed on a Kubernetes cluster, managed independently with a unique name.
  • Repositories: Collections of charts for sharing and distribution, such as Artifact Hub which hosts charts for popular applications.

How Helm works

  1. Obtain a chart (pre-existing or custom).
  2. Define configuration settings using a values.yaml file.
  3. Install the chart using helm install, which renders templates with defined values into Kubernetes manifests.
  4. Helm interacts with the Kubernetes API to deploy and manage the application, including versioning for upgrades and rollbacks.

Benefits of using Helm

  • Simplifies managing complex applications with many YAML files.
  • Promotes reusability of charts across projects and environments.
  • Ensures consistent and reliable deployments through standardized charts.
  • Provides application lifecycle management with versioning and rollback capabilities.
  • Integrates well with CI/CD pipelines for automated deployments.

Basic Helm Commands

  • helm install <release-name> <chart-name> – Install a chart
  • helm upgrade <release-name> <chart-name> – Upgrade a release
  • helm rollback <release-name> <revision> – Rollback to a previous version
  • helm list – List all releases
  • helm uninstall <release-name> – Remove a release

Example: Deploying Nginx with Helm

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-nginx bitnami/nginx

Helm Commands and Their Details

📦 Chart Management

  • helm create <chart-name> – Create a new chart with default structure
  • helm lint <chart-path> – Validate the chart for syntax and structure
  • helm package <chart-path> – Package the chart into a .tgz file
  • helm show chart <chart-name> – Show chart metadata
  • helm show values <chart-name> – Show default values of the chart
  • helm show readme <chart-name> – Show README file of the chart

🚀 Install, Upgrade, and Uninstall

  • helm install <release-name> <chart> – Install a chart as a release
  • helm upgrade <release-name> <chart> – Upgrade an existing release
  • helm upgrade --install <release-name> <chart> – Install if not present, else upgrade
  • helm uninstall <release-name> – Remove a release from the cluster

🔁 Rollback and History

  • helm rollback <release-name> <revision> – Roll back to a previous release version
  • helm history <release-name> – View release history

🔍 Search and Repositories

  • helm repo add <repo-name> <repo-url> – Add a chart repository
  • helm repo update – Update chart repositories
  • helm repo list – List all added repositories
  • helm repo remove <repo-name> – Remove a repository
  • helm search repo <keyword> – Search charts in added repositories
  • helm search hub <keyword> – Search charts in Helm Hub

📄 Get Release Information

  • helm get all <release-name> – Get all release details
  • helm get values <release-name> – Get values used in the release
  • helm get manifest <release-name> – Get Kubernetes manifest of the release
  • helm get notes <release-name> – Get post-install notes

🧪 Testing and Debugging

  • helm test <release-name> – Run tests defined in the chart
  • helm install --dry-run --debug – Simulate an install for debugging

📦 Dependency Management

  • helm dependency update <chart-path> – Update chart dependencies
  • helm dependency build <chart-path> – Build dependencies locally
  • helm dependency list <chart-path> – List chart dependencies

📊 Status and Version

  • helm status <release-name> – Show status of a release
  • helm version – Show Helm client version

🧰 Miscellaneous

  • helm template <release-name> <chart> – Render chart templates locally
  • helm plugin list – List installed Helm plugins
  • helm plugin install <url> – Install a Helm plugin
Back to Index
Previous Database Replication & Sharding NET-Architecture-Overview Next
*