infra/home/cluster/node-exporter/service.yaml
Graham McIntire e1274bc63b
prom: feed home-cluster metrics + provision standard k8s dashboards
Cluster-side:
- Deploy kube-state-metrics (kube-system) for cluster-state series.
- Deploy node-exporter DaemonSet on all 7 nodes via the new monitoring ns
  (privileged PSS, hostNetwork, read-only host mounts).
- Both managed by ArgoCD apps under home/cluster/argocd/apps/.

Prometheus-side:
- Replace direct pod-IP scraping (which can't reach the 10.244.0.0/16 pod
  network from outside the cluster) with API-server-proxy scraping for
  both Services and Pods. Now one target per pod, all healthy.
- Extend external Prometheus RBAC with services/proxy + pods/proxy.

Grafana-side:
- Add file-based dashboard provisioner; ship 5 standard dashboards
  (Node Exporter Full, k8s cluster-via-prometheus, k8s all-in-one,
  k8s monitoring, Prometheus 2.0 overview).

prom.w5isp.com:3000 now shows live data for all 7 cluster nodes plus
the prom host itself.
2026-05-08 10:08:32 -05:00

19 lines
510 B
YAML

apiVersion: v1
kind: Service
metadata:
name: node-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: node-exporter
# Prometheus scrapes the DaemonSet pods (one target per node) via the
# kubernetes-pods job; scraping the headless service would only hit one
# pod per cycle, so no scrape annotations on the Service.
spec:
clusterIP: None
selector:
app.kubernetes.io/name: node-exporter
ports:
- name: metrics
port: 9100
targetPort: 9100
protocol: TCP