Home > Other External Packages > helm

helm: Kubernetes Package Manager

Helm is a package manager used to define, install, and upgrade Kubernetes applications. It uses a packaging format called 'Charts' to help deploy and manage complex applications easily. It is an essential tool for simplifying application deployment and lifecycle management in Kubernetes environments.

Overview

Helm is an essential tool for deploying and managing applications on a Kubernetes cluster. You can search for applications in chart repositories, install them, and perform upgrades and rollbacks through version control. This allows you to manage complex Kubernetes resources as a single logical unit.

Key Features

The core features provided by Helm are as follows:

  • Kubernetes Application Packaging (Charts)
  • Chart Repository Management and Search
  • Application Deployment, Upgrade, and Rollback
  • Release Management and History Tracking
  • Flexible Configuration through Templates

Installation

Helm is not included by default in most Linux distributions, so it needs to be installed manually. Here are common installation methods.

Installation using Script (Recommended)

curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

This is the most common and recommended method to install Helm using the official installation script.

Installation using Homebrew (macOS/Linux)

brew install helm

If you are using the Homebrew package manager, you can install Helm with the following command.

Installation using apt (Debian/Ubuntu)

curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm

On Debian or Ubuntu-based systems, you can install Helm through the apt package manager.

Key Subcommands

Helm commands allow for flexible management of Kubernetes applications through various subcommands. Here are the frequently used key subcommands.

Release Management

Chart Management

Information Retrieval

Generated command:

Try combining the commands.

Description:

`helm` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Here are some examples of managing Kubernetes applications using Helm's key features.

Add Chart Repository

helm repo add bitnami https://charts.bitnami.com/bitnami

Adds the Bitnami chart repository to enable the use of various application charts.

Update Chart Repositories

helm repo update

Updates the information for all added chart repositories to the latest state.

Search Charts

helm search repo nginx

Searches for charts containing the keyword 'nginx' in the repositories.

Install Chart

helm install my-nginx bitnami/nginx

Installs the Nginx chart from Bitnami with the name 'my-nginx'.

List Releases

helm list

Checks the list of all Helm releases currently deployed on the Kubernetes cluster.

Upgrade Release

helm upgrade my-nginx bitnami/nginx --set service.type=NodePort

Upgrades the existing 'my-nginx' release, changing the Nginx service type to NodePort.

Uninstall Release

helm uninstall my-nginx

Removes the 'my-nginx' release and all associated Kubernetes resources.

Tips & Precautions

Tips and precautions for effectively using Helm and preventing potential issues.

Helm Chart Development and Validation

Useful tips when developing your own charts or modifying existing ones.

  • Use the `helm create <chart-name>` command to generate a basic chart structure, then modify `values.yaml` and template files to define your application.
  • Use `helm lint <chart-path>` to validate your chart and identify potential errors or warnings in advance. This greatly helps in resolving issues before deployment.

Safe Release Management

Methods to reduce risks during deployment and upgrades.

  • When using `helm install` or `helm upgrade`, combine it with the `--dry-run --debug` options to preview the rendered YAML manifests before actual deployment. This is very useful for identifying unexpected changes or errors beforehand.
  • Starting from Helm 3, the `--purge` option is no longer required for release uninstallation; all resources are removed by default. To keep the release history, use `helm uninstall --keep-history <release-name>`.

Specifying Namespaces

How to deploy releases to a specific Kubernetes namespace.

  • Description: Use the `--namespace <namespace-name>` option with `helm install` or `helm upgrade` to deploy a release to a specific namespace. If the namespace does not exist, you can automatically create it by adding the `--create-namespace` option.

Same category commands