This guide covers how you can quickly get started using Helm. Obviously, you must have Kubernetes installed.
Install Helm
The Helm project provides two ways to fetch and install Helm: from the binary releases or from script. These are the official methods to get Helm releases. In addition to that, the Helm community provides methods to install Helm through different package managers (unfortunately there are no packages for CentOS).
We choose the installation via the script, that will automatically grab the latest version of Helm andinstall it locally. Let's download the script, change the permissions and launch it
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 $ chmod 700 get_helm.sh $ ./get_helm.sh
Initialize a Helm Chart Repository
Once you have Helm ready, you can add a chart repository. One popular starting location is the official Helm stable charts
$ helm repo add stable https://charts.helm.sh/stable # Make sure we get the latest list of charts $ helm repo update
Once this is installed, you will be able to list the charts you can install
$ helm search repo stable NAME CHART VERSION APP VERSION DESCRIPTION stable/acs-engine-autoscaler 2.2.2 2.1.1 DEPRECATED Scales worker nodes within agent pools stable/aerospike 0.2.8 v4.5.0.5 A Helm chart for Aerospike in Kubernetes stable/airflow 4.1.0 1.10.4 Airflow is a platform to programmatically autho... stable/ambassador 4.1.0 0.81.0 A Helm chart for Datawire Ambassador # ... and many more
Install an Example Chart
Let's briefly see a couple of basic commands. To install a chart, you can run the helm install
command. Helm has several ways to find and install a chart, but the easiest is to use one of the official stable
charts
You get a simple idea of the features of a chart, even before installing it, by running helm show chart <name_chart>
.
It's easy to see what has been released using the helm list
function, that will show you a list of all deployed releases
$ helm ls NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION mysql-1612351953 default 1 2021-02-03 11:32:36.136264337 +0000 UTC deployed mysql-1.6.9 5.7.30
Finally, to uninstall a release, use the helm uninstall
command
$ helm uninstall mysql-1612351953 [--keep-history] release "mysql-1612351953" uninstalled
This will uninstall the chart from Kubernetes, which will remove all resources associated with the release as well as the release history. If the flag --keep-history is provided, release history will be kept. In this case, you will be able to request information about that release using helm status <name_chart>
. Because Helm tracks your releases even after you've uninstalled them, you can audit a cluster's history, and even undelete a release (with helm rollback
).