DEV Community

Prithiviraj R
Prithiviraj R

Posted on

Monitoring Demo: Setting Up Prometheus and Grafana on Amazon EKS

Observability is essential in any Kubernetes environment. To monitor workloads, analyze performance, and gain visibility into cluster health, I set up Prometheus and Grafana inside my Amazon EKS cluster. This demo walks through the exact steps I followed, including the real service and pod names generated during deployment.

1. Create a Dedicated Namespace

To keep monitoring components organized:

kubectl create namespace monitoring
Enter fullscreen mode Exit fullscreen mode

2. Add Helm Repositories

Prometheus and Grafana are installed using the official Helm charts.

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
Enter fullscreen mode Exit fullscreen mode

3. Install the Kube-Prometheus Stack

The kube-prometheus-stack chart bundles everything needed for monitoring:

  • Prometheus
  • Grafana
  • Alertmanager
  • Node Exporter
  • Kube-State-Metrics
  • Prometheus Operator

Installation:

helm install kube-prom-stack prometheus-community/kube-prometheus-stack \
  --namespace monitoring
Enter fullscreen mode Exit fullscreen mode

Once deployed, the following services were created in my cluster:

  • grafana-nodeport
  • prometheus-grafana
  • prometheus-kube-prometheus-prometheus
  • prometheus-kube-prometheus-operator
  • prometheus-kube-state-metrics
  • prometheus-prometheus-node-exporter
  • alertmanager-prometheus-kube-prometheus-alertmanager

All components came up successfully under the monitoring namespace.

4. Verify the Monitoring Pods

To ensure the monitoring stack was healthy:

kubectl get pods -n monitoring
Enter fullscreen mode Exit fullscreen mode

Key components running in my demo:

  • prometheus-grafana-79f589d988-r74cb
  • prometheus-prometheus-kube-prometheus-prometheus-0
  • prometheus-kube-prometheus-operator-6cd4f88f57-x5mx2
  • prometheus-kube-state-metrics-56f99dc587-rtj22
  • prometheus-prometheus-node-exporter-jhnnx
  • alertmanager-prometheus-kube-prometheus-alertmanager-0

5. Accessing Grafana

The Helm chart created a NodePort service named grafana-nodeport, exposed on port 30080.

Option 1 — Port Forward (Local Access)

kubectl port-forward -n monitoring svc/grafana-nodeport 3000:80
Enter fullscreen mode Exit fullscreen mode

Then open:

http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

Option 2 — NodePort (Direct Access)

If your EKS worker nodes are publicly accessible:

http://<worker-node-public-ip>:30080
Enter fullscreen mode Exit fullscreen mode


Grafana Credentials

Retrieve the admin password:

kubectl get secret -n monitoring kube-prom-stack-grafana \
  -o jsonpath="{.data.admin-password}" | base64 --decode
Enter fullscreen mode Exit fullscreen mode

6. Accessing Prometheus

To access the Prometheus UI:

kubectl port-forward -n monitoring \
svc/prometheus-kube-prometheus-prometheus 9090:9090
Enter fullscreen mode Exit fullscreen mode

From here, you can:

  • Check scrape targets
  • Explore metrics
  • View alerting rules
  • Validate ServiceMonitor configurations

Prometheus will automatically discover and scrape the service.

7. Built-In Dashboards in Grafana

Grafana includes preloaded dashboards for:

  • Nodes
  • Pods
  • Workloads
  • Kubernetes API server
  • Node exporter
  • Kube-state-metrics

These dashboards begin populating immediately once Prometheus collects metrics.

Conclusion

This setup delivers a complete observability stack for Amazon EKS.
With Prometheus collecting metrics and Grafana providing rich visualizations, you gain:

  • Full visibility into cluster health
  • Metrics for application performance
  • Alerts for failures and anomalies
  • A foundation for long-term monitoring

Happy Learning
Prithiviraj Rengarajan
DevOps Engineer

Top comments (0)