- Prometheus
- Grafana
- kube-prometheus-stack Helm chart (Prometheus Operator-based installation)
.
├── 00-namespace.yaml
├── 1-stack/ # kube-prometheus-stack Helm values
├── 2-nginx/ # nginx + stub_status enabled
├── 3-exporters/ # nginx exporter deployment + service
├── 4-servicemonitors/ # ServiceMonitor objects
├── 5-access/ # helper scripts (port-forward + credentials)
└── debug/ # quick debugging helperskubectl apply -f 00-namespace.yamlhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install sina-monitoring prometheus-community/kube-prometheus-stack \
-n monitoring \
-f 1-stack/values-minimal.yaml \
--wait \
--timeout 15mkubectl apply -n monitoring -f 2-nginx/
kubectl apply -n monitoring -f 3-exporters/
kubectl apply -n monitoring -f 4-servicemonitors/./5-access/start-port-forwards.sh./5-access/stop-port-forwards.sh./5-access/credentials.sh- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000
You should see:
nginx-exportertarget UP- node-exporter, kubelet, kube-state-metrics targets UP
PromQL :
nginx_up→ should be1nginx_http_requests_totalexists
- Node Exporter Full: 1860
- NGINX Exporter: 12708