Skip to content

Commit

Permalink
AKS - Create dedicated kubernetes service to expose CoreDNS metrics (#…
Browse files Browse the repository at this point in the history
…2107)

* create service to expose coredns metrics

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

* create service to expose coredns metrics

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>

---------

Signed-off-by: Raul Garcia Sanchez <info@raulgarcia.de>
  • Loading branch information
rgarcia89 authored May 22, 2023
1 parent 09135ee commit 3fff8b5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions jsonnet/kube-prometheus/platforms/aks.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,23 @@
prometheusAdapter+:: {
apiService:: null,
},

kubernetesControlPlane+: {
kubeDnsPrometheusStackService: {
apiVersion: 'v1',
kind: 'Service',
metadata: {
name: 'kube-prometheus-stack-coredns',
namespace: 'kube-system',
labels: { 'k8s-app': 'kube-dns' },
},
spec: {
ports: [
{ name: 'metrics', port: 9153, targetPort: 9153 },
],
selector: { 'k8s-app': 'kube-dns' },
clusterIP: 'None',
},
},
},
}

0 comments on commit 3fff8b5

Please sign in to comment.