Just dropped a quick guide on how to build better Kyverno alerts using Loki. 🔍
The main challenge was that Kyverno logs originate from its namespace, but I needed the alert to reflect the target namespace (where the policy violation actually occurred).
I used LogQL's label_format to rewrite namespace_extracted → namespace before aggregation to get actionable alerts.
Check it out here: https://wael.nasreddine.com/kubernetes/alert-kyverno-policy-validatio.html
#Kubernetes #SRE #Loki #Kyverno #Observability #DevOps #LogQL #socialmedia
