Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.
This details how to install Helm on your system.
-
Helm should be available in your software repository by default. Install the
helm
package using your package manager (i.e.apt
). -
Alternatively, you can install Helm through source:
-
Clone the Helm repository to your home directory:
git clone https://github.com/helm/helm.git ~/.helm
-
Enter the local Helm repository (i.e.
~/.helm
):cd ~/.helm
-
Build the Helm binary:
make
-
This details how to add, update, or remove a Helm chart repository on your system and query available Helm charts to install.
This details how to add a Helm chart repository to your system:
-
Use the following command to add a public Helm chart repository to your system:
helm repo add <repo> <repo-source>
Replace
<repo>
and<repo-source>
with the (arbitrary) name of the chart repository (i.e.examples
) and the source of the repository (i.e.https://helm.github.io/examples
) respectively. For example:helm repo add examples https://helm.github.io/examples
-
Alternatively, if the Helm chart repository is private, you can use the following command to add it to your system:
helm repo add <repo> <repo-source> --username <repo-user> --password <repo-password>
Replace
<repo-user>
and<repo-password>
with the right user credentials which has access to the Helm chart repository. -
Update the chart repository to ensure it is up-to-date.
This details how to update a Helm chart repository on your system:
-
Use the following command to update a Helm chart repository on your system:
helm repo update <repo>
Replace
<repo>
with the name of the chart repository (i.e.examples
). For example:helm repo update examples
-
Alternatively, remove the chart repository name from the same command to update all Helm chart repositories on your system:
helm repo update
This details how to remove a Helm chart repository from your system:
-
Use the following command to remove a Helm chart repository from your system:
helm repo remove <repo>
Replace
<repo>
with the name of the chart repository (i.e.examples
). For example:helm repo remove examples
-
(Optional) To remove more than one chart repository, simply add their names each separated by a space:
helm repo remove <repo1> <repo2>
-
Verify the Helm chart repository has been removed by listing available Helm chart repositories on your system:
helm repo list
This details how to search or deploy a Helm chart.
This details how to show available Helm charts from a Helm chart repository:
-
Use the following command to show available Helm charts from a Helm chart repository on your system:
helm search repo <repo>
Replace
<repo>
with the name of the chart repository (i.e.examples
). For example:helm search repo examples
-
Alternatively, remove the chart repository name from the same command to show available Helm charts from all Helm chart repositories on your system:
helm search repo
Note
This section of the guide assumes that you have added a Helm chart repository to your system.
This details how to install a Helm chart or upgrade an existing Helm release:
-
Prepare the values file (i.e.
values.yaml
) for the Helm chart or release you wish to install or upgrade. -
Use the following command to install or upgrade a Helm chart:
helm upgrade --install --wait --kube-context <cluster> --namespace <namespace> <release> <chart-repo>/<chart> --values values.yaml
Replace
<cluster>
,<namespace>
,<release>
,<chart-repo>
, and<chart>
with the name of the cluster (i.e.my-cluster
), namespace (i.e.default
), release (i.e.hello-world-app
), chart repository (i.e.examples
), and chart itself (i.e.hello-world
) respectively. For example:helm upgrade --install --wait --kube-context my-cluster --namespace default hello-world-app examples/hello-world --values values.yaml
-
(Optional) If you wish to deploy the Helm chart to a specific namespace you have not created, simply include the following flag to the same command:
--create-namespace
-
(Optional) If you wish to deploy the Helm chart of a specific version, simply include the following flag to the same command:
--version <chart-version>
Replace
<chart-version>
with the version number (i.e.0.1.0
) of the Helm chart to deploy.
Caution
Uninstalling a Helm release will irreversibly delete all the resources associated with it, including any persistent data.
This details how to remove or uninstall a Helm release you have deployed:
-
Uninstall the Helm release from the cluster by using the following command:
helm uninstall --wait --kube-context <cluster> --namespace <namespace> <release>
Replace the
<cluster>
,<namespace>
, and<release>
placeholders with the same values you had used to deploy it. For example:helm uninstall --wait --kube-context my-cluster --namespace default hello-world-app
-
Verify that the Helm release has been removed by listing all Helm releases on the namespace:
helm ls --kube-context <cluster> --namespace <namespace> | grep "<release>"
If this command returns nothing, the Helm release has been removed successfully.
This details how to get Helm values from a Helm chart or deployment (release).
This details how to get the default Helm values from a Helm chart:
-
Use the following command to get the default values of a Helm chart:
helm show values <chart-repo>/<chart>
Replace
<chart-repo>
and<chart>
with the name of the chart repository (i.e.examples
) and chart itself (i.e.hello-world
) respectively. For example:helm show values examples/hello-world
If you need the values of a specific chart version, simply include the version number (i.e.
0.1.0
) to the command like so:helm show values <chart-repo>/<chart> --version <chart-version>
-
(Optional) If you wish to save the values to a file, simply send it to the desired location (i.e.
values.yaml
):helm show values <chart-repo>/<chart> > values.yaml
This details how to get the values of a Helm release:
-
Use the following command to get the values of a Helm release:
helm --kube-context <cluster> --namespace <namespace> get values <release>
Replace
<cluster>
,<namespace>
, and<release>
with the name of the cluster (i.e.my-cluster
), namespace (i.e.default
), and release (i.e.hello-world-app
) respectively. For example:helm --kube-context my-cluster --namespace default get values hello-world-app
-
(Optional) If you wish to save the values to a file, simply send it to the desired location (i.e.
values.yaml
):helm --kube-context <cluster> --namespace <namespace> get values <release> > values.yaml
This details how to update a Helm values file before installing or upgrading a release:
-
If you are installing a Helm chart for the first time, get the Helm chart values (latest or of a specific version) as a
values.yaml
file.Alternatively, if you are upgrading an existing Helm release, get its Helm release values as a
values.yaml
file. -
Update the Helm
values.yaml
file with the intended configurations for your deployment:nano values.yaml
Refer to the official documentations when possible and pay extra attention to the descriptions and sample values provided.
-
Save changes made to the values file. Install or upgrade the intended Helm chart or release using the file to apply it.