Deploy Prometheus and Grafana on EKS cluster using Helm Chart

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
prometheus and griffon art two powerful tool that can monitor your whole kubernetes clusters hello guys today we will learn about how to set up these bad boys on eks cluster with helm chart so let's get started so i have created a cluster on eks and now let's check if the nodes are running so we can write cube ctl get nodes and we see here that all our nodes are running and now we can check if our pods are running our pods are also up now let's create namespace called prometheus we can do it through cubectl create namespace prometheus hit enter and it was created now let's check if it was created you can do it through cubectl get namespace and we see here that our namespace was created and now we can install the helm chart i can also put this into the description and we need a couple of things we will set alert manager a storage class gp2 we will set persistent volume of server as a gp2 and we will set server type as a load balancer so that we can access this outside of the cluster hit enter and it's created now now let's see here we need the server dns and let's copy this clear the screen now let's see if our resources are up do cube ctl get all and name space prometheus and we see here all our resources are up so from here we will need service promoter server and you see here it's a load balancer type and when we can copy its external ip and you can open that in your favorite browser and it's already up so now let's create a namespace for grafana same command cubectl create namespace grafana and it's created now let's check if it was created cube ctl get namespace and we have name space as gravana as well now in order to fetch data from the prometheus we need to add values file we need to create values file for the graphana so let's create a directory so we can do mkdir and make a directory call monitoring grafana and then we can do cat and put this data source values in the graphana.ml file so we need here name as a prometheus type prometheus and url as a [Music] we need here same as what you copied that from the prometheus server so now let's to help install uh here we need uh namespace graphana we can set persistent uh storage class name as a gp2 and enable it and we can set values as same uh file location and we need service type as a load balancer and it's running so this is also up let's see if all the resources are created do cube ctl get all namespace graphana and we see here that all our resources are as up as well now we can copy that address and paste it in the browser and our grafana is also up so let's give the username and password username is admin and password is but you set it up already in helm chart oh we see here that it is invalid so let's see if you are not able to get the password you can do it through this command so now we can copy and paste that and log in now so now we are logged logged in into the grifoner so let's create some dashboards here and see if all the functionalities are working let's import some dashboard let's do 3119 and load it um okay folder can be same data source prometheus imported and then we see here our kubernetes cluster monitoring dashboard so we see here all the matrices are there it's fetching its data from the prometheus so it's up and running and now we can also create another dashboard we can save it first and then let's create another dashboard okay let's do 6417 and hit load and give the data source prometheus again import it and this is the dashboard for our pods and we can monitor all the resources consumed by the pods here and we also see here that all our parts are running and how much resources are consumed now let's sign out from here now you see here that this graphana is 3.5 8.3.5 and new versions are available but uh and that is 8.4.1 so how can we change this so in order to do this we need to create a grafana value file so we can do it through helm show values and graffana the name of the chart and then send it return into the values.grafana.ml file you see here that i already have my grafana.ml file the data source file and also the values underscore grafana.ml file and the same way you can add also prometheus values file here if you want to change something so here we see that our image tag is 8.3.5 we can change here as 8.4.1 and we can save this and now we can simply do helm upgrade so here is the command for that helm upgrade and grafana grafana chart and your file location hit enter oh we see here the error just put namespace as gravana wait for some time okay it's starting up now and it's done now clear the screen and let's see if all the resources are running to cubes it will get all and name spacecraft and okay we see here that our pod is running and our new pod is creating oh we see here that we don't have external ip so let's actually solve this so we need to go back into the values underscore grafana file and there we search for service and we change type from cluster ip to load balancer we do this so that we can access it through outside of our cluster and let's also change couple of things we can change pvc and change it to true and now let's go back in the terminal and we can do again help upgrade wait for some time and it's getting up again and it's done as well so let's see if all the resources are up we can do cuba city get all minus n grafana wait for some time okay so all of our sources are up we can see our external ips added now our parts are also running so we can actually check if our pods are running or not we can simply do cubesat get parts minus and grafana so we see here now it's running so let's copy this ip and go into the browser paste it and your give your username admin and your password okay now check if the dashboard okay so we see here that our dashboards are gone this was due to because we didn't set up a persistent volume so let's add the dashboards again oh we see here that we don't have any data source we can add it directly through the grafana but the best way is to add it through the values file so let's actually go back into the value file and search for data source and we see here we need to uncomment until is default and uncomment all these lines and now also remove this and url it should be same as your prometheus server so copy it from here and paste it in the url section and now save the file go back to the terminal and now do a helm upgrade again wait for some time okay it's starting up again okay now it was done and now let's clear the screen first and see if all the resources are up okay we see that our sources are up and now we can copy the external ip and put it into the browser and we see here that our okay now let's see our dashboard first and let's import uh yeah let's import the clusters monitoring system and then okay we get our dashboard back and now let's first save it and now let's add another dashboard set prometheus imported so we see here that our another dashboard is also ready save it so it's fetching all of our data and now now we can sign out first and we also see that our version is 8.1.4 8.4.1 and now let's see let's see what happens if we delete this deployment so first get all the resources and two cube ctl delete deploy grafana and you have to give namespace graphana hit enter and deployment is deleted as well so now let's check the resources so our deployment is deleted and our pod is terminating now let's to help upgrade again okay it was upgraded and now let's clear the screen first and check if our sources are up we can do cube ctl get all minus and grafana and our resources are up and copy this ip again [Music] go back to the browser and paste it here give username admin and password and now go back to the folder and you see here that our our dashboards are still there it was not deleted when we deleted our deployment and now let's sign out so this is how you install prometheus and gravana now let's clear up the resources so we can do help uninstall prometheus namespace prometheus it's uninstalled then we can delete the namespace and now let's to uninstall grafana wait for some time and [Music] this is also done now let's clear delete the name spacecraft as well and namespace was also deleted if you have any question you can always ask me in the comment section thank you so much guys thanks for watching like and subscribe
Info
Channel: Erog
Views: 25,869
Rating: undefined out of 5
Keywords:
Id: kADwAYTErgA
Channel Id: undefined
Length: 18min 35sec (1115 seconds)
Published: Mon Feb 21 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.