# 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.