Post

Grafana

Grafana

Grafana

Purpose

Grafana provides dashboards and visualization on top of the homelab’s Prometheus metrics. Runs as a single Deployment in the default namespace of the k3s cluster, fronted by Traefik.

Deployment

ItemValue
Namespacedefault
Imagegrafana/grafana:latest
Replicas1 (strategy: Recreate)
Container port3000
Resourcesrequests 50m/256Mi, limits 500m/512Mi
StoragePVC grafana-data, 2Gi, storageClassName: local-path/var/lib/grafana
Reloaderreloader.stakater.com/auto: "true"

Provisioning

Grafana is pre-provisioned via ConfigMaps mounted into the pod, rather than configured by hand through the UI on first boot:

  • grafana-datasource-prometheus/etc/grafana/provisioning/datasources (wires up the Prometheus datasource automatically)
  • grafana-dashboard-provider/etc/grafana/provisioning/dashboards
  • grafana-dashboard-315/var/lib/grafana/dashboards (community dashboard ID 315, Node Exporter Full)

Ingress

Traefik IngressRoute, TLS via the shared local-example-com-tls wildcard cert:

  • grafana.prod-k3s.iot-proxmox.net (middleware: default-headers)
  • www.grafana.prod-k3s.iot-proxmox.net

Both route to the grafana ClusterIP Service on port 3000.

This post is licensed under CC BY 4.0 by the author.