Helm is a package manager for Kubernetes. This guide covers how you can quickly get started using Helm. Obviously, you must have Kubernetes installed. The official guide is available here.
Install Helm
The Helm project provides two ways to fetch and install Helm: from the binary releases (in this case you can choose a specific version) 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 CentOSRockyLinux).
We choose the installation via the script, that will automatically grab the latest version of Helm and install it locally. Let's download the script, change the permissions and launch it
Code Block | ||||
---|---|---|---|---|
| ||||
$ 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
Code Block | ||||
---|---|---|---|---|
| ||||
$ helm repo add stable https://charts.helm.sh/stable # Make sure we get the latest list of charts $ helm repo update # List chart repositories $ helm repo ls NAME URL stable https://charts.helm.sh/stable |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ 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
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$ helm uninstall mysql-1612351953 [-n <namespace>] [--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 history
is provided, release history will be kept. In this case, you will be able to request information about that release using helm status <chart_name>
. 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
).