diff options
Diffstat (limited to 'docs/operations/kubernetes.md')
| -rw-r--r-- | docs/operations/kubernetes.md | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/operations/kubernetes.md b/docs/operations/kubernetes.md new file mode 100644 index 0000000..20b8b07 --- /dev/null +++ b/docs/operations/kubernetes.md @@ -0,0 +1,51 @@ +# Kubernetes + +Common tasks when running Epimetheus against Prometheus, Pushgateway, and Grafana in Kubernetes. + +## Port-forwards + +To run Epimetheus on your laptop against cluster services: + +```bash +# Pushgateway (realtime mode) +kubectl port-forward -n monitoring svc/pushgateway 9091:9091 & + +# Prometheus (historic/watch, queries) +kubectl port-forward -n monitoring svc/prometheus-kube-prometheus-prometheus 9090:9090 & + +# Grafana (dashboards) +kubectl port-forward -n monitoring svc/prometheus-grafana 3000:80 +``` + +Then use `http://localhost:9091`, `http://localhost:9090`, and `http://localhost:3000` in Epimetheus flags and in the browser. Adjust service names and namespaces to match your cluster (e.g. `prometheus-kube-prometheus-prometheus` for kube-prometheus-stack). + +## Deploying Pushgateway + +Example using the official Helm chart: + +```bash +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm install pushgateway prometheus-community/prometheus-pushgateway -n monitoring --create-namespace +``` + +Alternatively use your own chart (e.g. from the [conf repository](https://codeberg.org/snonux/conf) at `f3s/pushgateway/helm-chart`). + +## Deploying the Epimetheus Grafana dashboard + +**ConfigMap (recommended):** If you have a manifest that creates a ConfigMap with the dashboard JSON and the Grafana label for auto-discovery: + +```bash +kubectl apply -f ../prometheus/epimetheus-dashboard.yaml +``` + +**Script:** From the repo, with Grafana reachable (e.g. after port-forward): + +```bash +./scripts/deploy-dashboard.sh +# Or with credentials: +GRAFANA_URL="http://localhost:3000" GRAFANA_USER="admin" GRAFANA_PASSWORD="yourpassword" ./scripts/deploy-dashboard.sh +``` + +## Namespace and service names + +Replace `monitoring` and the Prometheus/Pushgateway/Grafana service names with whatever your Helm release or manifests use. Epimetheus only needs the URLs; it does not need to run inside the cluster. |
