DEVOPS  AL TASK 5(Integration of Prometheus & Grafana on the top of kubernetes)

DEVOPS AL TASK 5(Integration of Prometheus & Grafana on the top of kubernetes)

TASK OBJECTIVE :-

Integrate Prometheus and Grafana and perform in following way:

1. Deploy them as pods on top of Kubernetes by creating resources Deployment, ReplicaSet, Pods or Services.

2. And make their data to be remain persistent.

3. And both of them should be exposed to outside world.

TASK REQUIREMENT :-

  1. Minikube & kubectl cmd should be configured .
  2. concepts of kubernetes ,prometheus and grafana.
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


  • We have start the kubernetes using the minikube cmd "minikube start ".
No alt text provided for this image

After that first we have to setup the Prometheus server .

we have to create the PVC to make the data persistent of Prometheus server .

No alt text provided for this image
No alt text provided for this image


We have to deploy the Prometheus server using the PVC and Service on the top of kubernetes .

No alt text provided for this image
No alt text provided for this image

After that we have to expose the prometheus server to use webui .

No alt text provided for this image
No alt text provided for this image

After that setup the Grafana server .

we have to create the PVC to make the data persistent of grafana server .

No alt text provided for this image
No alt text provided for this image

We have to deploy the grafana server using the PVC and Service on the top of kubernetes.

No alt text provided for this image
No alt text provided for this image

After that we have to expose the Grafana server to use webui and to run queries and it help in to integrate the Prometheus and Grafana.

No alt text provided for this image
No alt text provided for this image

After that we have to run the all above files that we have created we have to ways to run these file first one is we run the all the files one by one but in this we don't achieve automation and it's also difficult to run so, we have create the one kustomization to run all above files using the cmd "kubectl create -k ." .

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

After that if we want to connect to dashboard of Prometheus And Grafana then we have to use browser and search for this following urls :-

  • For Prometheus :- https://minikubeip:30003/
  • Fo Grafana :- https://minikubeip:30004/

Prometheus Dashboard :-

No alt text provided for this image

Grafana Dashboard :-

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

After that if we want to visualize anything then we have run the query in grafana server .

if we want to delete the complete setup then we have to run cmd "kubectl delete -k ."

No alt text provided for this image


!!!Thank you soo much for reading this article !!!

This Project is Made by Priyanshu Goyal & Rishabh jain ..........

Ravi Malvia

Associate DevOps Engineer @Clouddrove Inc.

4 年

Good work

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了