You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the existing kube-prometheus-stack deployment to include centralized log aggregation, enabling Kubernetes audit logs and container logs to be queryable in a self-hosted Grafana instance.
Motivation
The monitoring stack is currently metrics-only (Prometheus + Alertmanager). Grafana is disabled (grafana.enabled: false).
No centralized log search or correlation between logs and metrics exists.
A self-hosted Grafana with Loki would enable audit log investigation, pod log search, and metric/log correlation — all from one UI.
Architecture
kube-prometheus-stack does not include Loki or Alloy as sub-charts. However, Grafana is a sub-chart that can be enabled. The approach is:
Enable Grafana in kube-prometheus-stack via grafana.enabled: true + datasource configuration
Deploy Loki as a separate HelmRelease (Grafana Helm repo) for log storage/query
Deploy Alloy as a separate HelmRelease (Grafana Helm repo) as the log collector
Note: Promtail is deprecated (EOL March 2026). Grafana Alloy is the official successor — an OpenTelemetry-based collector for logs, metrics, and traces.
Deploy Loki in monitoring namespace as a companion to kube-prometheus-stack. Use the grafana/loki Helm chart in single-binary or simple-scalable mode (homelab scale).
Container logs from all pods (standard Kubernetes log collection)
Audit log files from control-plane nodes by mounting /var/log/kubernetes/audit/ (host path from Talos audit-logging patch)
4. Optional: Audit webhook backend
Add audit-webhook-* API server flags to talos/cluster/audit-logging.yaml for real-time streaming to Loki (in addition to the file backend). This is optional — Alloy tailing the audit log files achieves the same result with better resilience.
Acceptance Criteria
Grafana enabled in kube-prometheus-stack with Prometheus + Loki datasources
Loki deployed as a separate HelmRelease in monitoring namespace
Alloy deployed as a DaemonSet HelmRelease collecting container logs + audit logs
Kubernetes audit logs queryable via LogQL in Grafana
Container logs from all namespaces searchable in Grafana
Existing Prometheus metrics remain accessible in Grafana
CiliumNetworkPolicy allows Alloy → Loki and Grafana → Loki traffic
Additional Context
Current kube-prometheus-stack chart: v84.5.0 (prometheus-community)
Current audit logging setup: talos/cluster/audit-logging.yaml (file backend, 30-day rotation)
Summary
Extend the existing kube-prometheus-stack deployment to include centralized log aggregation, enabling Kubernetes audit logs and container logs to be queryable in a self-hosted Grafana instance.
Motivation
grafana.enabled: false).talosctlon individual nodes.Architecture
kube-prometheus-stack does not include Loki or Alloy as sub-charts. However, Grafana is a sub-chart that can be enabled. The approach is:
grafana.enabled: true+ datasource configurationProposed Solution
1. Enable Grafana in kube-prometheus-stack
Update
helm-release.yamlvalues:2. Deploy Loki (separate HelmRelease)
Deploy Loki in
monitoringnamespace as a companion to kube-prometheus-stack. Use thegrafana/lokiHelm chart in single-binary or simple-scalable mode (homelab scale).3. Deploy Alloy (separate HelmRelease)
Deploy Grafana Alloy as a DaemonSet to collect:
/var/log/kubernetes/audit/(host path from Talos audit-logging patch)4. Optional: Audit webhook backend
Add
audit-webhook-*API server flags totalos/cluster/audit-logging.yamlfor real-time streaming to Loki (in addition to the file backend). This is optional — Alloy tailing the audit log files achieves the same result with better resilience.Acceptance Criteria
monitoringnamespaceAdditional Context
talos/cluster/audit-logging.yaml(file backend, 30-day rotation)