The Helm tool was invented primarily to solve all these issues. It acts as a package manager and simplifies deploying the application on a Kubernetes cluster. You can also use Helm Charts (Helm packages) to create templates for describing applications and automate the process of launching new apps. Find out more about how to use a Helm with Kubernetes below.
Table of Contents
Main Benefits of Using Helm Charts for Kubernetes Applications Deploying
Helm is a package manager that automates the installation and configuration of the software you need. In addition, with Helm, you can create directories for the applications you are using.
Helm is also a templating engine that helps parameterize files. In the situation with YAML files in Kubernetes, you can substitute placeholders in them and use Helm Charts to automate their filling (in fact, these will be templates with autocomplete).
So, what benefits will you get when deploying the Kubernetes application using Helm Charts?
- Advanced features for grouping manifests;
- Built-in templating features;
- Easier installing process for applications from Helm Chart with default values;
- Building the app catalogues similar to package repositories.
Benefits of Using Helmbay
Helmbay is an advanced private Helm Chart repository. Its main advantages are:
- Improved usability. Helmbay aims to optimize chart usability with perfect UI and API, lowering the entry threshold and adapting the product for beginner DevOps professionals;
- Several access control tiers for users. The tool solves the problem of access control. You can assign different access levels for different groups of users (view/edit/install) and create new user accounts according to the previously created distribution list for access rights;
- Multi-repository setups. As for repositories, Helmbay provides possibilities to create a lot of them. At the same time, you can configure access rights to each repository individually;
- Git integration. Helmbay also has integration with this tool to make it easier for you to manage software versions;
- Private repository and app catalog. Helmbay is perfectly suited for collaboration and contains advanced tools for sharing and setting access rights for different users;
- API and third-party apps compatibility (including Chartmuseum API). Finally, Helmbay is compatible with the Chartmuseum API and other useful APIs that will help speed up the software deployment automation and other operations included in the list of CI/CD specialists.
You can try the Helmbay tool for free right now.
Looking for a Helm Repository?
Helmbay provides an enterprise-ready helm repository for free. Add your teammates, upload unlimited versions of the charts, connect to any modern GitOps or CI/CD tool.
Prerequisites for Using Helm Charts
- a Kubernetes cluster;
- kubectl (the Kubernetes command-line tool) and optionally Kubernetes IDE like Lens;
- Installing and configuring Helm.
Kubernetes Deployment Using Helm Charts
There are seven steps to deploy applications on Kubernetes with Helm Charts.
#1 Get the app source code
First, you need to copy the source code into the tutorials repository using the following CLI instructions:
git clone https://github.com/bitnami/tutorials
cd tutorials/go-k8s
Note that further, the Go binary will appear. If Go is preinstalled on your PC, build this file like this:
GOOS=linux GOARCH=amd64 go build -tags netgo -o http-sample
Next, create a copy of the binary in the appropriate folder:
cd http-sample tutorials/go-k8s/app-code
Let’s add the Go-generated file to your Docker image.
#2 Create the image
Run the following commands to build the Docker image:
docker build -t USERNAME/go-k8s:0.1.0 .
As a result, you get:
todo: output of docker build command
#3 Publish the image
Upload the generated Docker image to a registry such as Docker Hub. Transfer the image to your account, specifying your personal names. To do this, open it with the following commands:
docker login
docker push DOCKER_USERNAME/go-k8s:0.1.0
Check if the image is visible on the repository dashboard.
#4 Build the Helm Chart
Create a new Chart by entering the *helm create* command. On its basis, you can build your Chart.
mkdir helm-chart
cd helm-chart
helm create go-k8s
It will create a new Chart from a default template in ./helm-chart/go-k8s directory.
To make helm run your application you will need to edit values.yaml:
image:
repository: DOCKER_USERNAME/go-k8s
tag: 0.1.0
#5 Deploy the test version of your app in Kubernetes
Check if your Kubernetes cluster is available. Enter the following command:
kubectl cluster-info
Now you will need to deploy your Go application there. You need to install the Helm Chart with the preferred release name to create the module:
helm install my-app ./helm-chart/go-k8s
Make sure the application setup is complete. You can find out which Kubernetes pods are running with this command:
kubectl get pods
todo: output of helm install
Finally, you’ve deployed your application to Kubernetes.
#6 Update the code and the Chart
To update the source code and Chart, you first need to compile the resulting binary and place it in the tutorials/go-k8s/app-code folder. You need to create a new image, designating it as follows:
docker build -t USERNAME/go-k8s:0.2.0
Check if you are logged into the Docker Hub. If so, you should now be able to start a new image:
docker push USERNAME/go-k8s:0.2.0
Now open the helm-chart/go-k8s/folder. Now you will have to make some changes to values.yaml:
image:
repository: USERNAME/go-k8s
tag: 0.2.0
pullPolicy: IfNotPresent
Enter the Helm upgrade instruction in the CLI and specify the same release name:
helm upgrade my-app helm-chart/go-k8s
Now you can refresh the URL to see the updates.
#7 Publish the Helm Chart into the repository
Publish your Chart into the repository to complete your task.
Why Use Helm Charts: 5 Common Issues DevOps May Face while Deploying Kubernetes
- DevOps take a lot of time and effort to deploy a separate environment in order to test the application in real conditions and analyze the problems that users face;
- DevOps beginners have to deal with some pitfalls before they figure out how to manage and update containerized applications deployed with Kubernetes;
- The deployment procedure may be overly complex due to numerous modules and other components;
- Sometimes DevOps specialists have to perform redundant manipulations.
Deploy Application on Kubernetes With Helmbay
Final Thoughts
As you can see, Helm is a powerful and somewhat complex tool. However, we hope that with the help of our article, you’ve learned about creating a Kubernetes deployment using Helm Charts. Thus, you will greatly simplify this process. You can check our useful packaging solution in action right now for free.
FAQ
Finally, let’s answer the most frequent questions associated with Helm Chart for Kubernetes deployment.
What are the main issues of using Kubernetes?
First, the need for software packaging. As the complexity progresses, applications become overgrown with new services that should be packaged rather than stored separately. Second, management problems as managing applications containerized with Kubernetes is complex enough without third-party tools. Third, problems with updating the software life cycle. The software life cycle does not end after installing or deploying an application. It continues to live and needs to be updated. With Kubernetes only, it is hard to implement.
All these tasks can be solved using Helm to deploy to Kubernetes.
What are the main steps of the Kubernetes app deploying process?
Here are the 9 main steps to deploy to Kubernetes with Helm. The first three of them are to configure a cluster, deploy an app using Kubernetes, and create a Dockerfile. Read our article to learn all 9 steps.
What are the main benefits of Helm Charts?
Managing applications in Kubernetes is challenging, and Helm makes it much simpler by providing easy-to-use software packaging tools that support version control. This powerful tool can also install and manage packages (this is called Charts and contains all the resource definitions needed to run an application, tool, or service within a cluster) for Kubernetes.