Lädt...


🔧 Setting Up Monitoring on Amazon EKS: Deploying Prometheus and Grafana


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Monitoring is a critical aspect of managing Kubernetes workloads. This blog guides you through setting up Prometheus and Grafana on an Amazon EKS cluster to monitor cluster resources and application performance effectively. We will also address potential challenges like storage provisioning and showcase the seamless integration between Prometheus and Grafana.

Step 1: Create an Amazon EKS Cluster

We assume you are starting with an Amazon EKS cluster. Here's how you can create one using eksctl.

EKS Cluster Configuration File

Create a file named cluster.yml with the following content:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: basic-cluster
  region: us-west-2

nodeGroups:
  - name: ng-1
    instanceType: m5a.large
    desiredCapacity: 2
    volumeSize: 30
    ssh:
      allow: false
    iam:
      withAddonPolicies:
        ebs: true
        cloudWatch: true
  - name: ng-2
    instanceType: m5a.large
    desiredCapacity: 2
    volumeSize: 30

iam:
  withOIDC: true`

Run the following command to create the cluster:

eksctl create cluster -f cluster.yml

Step 2: Install the AWS EBS CSI Driver Add-On

Prometheus requires persistent storage for metrics data. To dynamically provision Amazon EBS volumes, install the AWS EBS CSI Driver add-on.

eksctl create addon \
  --name aws-ebs-csi-driver \
  --cluster basic-cluster \
  --region us-west-2

Why the AWS EBS CSI Driver is Required?
The EBS CSI Driver enables Kubernetes to manage EBS volumes dynamically. Prometheus uses PersistentVolumeClaims (PVCs) to request storage, and without this driver, the PVCs cannot bind to an EBS volume, leaving the Prometheus pods in a Pending state.

Step 3: Deploy Prometheus

First, create a dedicated namespace for Prometheus:

kubectl create namespace prometheus

Add the Prometheus Community Helm repository and update Helm:

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update prometheus-community

Install Prometheus with persistent storage using Helm:

 helm upgrade -i prometheus prometheus-community/prometheus \
    --namespace prometheus \
    --set alertmanager.persistence.storageClass="gp2" \
    --set server.persistentVolume.storageClass="gp2" \
    --set server.service.type=LoadBalancer

Ensure all Prometheus pods are running:

kubectl get pods -n prometheus

Image description

Prometheus is exposed via a LoadBalancer service. To access the Prometheus server UI:

kubectl get svc -n prometheus

Open your web browser and navigate to EXTERNAL-IP

Image description

Step 4: Deploy Grafana

Grafana provides advanced visualization capabilities and integrates seamlessly with Prometheus.

Add the Grafana Helm repository and update Helm:

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

Deploy Grafana with persistent storage:

helm upgrade -i grafana grafana/grafana \
  --namespace prometheus \
  --set persistence.storageClassName="gp2" \
  --set persistence.enabled=true \
  --set adminPassword="admin123" \
  --set service.type=LoadBalancer

Retrieve the LoadBalancer IP for Grafana:

kubectl get svc -n prometheus | grep grafana

Image description

Step 5: Import Dashboard in Grafana

  1. Ensure you have imported the 15661 dashboard into Grafana:
  2. Navigate to Dashboards > Import.
  3. Enter 15661 in the import dialog and select the data source (Prometheus).
  4. Save the imported dashboard.

Image description

...

🔧 Setting Up Monitoring on Amazon EKS: Deploying Prometheus and Grafana


📈 72.3 Punkte
🔧 Programmierung

🔧 Setting Up Grafana, Prometheus, and ELK for Monitoring and Logging in AWS EKS


📈 60.15 Punkte
🔧 Programmierung

🔧 Deploying Prometheus and Grafana using Helm in EKS


📈 53.55 Punkte
🔧 Programmierung

🔧 Day 2 - Setting Up Prometheus and Grafana on Amazon EKS


📈 53.54 Punkte
🔧 Programmierung

🔧 EKS cluster Monitoring for AWS Fargate with Prometheus and managed Grafana


📈 50.66 Punkte
🔧 Programmierung

🔧 Setting Up DevOps Monitoring and Automation with Jenkins, Prometheus, Grafana, and Docker


📈 45.99 Punkte
🔧 Programmierung

🔧 Setting Up a Monitoring Stack with Nginx Logging Using Grafana, cAdvisor, Promtail, Prometheus, and Loki


📈 44.75 Punkte
🔧 Programmierung

🔧 Setting Up MySQL on Kubernetes with Prometheus & Grafana Monitoring


📈 43.51 Punkte
🔧 Programmierung

🔧 How to Optimize Performance and Cost for Prometheus & Grafana Pods on EKS Fargate


📈 42.72 Punkte
🔧 Programmierung

🔧 EKS & NGINX Load Balancer Monitor with Prometheus, Grafana, and Alerts


📈 42.72 Punkte
🔧 Programmierung

🔧 Simplify your EKS Cluster Observability with Prometheus & Grafana


📈 41.48 Punkte
🔧 Programmierung

🔧 Golang com Opentelemetry, prometheus, Grafana tempo OSS e Grafana padrão


📈 40.24 Punkte
🔧 Programmierung

🔧 Grafana Labs releases Grafana 11, Loki 3.0, and a new open source project called Grafana Alloy


📈 40 Punkte
🔧 Programmierung

🔧 Deploying Prometheus and Grafana as Applications using ArgoCD — Including Dashboards


📈 39.39 Punkte
🔧 Programmierung

📰 Mehrere Probleme in grafana-piechart-panel, grafana-status-panel und grafana (SUSE)


📈 38.76 Punkte
📰 IT Security Nachrichten

🕵️ Grafana up to 6.3.6 on Red Hat /etc/grafana/grafana.ini information disclosure


📈 38.76 Punkte
🕵️ Sicherheitslücken

🔧 Day 14: Advanced Logging and Monitoring with Prometheus, Grafana, and Alertmanager (Termux Edition!)


📈 37.75 Punkte
🔧 Programmierung

🔧 DevOps Monitoring and Automation Tool using Jenkins, Prometheus, Grafana and Docker


📈 37.75 Punkte
🔧 Programmierung

🔧 Project Documentation: Monitoring and Logging with Prometheus and Grafana


📈 37.75 Punkte
🔧 Programmierung

🔧 Why Prometheus and Grafana are Essential for Monitoring in DevOps and How They Enhance the SDLC


📈 37.75 Punkte
🔧 Programmierung

🔧 Kubernetes Metrics and Monitoring with Prometheus and Grafana


📈 37.75 Punkte
🔧 Programmierung

🔧 Building Observability and Monitoring for Modern Applications with Actuator, Prometheus and Grafana


📈 37.75 Punkte
🔧 Programmierung

🐧 How To Setup Prometheus | Prometheus For Monitoring.


📈 36.74 Punkte
🐧 Linux Tipps

🔧 Monitoring Linux instances with Prometheus and Grafana


📈 36.5 Punkte
🔧 Programmierung

🎥 Matrix Tutorial #12 — Monitoring Synapse with Prometheus and Grafana


📈 36.5 Punkte
🎥 Video | Youtube

🔧 PM2 module to monitoring node.js application with export to Prometheus and Grafana


📈 36.5 Punkte
🔧 Programmierung

🔧 Achieving Kubernetes Monitoring Nirvana: Prometheus and Grafana Unleashed


📈 36.5 Punkte
🔧 Programmierung

📰 Linux System Monitoring with Prometheus, Grafana, and collectd


📈 36.5 Punkte
🐧 Unix Server

🔧 Monitoring API Performance with Express, Prometheus, and Grafana


📈 36.5 Punkte
🔧 Programmierung

🔧 Monitoring MySQL with Prometheus and Grafana in Docker


📈 36.5 Punkte
🔧 Programmierung

🔧 Monitoring Your Server with Prometheus, Node Exporter, and Grafana Using Docker


📈 36.5 Punkte
🔧 Programmierung

matomo