Assume that you have several development teams which are work on the same Kubernetes cluster and each team need to get alerts only related to their projects. For example, team "A" should only get alerts if there are any unhealthy pods with labels team: A and app: app1 or app: app2
- Appropriate labels on your pods
- kube-state-metrics (tested with 2.4.2 version) with argument
--metric-labels-allowlist=pods=[*] - Prometheus job for pods
- Prometheus rule which will join pod labels from
kube_pod_labelsto metric e.g.