Helm simplifies Kubernetes application deployment by introducing the concept of the helm chart, a package containing YAML files and templates that generate Kubernetes manifest files. Helm acts as a package manager for Kubernetes, offering several useful command-line tools for the Kubernetes application management.
In this tutorial, you will learn how to use
helm install, the Helm command for installation of charts in a Kubernetes cluster.
- A Kubernetes cluster
- Helm 3 installed
Helm Install Command Syntax
helm install command is followed by the release name, the path to the chart, and the optional flags:
helm install [release-name] [chart] [flags]
Note: You can give the release any name you want.
Some useful flags are:
|Deletes the installation in case the process fails. The flag also automatically sets the |
|Creates the namespace for the release if it has not previously existed.|
|Runs Helm dependency update before the installation.|
|Performs a simulation of the installation process for testing purposes.|
|Generates a release name. The |
|Shows the installation help file.|
|Prints the output in one of the allowed formats - YAML, JSON, or the table (default).|
|Provides space to set values directly in the command line. Multiple values are allowed.|
|Takes values from the file or URL the user specifies. Multiple values sources are allowed.|
|Verifies the package before its use.|
|Lets the user specify the exact chart version (for example, |
|Waits for the system to be in the ready state before marking the release as successful. The waiting time is specified with the |
Installing Charts with Helm Install Command
The steps for installing an app with Helm include obtaining a helm chart and issuing the
helm install command referencing that chart.
Step 1: Find or Create a Helm Chart
To install a helm chart, you either have to find it online or create a helm chart yourself. You can obtain them in online repositories or the Artifact Hub. For more information about adding Helm repositories, read how to add, update or remove a Helm repo.
helm repo add command to add the helm repository containing the chart you wish to install:
helm repo add [repository-name] [repository-address]
In the example bellow, we add the repo for Jenkins, an open-source automation server:
Update the repositories on your system:
helm repo update
helm search command to search for the charts in the local repositories:
helm search repo [chart]
Make a note of the chart name and proceed with the following step.
Step 2: Install a Chart with helm install Command
There are multiple ways to use the
helm install command for installing a helm chart. The most common is utilizing the chart reference given in the
NAME section of the
helm search output.
For example, using the syntax explained in the section above, install Jenkins by typing:
helm install jenkins jenkins/jenkins
The chart reference consists of a repository prefix and the chart name. In the example above, Helm searches the repo named jenkins for the chart of the same name before proceeding with the installation.
The output confirms the successful chart deployment:
There are more ways to tell Helm where to look for a chart. Aside from a chart reference, you can also provide:
- The path to a packaged chart:
helm install jenkins ./jenkins-1.2.3.tgz
- The path to a directory containing an unpacked chart:
helm install jenkins-deployment ./jenkins-archive
- The absolute URL:
helm install jenkins https://example.com/charts/jenkins-1.2.3.tgz
- The chart reference and the URL of the repository:
helm install --repo https://example.com/charts/ jenkins-deployment jenkins
Check the Status
To check the status of a release, use the following command:
helm status [release-name]
The output is similar to the output of the
helm install command. It provides information on the last deployment time, the namespace of the release, its status, number of revisions, and other applicable details. If the
STATUS section of the report says
deployed, the release has been successfully deployed and is ready for use.
The steps in this tutorial showed you how to use the
helm install command to deploy an app on your Kubernetes cluster. The article also included many useful options for customizing the
helm install command.
To learn more about other Helm commands refer to our Helm Commands Cheat Sheet.