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.
-
Create
values.yamlfor Custom Configuration -
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: LoadBalancerNote: Grafana admin credentials are defined in this file.
- Install Prometheus & Grafana Using Helm
helm upgrade --install monitoring prometheus-community/kube-prometheus-stack \
-f values.yaml \
-n monitoring \
--create-namespace- 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"}}'- Get Service Endpoints
kubectl get svc -n monitoringLook for:
- Grafana LoadBalancer IP
- Prometheus LoadBalancer IP
- Access Grafana
- URLs:
http://<grafana-loadbalancer-ip> - Login:
admin / admin123
- Add Prometheus as a Data Source in Grafana
- Go to: Grafana → Settings → Data Sources → Add New
- Data source
http://<prometheus-loadbalancer-ip>:9090
- 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.
- Prometheus scraping cluster metrics
- Grafana visualizations
- Node exporter + kube-state-metrics integrated
- LB access for both services
- Persistent storage for Prometheus





