Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKS - Create dedicated kubernetes service to expose CoreDNS metrics #2107

Merged
merged 2 commits into from
May 22, 2023
Merged

Conversation

rgarcia89
Copy link
Contributor

Description

Currently the kube-prometheus-stack creates a ServiceMonitor to collect the coredns metrics of a Kubernetes Service which is not exposing them. This is caused by the fact that AKS is not exposing the metrics port by default on the kube-dns service.

In order not to have to patch the service manually, I suggest the creation of a dedicated service in case that the platform is set to aks.

AKS kube-dns service definition:

Name:              kube-dns
Namespace:         kube-system
Labels:            addonmanager.kubernetes.io/mode=Reconcile
                   k8s-app=kube-dns
                   kubernetes.io/cluster-service=true
                   kubernetes.io/name=CoreDNS
Annotations:       <none>
Selector:          k8s-app=kube-dns
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.0.0.10
IPs:               10.0.0.10
Port:              dns  53/UDP
TargetPort:        53/UDP
Endpoints:         10.244.4.33:53,10.244.6.49:53
Port:              dns-tcp  53/TCP
TargetPort:        53/TCP
Endpoints:         10.244.4.33:53,10.244.6.49:53
Session Affinity:  None
Events:            <none>

Code section where we create the CoreDNS ServiceMonitor

Type of change

What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Added kubernetes service creation for AKS platform to expose CoreDNS metrics


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants