Helm Chart for Prometheus and Grafana on Kubernetes
As we know, monitoring is the major demand with each and every setup. Either in terms of server setup or setting up a cloud environment. So, in this article we are going to create a Helm Chart to create the Setup of Prometheus and Grafana.
But first we need to understand what are Helm Charts and how we gonna create them?🤔
For creating a setup, we need to fulfill multiple dependencies and configuration! but that is very manual kind of setup. Suppose we need to create a web server and for that first you need to install httpd , php ,……and so on. Here you will work on each of them one by one.
Do you think, that is a good approach ??🤔
In my opinion, its not !! So for this, we create packages….means the file/code that is capable of creating the whole setup. Although in redhat, package is as good as a Software.
Hence, HELM is a Package Manager Tool 📦. It is a 3rd party tool.
In this, we call packages as Charts! So we are going to create HELM charts. A chart can help us to download and Install the software as per the requirement.
Although there are many pre-created charts by the community for different-different uses, also we can create a customized one.
Helm Chart : Setup of Prometheus and Grafana on K8s
Pre-requisite for creating a Helm chart is:
- Kubernetes Cluster(here I gonna use minikube setup)
- Helm software
* for the setup of Helm, Please refer the link below: 👇
This guide covers how you can quickly get started using Helm. The following prerequisites are required for a successful…
- After this setup, lets check the version of Helm
2. Create a directory, put the name same as your Helm Chart (say Prometheus_Grafana_on_kubernetes) and then go inside that directory.
3. For creating the chart create a YAML file with name (Chart.yaml)that will be loaded when we start creating the Helm chart.
code of Chart.yaml:
4. All the yml files for the further setup on kubernetes, we can put them in the templates folder.
You can access all the code, on the GitHub repository below:
GitHub - Anshika-Sharma-as/Task-24
Contribute to Anshika-Sharma-as/Task-24 development by creating an account on GitHub.
5. Now lets start the process of creating our Helm Chart, before that check for the existing pods or services on Kubernetes cluster
So, no helm charts are there.
Create the helm chart using “helm install <chart-name> <directory/>”
6. Check for the services, installed or not?
7. Move to the Prometheus and Grafana Dashboard:
To get that, we need to use the minikube IP using command: “minikube ip”
We can simply login and start using Grafana…😃
After the successful use you can delete it anytime and just in one go.
Now it became very simple for us to create this setup just in one go, we can use this concept while automating the things.😁
Similarly, we can have any customized Helm Chart to make our work standardized, customized and easy to perform.
Stay tuned for more such interesting technical articles….😁😁
Till the time……..⏲️