---
title: Kube DNS
description: Track all your Kube DNS metrics with Datadog
breadcrumbs: Docs > Integrations > Kube DNS
---

# Kube DNS
Supported OS Integration version7.4.0
## Overview{% #overview %}

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](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dns) for more information about kube-dns.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The kube-dns check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package, so you don't need to install anything else on your servers.

### Configuration{% #configuration %}

Edit the `kube_dns.d/conf.yaml` file, in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files.md#agent-configuration-directory). See the [sample kube_dns.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/kube_dns/datadog_checks/kube_dns/data/conf.yaml.example) for all available configuration options.

#### Using with service discovery{% #using-with-service-discovery %}

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.

```yaml
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.

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information) and look for `kube_dns` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **kubedns.cachemiss\_count**(gauge)                | Number of DNS requests resulting in a cache miss.*Shown as request*                                         |
| **kubedns.cachemiss\_count.count**(count)          | Instant number of DNS requests made resulting in a cache miss.*Shown as request*                            |
| **kubedns.error\_count**(gauge)                    | Number of DNS requests resulting in an error.*Shown as error*                                               |
| **kubedns.error\_count.count**(count)              | Instant number of DNS requests made resulting in an error.*Shown as error*                                  |
| **kubedns.request\_count**(gauge)                  | Total number of DNS requests made.*Shown as request*                                                        |
| **kubedns.request\_count.count**(count)            | Instant number of DNS requests made.*Shown as request*                                                      |
| **kubedns.request\_duration.seconds.count**(gauge) | Number of requests on which the kubedns.request_duration.seconds.sum metric is evaluated.*Shown as request* |
| **kubedns.request\_duration.seconds.sum**(gauge)   | Time (in seconds) each request took to resolve.*Shown as second*                                            |
| **kubedns.response\_size.bytes.count**(gauge)      | Number of responses on which the kubedns.response_size.bytes.sum metric is evaluated.*Shown as response*    |
| **kubedns.response\_size.bytes.sum**(gauge)        | Size of the returns response in bytes.*Shown as byte*                                                       |

### Events{% #events %}

The kube-dns check does not include any events.

### Service Checks{% #service-checks %}

**kubedns.up**

Returns `CRITICAL` if Kube DNS is not healthy.

*Statuses: ok, critical*

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
