Open rgarcia89 opened 1 year ago
We are running into the same issue. I'm pretty sure this was exposed in the past (since we had alerts based on the metric).
@flo-02-mu in case you are using the kube-prometheus-stack. I have just added a service to the aks platform jsonnet definition that will be created add used to scrape the coredns metrics.
https://github.com/prometheus-operator/kube-prometheus/pull/2107#event-9304184829
AKS runs multiple coredns pods behind the kube-dns service. If you scrape metrics from the service, the metrics might be inconsistent, because they might be from different pods. You can scrape metrics from pods to get consistent metrics with pod name in the dimension.
@robbiezhang that why we are using a headless service 😉
Action required from @aritraghosh, @julia-yin, @AllenWen-at-Azure
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Issue needing attention of @Azure/aks-leads
Describe scenario I have noticed that on my AKS clusters running on v1.24.9 the kube-dns service in the kube-system namespace is not exposing the coredns pod metrics. Thus the servicemonitor which is deployed by the prometheus-operator chart is not able to collect coredns metrics.
From what I can see the official kubernetes manifest includes the metrics exposure on the kube-dns service. https://github.com/kubernetes/kubernetes/blob/v1.24.9/cluster/addons/dns/coredns/coredns.yaml.base
Describe the solution you'd like I would like to see AKS expose the metric directly on the kube-dns service or make it enable via a parameter via the AKS cli. Otherwise I do have to make this change on >10 clusters manually every time I redeploy them.