Prometheus & Grafana Setup on EKS
This guide covers installing Prometheus and Grafana on an Amazon EKS cluster using Helm.
1. Create Monitoring Namespace
kubectl create namespace monitoring2. Install Prometheus
- Add Prometheus Helm repository:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts- Update Helm repositories:
helm repo update- Install Prometheus:
helm install prometheus prometheus-community/prometheus --namespace monitoring3. Install Grafana
- Add Grafana Helm repository:
helm repo add grafana https://grafana.github.io/helm-charts- Update Helm repositories:
helm repo update- Install Grafana (with admin password
adminand LoadBalancer service type):
helm install grafana grafana/grafana \
--namespace monitoring \
--set adminPassword='admin' \
--set service.type=LoadBalancer4. Get Grafana Service Details
kubectl get svc -n monitoring grafanaThis will return the EXTERNAL-IP (LoadBalancer URL) for accessing Grafana.
5. Get Grafana Admin Password
kubectl get secret --namespace monitoring grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo6. Configure Prometheus as a Data Source in Grafana
- Log in to Grafana using the LoadBalancer URL:
http://<GRAFANA_EXTERNAL_IP>Username: admin
Password: (from Step 5)
-
Go to:
Connections → Data sources → Add data source → Prometheus -
Set the URL to:
http://prometheus-server.monitoring.svc.cluster.local- Click Save & Test — you should see a green ✅ Data source is working.