Skip to content

Kubernetes monitoring stack using Prometheus, Grafana, Node Exporter, and Kube State Metrics deployed via Helm on AWS EKS.

Notifications You must be signed in to change notification settings

ahsan598/capstone-project-1-monitoring-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Setup Monitoring on EKS with Prometheus & Grafana Using Helm

This guide installs a full monitoring stack using kube-prometheus-stack, which includes:

  • Prometheus
  • Grafana
  • AlertManager
  • Node Exporter
  • Kube State Metrics We also expose Prometheus & Grafana via LoadBalancer for easy access.

Installing Monitoring Tools on EKS

  1. Create values.yaml for Custom Configuration

  2. Paste the following configuration

# values.yaml for kube-prometheus-stack

alertmanager:
  enabled: false

prometheus:
  prometheusSpec:
    service:
      type: LoadBalancer
    storageSpec:
      volumeClaimTemplate:
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 5Gi
  additionalScrapeConfigs:
    - job_name: node-exporter
      static_configs:
        - targets:
            - node-exporter:9100
    - job_name: kube-state-metrics
      static_configs:
        - targets:
            - kube-state-metrics:8080

grafana:
  enabled: true
  service:
    type: LoadBalancer
  adminUser: admin
  adminPassword: admin123

prometheus-node-exporter:
  service:
    type: LoadBalancer

kube-state-metrics:
  enabled: true
  service:
    type: LoadBalancer

Note: Grafana admin credentials are defined in this file.

  1. Install Prometheus & Grafana Using Helm
helm upgrade --install monitoring prometheus-community/kube-prometheus-stack \
  -f values.yaml \
  -n monitoring \
  --create-namespace

Monitoring Tools

  1. Patch Services to Use LoadBalancer (Optional but Recommended)
kubectl patch svc monitoring-kube-prometheus-prometheus -n monitoring \
  -p '{"spec": {"type": "LoadBalancer"}}'

kubectl patch svc monitoring-kube-state-metrics -n monitoring \
  -p '{"spec": {"type": "LoadBalancer"}}'

kubectl patch svc monitoring-prometheus-node-exporter -n monitoring \
  -p '{"spec": {"type": "LoadBalancer"}}'

Patch service

  1. Get Service Endpoints
kubectl get svc -n monitoring

Look for:

  • Grafana LoadBalancer IP
  • Prometheus LoadBalancer IP

Service endpoints

  1. Access Grafana
  • URLs: http://<grafana-loadbalancer-ip>
  • Login: admin / admin123
  1. Add Prometheus as a Data Source in Grafana
  • Go to: Grafana → Settings → Data Sources → Add New
  • Data source http://<prometheus-loadbalancer-ip>:9090
  1. Use Built-in Dashboards The kube-prometheus-stack chart automatically ships dozens of dashboards:
  • Node metrics
  • Pod resource usage
  • Cluster summary
  • API server metrics Simply open Grafana → Dashboards → Browse.

Grafana

Prometheus

Overview

🎯 You Now Have Full Monitoring on EKS

  • Prometheus scraping cluster metrics
  • Grafana visualizations
  • Node exporter + kube-state-metrics integrated
  • LB access for both services
  • Persistent storage for Prometheus

About

Kubernetes monitoring stack using Prometheus, Grafana, Node Exporter, and Kube State Metrics deployed via Helm on AWS EKS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published