Replace manual Prometheus with kube-prometheus-stack Helm chart
This commit is contained in:
@@ -12,6 +12,7 @@ homelab cluster.
|
||||
| `DockerRegistry/`| Private Docker registry deployment, service, PVC and UI |
|
||||
| `Gitea/` | Gitea deployment, service, ingress, namespace, PVC, DB secret |
|
||||
| `Immich/` | Immich server, machine-learning, redis, config, secret |
|
||||
| `Monitoring/` | Prometheus Operator (kube-prometheus-stack Helm release) + hand-managed Grafana |
|
||||
| `PostgreSQL/` | PostgreSQL deployment, service, PVC, static endpoint, Hetzner volume variant |
|
||||
| `Secrets/` | Docker registry login credentials (gitignored) |
|
||||
| `volume/` | Persistent volume claim and SMB volume examples |
|
||||
@@ -24,6 +25,36 @@ Apply a manifest with:
|
||||
kubectl apply -f <path/to/manifest.yaml>
|
||||
```
|
||||
|
||||
## Monitoring stack
|
||||
|
||||
The `Monitoring/` directory runs the **kube-prometheus-stack** Helm chart
|
||||
(prometheus-operator + CRDs + node-exporter + kube-state-metrics) plus a
|
||||
hand-managed Grafana.
|
||||
|
||||
Install the chart once:
|
||||
|
||||
```bash
|
||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||
helm repo update
|
||||
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
|
||||
--namespace monitoring --create-namespace \
|
||||
--version 87.3.0 \
|
||||
-f Monitoring/kube-prometheus-stack.values.yaml
|
||||
```
|
||||
|
||||
Upgrade after editing `Monitoring/kube-prometheus-stack.values.yaml`:
|
||||
|
||||
```bash
|
||||
helm upgrade kube-prometheus-stack prometheus-community/kube-prometheus-stack \
|
||||
--namespace monitoring --version 87.3.0 \
|
||||
-f Monitoring/kube-prometheus-stack.values.yaml
|
||||
```
|
||||
|
||||
Add scrape targets by creating `ServiceMonitor` / `PodMonitor` CRs in any
|
||||
namespace; the Prometheus CR selects all of them (`serviceMonitorSelector: {}`).
|
||||
Apply the Grafana manifests in `Monitoring/Grafana/` separately (its datasource
|
||||
points at `prometheus-operated.monitoring.svc.cluster.local:9090`).
|
||||
|
||||
## Notes
|
||||
|
||||
- Kubernetes `Secret` resources and the `Secrets/` directory are gitignored to
|
||||
|
||||
Reference in New Issue
Block a user