Skip to content

Kubernetes cluster monitoring using Grafana and Prometheus, with NodePort service.

Notifications You must be signed in to change notification settings

Poswark/k8s-Monitoring-Grafana-y-Prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-Monitoring-Grafana-y-Prometheus

Kubernetes cluster monitoring.

create namespaces monitoring

[root@k8s-master1]# kubectl create ns monitoring
namespace/monitoring created

Prometheus Deployment

[root@k8s-master1 kubernetes-prometheus]# kubectl create -f .
clusterrole.rbac.authorization.k8s.io/prometheus created
clusterrolebinding.rbac.authorization.k8s.io/prometheus created
configmap/prometheus-server-conf created
deployment.apps/prometheus-deployment created
service/prometheus-service created

Grafana Deployment

[root@k8s-master1 kubernetes-grafana]# kubectl create -f .
deployment.apps/grafana created
configmap/grafana-datasources created
service/grafana created

Pods must be left in runing

[root@k8s-master1 ~]# kubectl get pods -n monitoring
NAME                                     READY   STATUS    RESTARTS   AGE
grafana-548fdc7598-ns6kr                 1/1     Running   0          37s
prometheus-deployment-54686956bd-hvcjj   1/1     Running   0          6m59s 

Services must be in NodePort

 [root@k8s-master1 ~]# kubectl get svc -n monitoring
NAME                 TYPE       CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
grafana              NodePort   10.111.45.132            3000:32150/TCP   51s
prometheus-service   NodePort   10.105.135.187           8080:32100/TCP   7m13s 

We enter the grafana url, your IP

http://$IP:32150/ 

We cook Grafana with the database Alt text

We import the Dashboard kubernetes-cluster-monitoring-via-prometheus_rev3.json

 Note: On the official Grafana page we can download the Dashboard that we want 

Alt text

Revisa el tablero

Alt text

pod review in detail

Alt text

About

Kubernetes cluster monitoring using Grafana and Prometheus, with NodePort service.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published