You can easily deploy and manage containerized applications using the well-known open-source Kubernetes platform for container orchestration. It offers a variety of tools and features to facilitate the management, scalability, and deployment of cloud-native applications.
Helm is one of the tools that can assist you in managing applications on Kubernetes. Helm is a Kubernetes package manager that uses pre-made templates known as “charts” to streamline the installation and management of applications. These charts define the cluster resources that should be created, such as pods, services, and ingress controllers, and they offer a standardized and repeatable method for application deployment.
We’ll look at how to deploy a Kubernetes cluster using Helm in this blog post. We’ll go over the procedures for setting up Helm, locating and installing a chart, and gaining access to the deployed application. You can use Helm to deploy and manage applications on Kubernetes if you adhere to these steps.
You must first install the Helm client on your local machine before you can use Helm. Helm’s most recent version can be downloaded and installed by visiting the official website (https://helm.sh/docs/intro/install/).
The Helm client needs to be initialized on your Kubernetes cluster after it has been installed. Run the following command to accomplish this:.
This will install Tiller, the server-side component of Helm, on your cluster. Tiller is responsible for managing the releases (i.e. deployments) of your applications.
Finding a Chart
Locating a chart to deploy your application is the next step. Helm charts are templates that specify the resources, such as pods, services, and ingress controllers, that should be created in your cluster.
The Helm Chart repository (https://github.com/helm/charts) contains charts for a wide variety of applications. To find a chart that suits your needs, you can either browse the repository or use the helm search command to look for specific keywords in charts.
For instance, you can use the following command to find a chart for NGINX.
helm search nginx
This will display a list of charts that include the word “nginx” in their name or description.
Installing a Chart
Once you have found a chart that you want to use, you can install it using the helm install command. For example, to install the NGINX chart, you can run the following command:
helm install stable/nginx-ingress
Consequently, a fresh release will be made with a distinctive name (e. g. Install the application on your cluster using the name (“furious-panda”). The
--name flag allows you to give the release a unique name.
--set flag can be used to provide the chart with additional parameters. For instance, you can issue the following command to set the NGINX deployment’s replica count to 2.
helm install stable/nginx-ingress --set replicas=2
Accessing the Application
The URL or IP address of the chart can be discovered using kubectl after it has been installed. For instance, you can use the following command to discover the NGINX ingress controller’s URL:
kubectl get ingress -o wide
This will display the hostname or IP address of the ingress controller, which you can use to access the application in a web browser.
Once a chart has been installed, you can view a list of every release in your cluster using the helm list command. For instance, you can use the following command to view the releases for the NGINX chart.
helm list --all --short
A list of releases will be shown along with their titles and current statuses. To view more thorough information about a particular release, use the helm status command. Run the following command, for instance, to see the status of the “phoenix-bird” release.
helm status phoenix-bird
Upgrading and Rollbacking Releases
The helm upgrade command can be used to upgrade a release to a new version if changes need to be made. The following command, for instance, can be used to update the “phoenix-bird” release to a newer version of the NGINX chart.
helm upgrade phoenix-bird stable/nginx-ingress
If you need to roll back a release to a previous version, you can use the helm rollback command. For example, to roll back the “phoenix-bird” release to the previous version, you can run the following command:
helm rollback phoenix-bird
If you no longer need a release, you can use the helm uninstall command to uninstall it from your cluster. For example, to uninstall the “phoenix-bird” release, you can run the following command:
helm uninstall phoenix-bird
By doing this, you can remove from your cluster all the resources that the chart generated.
In this blog post, we looked at using Helm to deploy and manage applications on Kubernetes. The installation and management of applications in a Kubernetes cluster are made easier by the potent tool Helm. Without having to manually create and manage each individual resource, charts make it simple to deploy and manage applications
Leave a Reply