Deploying Kube-Prometheus-Stack on AWS EKS
This creates billable resources. Run it in a dev environment and destroy it when you finish. Set a budget alarm first.
Success criteria
0 of 3
What you are building#
What is Kube-Prometheus-Stack?#
Kube-Prometheus-Stack is a comprehensive, production-ready Kubernetes observability suite. It packages:
- Prometheus Operator: Manages Prometheus and Alertmanager instances using custom Kubernetes CRDs (
ServiceMonitor,PrometheusRule). - Prometheus: High-performance time-series database scraping metrics from nodes, pods, and services via Kubernetes API discovery.
- Alertmanager: Deduplicates, groups, and routes alert notifications.
- Grafana: Real-time metrics visualization platform.
- kube-state-metrics & node-exporter: Generates host-level and cluster object metrics.
OBSERVALITY & MONITORING STACK
+-----------------------------------------------------------------------------------+
| AWS EKS WORKER NODES & PODS |
| [ Pod 1 Metrics ] [ Pod 2 Metrics ] [ Kubelet Node Exporter ] |
+-----------------------------------+-----------------------------------------------+
|
| Scrapes Metrics via ServiceMonitor (30s)
v
+-----------------------------------------------------------------------------------+
| PROMETHEUS TIME-SERIES DATABASE (prometheus-0) |
| Stores CPU, Memory, Network, Disk & Custom App Metrics |
+-----------------------------------+-----------------------------------------------+
|
| PromQL Queries
v
+-----------------------------------------------------------------------------------+
| GRAFANA DASHBOARDS (Port 3000) |
| Real-time RED Metrics & Infrastructure Dashboards |
+-----------------------------------------------------------------------------------+Steps#
Step 1: Execute Automated Monitoring Deployment Script#
cd 07-Monitoring-Observability/Lab17-Prometheus-Grafana-Monitoring-Stack
chmod +x install/install.sh
./install/install.shStep 2: Access Grafana Web UI#
kubectl port-forward svc/prometheus-grafana 3000:80 -n monitoringOpen web browser to http://localhost:3000 (Default Credentials: admin / prom-operator).
Verify it worked#
kubectl get pods -n monitoringExpected Output:
NAME READY STATUS RESTARTS AGE
prometheus-kube-prometheus-prometheus-0 2/2 Running 0 2m
prometheus-grafana-7d8b9f7c4d-x9y8z 1/1 Running 0 2m
prometheus-kube-state-metrics-6d8b9f7c4d-v1w2u 1/1 Running 0 2mClean up#
Run this even if you did not finish. Everything above is destroyable, and an account full of half-built experiments is how a surprise bill starts.
Destructive — This removes real resources. Check which environment you are in first.
helm uninstall kube-prometheus-stack -n monitoring
kubectl delete pvc --all -n monitoring # PVCs are NOT removed by uninstall
aws ec2 describe-volumes --filters Name=status,Values=available --query 'Volumes[].[VolumeId,Size]' --output tableCost of this lab: Depends on an existing cluster. kube-prometheus-stack requests persistent volumes — EBS at ~$0.08/GB-month — which survive helm uninstall because the PVCs are retained deliberately.