Get metrics from kube-dns service in real time to:
- Visualize and monitor DNS metrics collected with the Kubernetes' kube-dns addon through Prometheus
See https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns for more information about kube-dns.
The kube-dns check is included in the Datadog Agent package, so you don't need to install anything else on your servers.
Edit the kube_dns.d/conf.yaml
file, in the conf.d/
folder at the root of your Agent's configuration directory. See the sample kube_dns.d/conf.yaml for all available configuration options.
If you are using one Agent pod per Kubernetes worker node, use the following annotations on your kube-dns pod to retrieve the data automatically.
apiVersion: v1
kind: Pod
metadata:
annotations:
service-discovery.datadoghq.com/kubedns.check_names: '["kube_dns"]'
service-discovery.datadoghq.com/kubedns.init_configs: '[{}]'
service-discovery.datadoghq.com/kubedns.instances: '[[{"prometheus_endpoint":"http://%%host%%:10055/metrics", "tags":["dns-pod:%%host%%"]}]]'
Remarks:
- The "dns-pod" tag tracks the target DNS pod IP. The other tags are related to the dd-agent that is polling the information using the service discovery.
- The service discovery annotations need to be done on the pod. In case of a deployment, add the annotations to the metadata of the template's spec.
Run the Agent's status
subcommand and look for kube_dns
under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
The kube-dns check does not include any events.
The kube-dns check does not include any service checks.
Need help? Contact Datadog support.