Architecture
The observability stack follows a unified telemetry collection pipeline:Stack Components
Grafana Stack
Visualization platform with operator-managed instances, datasources, and dashboards
Prometheus
High-performance metrics collection and storage with 2-day retention and 25GiB capacity
Grafana Alloy
Unified telemetry collector for logs, metrics, and events with intelligent routing
Loki
Log aggregation system with 31-day retention and S3-compatible storage
Telemetry Flow
Collection
Grafana Alloy runs as a DaemonSet on every node, collecting:
- Pod logs from all containers with automatic label extraction
- Node logs from systemd journal (kubelet, containerd)
- Cluster events from the Kubernetes API
- Metrics from node-exporter and Kepler
Processing
Alloy enriches telemetry data with:
- Cluster and namespace labels
- Pod controller and application names
- Node names and container images
- Custom labels for filtering
Storage
Data is routed to appropriate backends:
- Logs → Loki with MinIO S3 storage backend
- Metrics → Prometheus with local persistent volumes
Key Features
High Availability
- Prometheus: 2 replicas with hard pod anti-affinity
- Alloy: DaemonSet deployment ensures coverage on all nodes
- Loki: SingleBinary mode with persistent storage
Data Retention
| Component | Retention Period | Storage Capacity |
|---|---|---|
| Prometheus | 2 days | 25 GiB per replica |
| Loki | 31 days | 30 GiB (MinIO) |
| Alertmanager | N/A | 50 GiB |
Flux Integration
The observability stack includes custom metrics for Flux resources:Access Grafana
Grafana is exposed via HTTPRoute at your cluster’s configured domain. Check the HTTPRoute configuration in
overlays/kimawesome/infrastructure/observability/grafana-operator/httproute.yaml.ServiceMonitor and PodMonitor
Prometheus automatically discovers metrics endpoints using:- ServiceMonitors: For services exposing metrics
- PodMonitors: For pods with direct metrics endpoints
Example: MetalLB PodMonitor
Example: MetalLB PodMonitor
Configuration Files
All observability components are defined in:- Base:
overlays/base/grafana/andoverlays/base/prometheus/ - Environment:
overlays/kimawesome/infrastructure/observability/ - Kustomization:
overlays/kimawesome/infrastructure/observability/kustomization.yaml:1
Next Steps
Configure Grafana
Set up dashboards and datasources
Add Service Monitors
Expose custom application metrics
Query Logs
Search and analyze application logs
Customize Alloy
Configure telemetry collection