How to Install Helm 3 on CentOS 8 Using 5 Easy Steps

Introduction

In this tutorial, we will learn how to install Helm3 on CentOS 8 using 5 Easy Steps. Kubernetes is an open source container-orchestration tool which is used to automate, scale and manage containerized applications. Kubernetes has multiple resources(deployment, statefulset, configmap, secrets etc) which are together used to create a containerized application. Each of these resources requires a dedicated YAML manifest file. Each resource can be deployed using their respective manifest file. While building a containerized application, there could be multiple resources used that needs to be deployed. Deployment these resources one by one manually becomes tedious. Hence Kubernetes uses a package manager called Helm to automate the creation, installation and management of these resources and applications. In this tutorial, we will see what is helm and how to use helm for creating and installing applications.

 

How to Install Helm 3 on CentOS 8 Using 5 Easy Steps

 

What is Helm

Helm is an open-source package manager for Kubernetes. It is a Kubernetes tool which is used for automating creation, installation and management of applications on Kubernetes cluster. With helm, we can easily create our own packages (charts) and install on any Kubernetes cluster. Helm also provides the option to rollback the install, update the installed package versions and also delete the installed packages. Let’s see how it all works.

 

Prerequisites

  • A Kubernetes cluster
  • Kubernetes cluster API endpoint must be reachable from the host where installing the helm
  • Helm installed and configured

 

NOTE:

Please note that here I have installed and configured minikube v1.23.1 on CentOS 8 for this tutorial. You can also configure multi-node cluster.

 

How to Install Helm 3 on CentOS 8 Using 5 Easy Steps

Also Read: Introduction to Python Logging Module and Logging Levels

There are different ways to install helm 3. We will install helm 3 using helm installer script. This script will automatically grab the latest  helm version and install locally.

 

Step 1: Check Minikube Status

As i am using minikube (a single node cluster) as prerequisite to install helm, it is important to check that the minikube is in healthy state. We can check the status of minikube using below command.

[stack@linuxnasa ~]$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

 

Step 2: Download Helm 3 Installation Script

We will download the latest helm installation script using curl command as shown below.

[stack@linuxnasa ~]$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
[stack@linuxnasa ~]$ ls
get_helm.sh

We are using some flags in the curl command while downloading the installation script. These flags does the below :-

f : Silently fails when there is any server errors.
s : Silent mode. Makes the curl mute i.e it will not show any progress or error message.
S : If it is sued with ‘s‘, curl will show error messages if it fails.
L : If requested page is on different server, this flag will let curl to attempt to connect to new location where requested page is placed.
o : It will write the output to a <file> instead of stdout. In this case, it will write to get_helm.sh file.

 

Step 3: Add Execute Permission to Installation Script

Give execution permission to installation script after installing it as shown below.

[stack@linuxnasa ~]$ chmod 700 get_helm.sh
[stack@linuxnasa ~]$ ll
total 16
-rwx------. 1 stack stack 11345 Jan 20 22:20 get_helm.sh

 

Step 4: Execute Installation Script

If the execution of installation script passes, it will store the helm binary in /usr/local/bin/helm path as shown below.

[stack@linuxnasa ~]$ ./get_helm.sh
Downloading https://get.helm.sh/helm-v3.11.0-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
[sudo] password for stack:
helm installed into /usr/local/bin/helm

 

Step 5: Validate Helm Install

Once the installation is completed, we can verify the same by executing command helm. If it gives the output as shown below, then our installation is successful.

[stack@linuxnasa ~]$ helm
The Kubernetes package manager

Common actions for Helm:

- helm search: search for charts
- helm pull: download a chart to your local directory to view
- helm install: upload the chart to Kubernetes
- helm list: list releases of charts

...........................................

Flags:
--burst-limit int client-side default throttling limit (default 100)
--debug enable verbose output
-h, --help help for helm
--kube-apiserver string the address and the port for the Kubernetes API server
--kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--kube-as-user string username to impersonate for the operation
--kube-ca-file string the certificate authority file for the Kubernetes API server connection
--kube-context string name of the kubeconfig context to use
--kube-insecure-skip-tls-verify if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kube-tls-server-name string server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used
--kube-token string bearer token used for authentication
--kubeconfig string path to the kubeconfig file
-n, --namespace string namespace scope for this request
--registry-config string path to the registry config file (default "/home/stack/.config/helm/registry/config.json")
--repository-cache string path to the file containing cached repository indexes (default "/home/stack/.cache/helm/repository")
--repository-config string path to the file containing repository names and URLs (default "/home/stack/.config/helm/repositories.yaml")

Use "helm [command] --help" for more information about a command.

 

Conclusion

In this tutorial we saw how to install helm 3 in CentOS 8 machine. In the next tutorial we will see how to create helm charts and install in the Kubernetes cluster.

Leave a Comment