Here we are going to learn how to install helm and why we are helm in DIGIT-DevOps
Before installing Helm you need to know about Yaml files. Yaml file: Yaml files (Yet Another Markup Language) are used to transmit the data in web applications. Json file: Json files (JavaScript Object Notation) are a standard text-based format to view the structured data of javascript object syntax.
JSON and YAML files are both used to transfer data between web applications. The key difference is that YAML files use indentation similar to Python to indicate the level of your code, unlike JSON.
Git (please visit the GitOps page if you haven't installed Git).
Install Visual Studio https://code.visualstudio.com/download IDE Code for better code visualization/editing capabilities
Install Golang https://go.dev/doc/install#download(required version:V1.13.3)
Kubectl (see working with Kubernetes page to install kubectl)
What is helm? helm can be defined as a . It is used to deploy (to extend) the applications and services easily into the Kubernetes cluster in the form of Helm charts.
What are helm charts? It and a file containing variables used to fill these templates based on the custom values and configurations.
Why are we using helm in DIGIT?
Greatly improved productivity
Reduced complexity of deployments
More streamlined CI/CD pipeline
Helm charts are written in YAML and contain everything your developers need to deploy a container to a Kubernetes cluster. You may be used to creating Pods, Deployments, Services etc. in Kubernetes via the kubectl create command. This way of creating objects is indeed valid and great for learning purposes. However, when running Kubernetes in production you often want to have all your objects defined as .yaml files. This makes it easier for others to know what’s running in the cluster and allows for your deployments to be version-controlled.
We have to make sure t
It is basically a set of templates and a file containing variables used to fill these templates based on the custom values and configurations.
we can create helm charts on our own. For that we have to use the command helm create <chart name>
. It will create a create a directory with files and some other directories. Those files are required to create helm chart.
We already discussed about how what is repository. Now we are going to create helm chart in DIGIT-DevOps repository which is one of the repository in eGovernments Foundation.
For that we need to clone that repository into local machine. Use the below commands to clone the repository in terminal or command prompt.
After cloning, go to helm directory and create helm chart there. cd command helps to change the directory
Finally helm creates a directory with the following layout
chart.yaml: This is where you'll put the information related to your chart. That includes the chart version, name, and description so you can find it if you publish it on an open repository.
values.yaml: Like we saw before, this is the file that contains defaults for variables.
Templates(dir): This is the place where we are storing manifest files. Everything here will be passed on and created in kubernetes.
charts: If your chart depends on another chart you own, or if you don't want to rely on Helm's default library (the default registry where Helm pull charts from), you can bring this same structure inside this directory.