Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.45 KB

L17-Prometheus_and_Grafana_setup.md

File metadata and controls

53 lines (41 loc) · 1.45 KB

Prometheus setup

pre-requisites

  1. Kubernetes cluster
  2. helm

Setup Prometheus

  1. Create a dedicated namespace for prometheus

    kubectl create namespace monitoring
  2. Add Prometheus helm chart repository

    helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 
  3. Update the helm chart repository

    helm repo update
    helm repo list
  4. Install the prometheus

     helm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring
  5. Above helm create all services as ClusterIP. To access Prometheus out side of the cluster, we should change the service type load balancer

    kubectl edit svc prometheus-kube-prometheus-prometheus -n monitoring
    
  6. Loginto Prometheus dashboard to monitor application https://ELB:9090

  7. Check for node_load15 executor to check cluster monitoring

  8. We check similar graphs in the Grafana dashboard itself. for that, we should change the service type of Grafana to LoadBalancer

    kubectl edit svc prometheus-grafana
  9. To login to Grafana account, use the below username and password

    username: admin
    password: prom-operator
  10. Here we should check for "Node Exporter/USE method/Node" and "Node Exporter/USE method/Cluster" USE - Utilization, Saturation, Errors

  11. Even we can check the behavior of each pod, node, and cluster