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 :-
- Minikube & kubectl cmd should be configured .
- concepts of kubernetes ,prometheus and grafana.
- We have start the kubernetes using the minikube cmd "minikube start ".
After that first we have to setup the Prometheus server .
we have to create the PVC to make the data persistent of Prometheus server .
We have to deploy the Prometheus server using the PVC and Service on the top of kubernetes .
After that we have to expose the prometheus server to use webui .
After that setup the Grafana server .
we have to create the PVC to make the data persistent of grafana server .
We have to deploy the grafana server using the PVC and Service on the top of kubernetes.
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.
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 ." .
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 :-
Grafana Dashboard :-
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 ."
Associate DevOps Engineer @Clouddrove Inc.
4 年Good work