---
title: Kubernetes State
description: Capture Pod scheduling events, track the status of your Kubelets, and more.
breadcrumbs: Docs > Integrations > Kubernetes State
---

# Kubernetes State
Supported OS Integration version10.5.0
## Overview{% #overview %}

Get metrics from kubernetes_state service in real time to:

- Visualize and monitor kubernetes_state states
- Be notified about kubernetes_state failovers and events.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The Kubernetes-State 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 Kubernetes servers.

### Configuration{% #configuration %}

Edit the `kubernetes_state.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 kubernetes_state.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/kubernetes_state/datadog_checks/kubernetes_state/data/conf.yaml.example) for all available configuration options.

### Validation{% #validation %}

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

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

### Metrics{% #metrics %}

|  |
|  |
| **kubernetes\_state.container.ready**(gauge)                                | Whether the containers readiness check succeeded                                                                                                                                        |
| **kubernetes\_state.container.running**(gauge)                              | Whether the container is currently in running state                                                                                                                                     |
| **kubernetes\_state.container.terminated**(gauge)                           | Whether the container is currently in terminated state                                                                                                                                  |
| **kubernetes\_state.container.status\_report.count.terminated**(gauge)      | Count of the containers currently reporting a in terminated state with the reason as a tag                                                                                              |
| **kubernetes\_state.container.waiting**(gauge)                              | Whether the container is currently in waiting state                                                                                                                                     |
| **kubernetes\_state.container.status\_report.count.waiting**(gauge)         | Count of the containers currently reporting a in waiting state with the reason as a tag                                                                                                 |
| **kubernetes\_state.container.gpu.request**(gauge)                          | The number of requested gpu devices by a container                                                                                                                                      |
| **kubernetes\_state.container.gpu.limit**(gauge)                            | The limit on gpu devices to be used by a container                                                                                                                                      |
| **kubernetes\_state.container.restarts**(gauge)                             | The number of restarts per container                                                                                                                                                    |
| **kubernetes\_state.container.cpu\_requested**(gauge)                       | The number of requested cpu cores by a container*Shown as cpu*                                                                                                                          |
| **kubernetes\_state.container.memory\_requested**(gauge)                    | The number of requested memory bytes by a container*Shown as byte*                                                                                                                      |
| **kubernetes\_state.container.cpu\_limit**(gauge)                           | The limit on cpu cores to be used by a container*Shown as cpu*                                                                                                                          |
| **kubernetes\_state.container.memory\_limit**(gauge)                        | The limit on memory to be used by a container*Shown as byte*                                                                                                                            |
| **kubernetes\_state.daemonset.scheduled**(gauge)                            | The number of nodes running at least one daemon pod and that are supposed to                                                                                                            |
| **kubernetes\_state.daemonset.misscheduled**(gauge)                         | The number of nodes running a daemon pod but are not supposed to                                                                                                                        |
| **kubernetes\_state.daemonset.desired**(gauge)                              | The number of nodes that should be running the daemon pod                                                                                                                               |
| **kubernetes\_state.daemonset.ready**(gauge)                                | The number of nodes that should be running the daemon pod and have one or more running and ready                                                                                        |
| **kubernetes\_state.daemonset.updated**(gauge)                              | The number of nodes that run the updated daemon pod spec                                                                                                                                |
| **kubernetes\_state.deployment.count**(gauge)                               | The number of deployments                                                                                                                                                               |
| **kubernetes\_state.deployment.replicas**(gauge)                            | The number of replicas per deployment                                                                                                                                                   |
| **kubernetes\_state.deployment.replicas\_available**(gauge)                 | The number of available replicas per deployment                                                                                                                                         |
| **kubernetes\_state.deployment.replicas\_unavailable**(gauge)               | The number of unavailable replicas per deployment                                                                                                                                       |
| **kubernetes\_state.deployment.replicas\_updated**(gauge)                   | The number of updated replicas per deployment                                                                                                                                           |
| **kubernetes\_state.deployment.replicas\_desired**(gauge)                   | The number of desired replicas per deployment                                                                                                                                           |
| **kubernetes\_state.deployment.paused**(gauge)                              | Whether a deployment is paused                                                                                                                                                          |
| **kubernetes\_state.deployment.rollingupdate.max\_unavailable**(gauge)      | Maximum number of unavailable replicas during a rolling update                                                                                                                          |
| **kubernetes\_state.endpoint.address\_available**(gauge)                    | Number of addresses available in endpoint                                                                                                                                               |
| **kubernetes\_state.endpoint.address\_not\_ready**(gauge)                   | Number of addresses not ready in endpoint                                                                                                                                               |
| **kubernetes\_state.endpoint.created**(gauge)                               | Unix creation timestamp                                                                                                                                                                 |
| **kubernetes\_state.job.count**(gauge)                                      | The number of jobs                                                                                                                                                                      |
| **kubernetes\_state.job.failed**(count)                                     | Observed number of failed pods in a job                                                                                                                                                 |
| **kubernetes\_state.job.succeeded**(count)                                  | Observed number of succeeded pods in a job                                                                                                                                              |
| **kubernetes\_state.limitrange.cpu.min**(gauge)                             | Minimum CPU request for this type                                                                                                                                                       |
| **kubernetes\_state.limitrange.cpu.max**(gauge)                             | Maximum CPU limit for this type                                                                                                                                                         |
| **kubernetes\_state.limitrange.cpu.default**(gauge)                         | Default CPU limit if not specified                                                                                                                                                      |
| **kubernetes\_state.limitrange.cpu.default\_request**(gauge)                | Default CPU request if not specified                                                                                                                                                    |
| **kubernetes\_state.limitrange.cpu.max\_limit\_request\_ratio**(gauge)      | Maximum CPU limit / request ratio                                                                                                                                                       |
| **kubernetes\_state.limitrange.memory.min**(gauge)                          | Minimum memory request for this type                                                                                                                                                    |
| **kubernetes\_state.limitrange.memory.max**(gauge)                          | Maximum memory limit for this type                                                                                                                                                      |
| **kubernetes\_state.limitrange.memory.default**(gauge)                      | Default memory limit if not specified                                                                                                                                                   |
| **kubernetes\_state.limitrange.memory.default\_request**(gauge)             | Default memory request if not specified                                                                                                                                                 |
| **kubernetes\_state.limitrange.memory.max\_limit\_request\_ratio**(gauge)   | Maximum memory limit / request ratio                                                                                                                                                    |
| **kubernetes\_state.node.count**(count)                                     | The number of nodes*Shown as node*                                                                                                                                                      |
| **kubernetes\_state.node.cpu\_capacity**(gauge)                             | The total CPU resources of the node*Shown as cpu*                                                                                                                                       |
| **kubernetes\_state.node.memory\_capacity**(gauge)                          | The total memory resources of the node*Shown as byte*                                                                                                                                   |
| **kubernetes\_state.node.pods\_capacity**(gauge)                            | The total pod resources of the node                                                                                                                                                     |
| **kubernetes\_state.node.gpu.cards\_allocatable**(gauge)                    | The GPU resources of a node that are available for scheduling                                                                                                                           |
| **kubernetes\_state.node.gpu.cards\_capacity**(gauge)                       | The total GPU resources of the node                                                                                                                                                     |
| **kubernetes\_state.persistentvolumeclaim.status**(gauge)                   | The phase the persistent volume claim is currently in                                                                                                                                   |
| **kubernetes\_state.persistentvolumeclaim.request\_storage**(gauge)         | Storage space request for a given pvc*Shown as byte*                                                                                                                                    |
| **kubernetes\_state.persistentvolumes.by\_phase**(gauge)                    | Number of persistent volumes to sum by phase and storageclass                                                                                                                           |
| **kubernetes\_state.namespace.count**(gauge)                                | The number of namespaces*Shown as cpu*                                                                                                                                                  |
| **kubernetes\_state.node.cpu\_allocatable**(gauge)                          | The CPU resources of a node that are available for scheduling*Shown as cpu*                                                                                                             |
| **kubernetes\_state.node.memory\_allocatable**(gauge)                       | The memory resources of a node that are available for scheduling*Shown as byte*                                                                                                         |
| **kubernetes\_state.node.pods\_allocatable**(gauge)                         | The pod resources of a node that are available for scheduling                                                                                                                           |
| **kubernetes\_state.node.status**(gauge)                                    | Submitted with a value of 1 for each node and tagged either 'status:schedulable' or 'status:unschedulable'; Sum this metric by either status to get the number of nodes in that status. |
| **kubernetes\_state.node.by\_condition**(gauge)                             | The condition of a cluster node                                                                                                                                                         |
| **kubernetes\_state.nodes.by\_condition**(gauge)                            | To sum by `condition` and `status` to get number of nodes in a given condition.                                                                                                         |
| **kubernetes\_state.hpa.min\_replicas**(gauge)                              | Lower limit for the number of pods that can be set by the autoscaler                                                                                                                    |
| **kubernetes\_state.hpa.max\_replicas**(gauge)                              | Upper limit for the number of pods that can be set by the autoscaler                                                                                                                    |
| **kubernetes\_state.hpa.desired\_replicas**(gauge)                          | Desired number of replicas of pods managed by this autoscaler                                                                                                                           |
| **kubernetes\_state.hpa.condition**(gauge)                                  | Observed condition of autoscalers to sum by condition and status                                                                                                                        |
| **kubernetes\_state.pdb.pods\_desired**(gauge)                              | Minimum desired number of healthy pods                                                                                                                                                  |
| **kubernetes\_state.pdb.disruptions\_allowed**(gauge)                       | Number of pod disruptions that are currently allowed                                                                                                                                    |
| **kubernetes\_state.pdb.pods\_healthy**(gauge)                              | Current number of healthy pods                                                                                                                                                          |
| **kubernetes\_state.pdb.pods\_total**(gauge)                                | Total number of pods counted by this disruption budget                                                                                                                                  |
| **kubernetes\_state.pod.ready**(gauge)                                      | In association with the `condition` tag, whether the pod is ready to serve requests, e.g. `condition:true` keeps the pods that are in a ready state                                     |
| **kubernetes\_state.pod.scheduled**(gauge)                                  | Reports the status of the scheduling process for the pod with its tags                                                                                                                  |
| **kubernetes\_state.pod.unschedulable**(gauge)                              | Reports PODs that Kube scheduler cannot schedule on any node                                                                                                                            |
| **kubernetes\_state.pod.status\_phase**(gauge)                              | To sum by `phase` to get number of pods in a given phase, and `namespace` to break this down by namespace                                                                               |
| **kubernetes\_state.replicaset.count**(gauge)                               | The number of replicasets                                                                                                                                                               |
| **kubernetes\_state.replicaset.replicas**(gauge)                            | The number of replicas per ReplicaSet                                                                                                                                                   |
| **kubernetes\_state.replicaset.fully\_labeled\_replicas**(gauge)            | The number of fully labeled replicas per ReplicaSet                                                                                                                                     |
| **kubernetes\_state.replicaset.replicas\_ready**(gauge)                     | The number of ready replicas per ReplicaSet                                                                                                                                             |
| **kubernetes\_state.replicaset.replicas\_desired**(gauge)                   | Number of desired pods for a ReplicaSet                                                                                                                                                 |
| **kubernetes\_state.replicationcontroller.replicas**(gauge)                 | The number of replicas per ReplicationController                                                                                                                                        |
| **kubernetes\_state.replicationcontroller.fully\_labeled\_replicas**(gauge) | The number of fully labeled replicas per ReplicationController                                                                                                                          |
| **kubernetes\_state.replicationcontroller.replicas\_ready**(gauge)          | The number of ready replicas per ReplicationController                                                                                                                                  |
| **kubernetes\_state.replicationcontroller.replicas\_desired**(gauge)        | Number of desired replicas for a ReplicationController                                                                                                                                  |
| **kubernetes\_state.replicationcontroller.replicas\_available**(gauge)      | The number of available replicas per ReplicationController                                                                                                                              |
| **kubernetes\_state.resourcequota.pods.used**(gauge)                        | Observed number of pods used for a resource quota                                                                                                                                       |
| **kubernetes\_state.resourcequota.services.used**(gauge)                    | Observed number of services used for a resource quota                                                                                                                                   |
| **kubernetes\_state.resourcequota.persistentvolumeclaims.used**(gauge)      | Observed number of persistent volume claims used for a resource quota                                                                                                                   |
| **kubernetes\_state.resourcequota.services.nodeports.used**(gauge)          | Observed number of node ports used for a resource quota                                                                                                                                 |
| **kubernetes\_state.resourcequota.services.loadbalancers.used**(gauge)      | Observed number of loadbalancers used for a resource quota                                                                                                                              |
| **kubernetes\_state.resourcequota.requests.cpu.used**(gauge)                | Observed sum of CPU cores requested for a resource quota*Shown as cpu*                                                                                                                  |
| **kubernetes\_state.resourcequota.requests.memory.used**(gauge)             | Observed sum of memory bytes requested for a resource quota*Shown as byte*                                                                                                              |
| **kubernetes\_state.resourcequota.requests.storage.used**(gauge)            | Observed sum of storage bytes requested for a resource quota*Shown as byte*                                                                                                             |
| **kubernetes\_state.resourcequota.limits.cpu.used**(gauge)                  | Observed sum of limits for CPU cores for a resource quota*Shown as cpu*                                                                                                                 |
| **kubernetes\_state.resourcequota.limits.memory.used**(gauge)               | Observed sum of limits for memory bytes for a resource quota*Shown as byte*                                                                                                             |
| **kubernetes\_state.resourcequota.pods.limit**(gauge)                       | Hard limit of the number of pods for a resource quota                                                                                                                                   |
| **kubernetes\_state.resourcequota.services.limit**(gauge)                   | Hard limit of the number of services for a resource quota                                                                                                                               |
| **kubernetes\_state.resourcequota.persistentvolumeclaims.limit**(gauge)     | Hard limit of the number of PVC for a resource quota                                                                                                                                    |
| **kubernetes\_state.resourcequota.services.nodeports.limit**(gauge)         | Hard limit of the number of node ports for a resource quota                                                                                                                             |
| **kubernetes\_state.resourcequota.services.loadbalancers.limit**(gauge)     | Hard limit of the number of loadbalancers for a resource quota                                                                                                                          |
| **kubernetes\_state.resourcequota.requests.cpu.limit**(gauge)               | Hard limit on the total of CPU core requested for a resource quota*Shown as cpu*                                                                                                        |
| **kubernetes\_state.resourcequota.requests.memory.limit**(gauge)            | Hard limit on the total of memory bytes requested for a resource quota*Shown as byte*                                                                                                   |
| **kubernetes\_state.resourcequota.requests.storage.limit**(gauge)           | Hard limit on the total of storage bytes requested for a resource quota*Shown as byte*                                                                                                  |
| **kubernetes\_state.resourcequota.limits.cpu.limit**(gauge)                 | Hard limit on the sum of CPU core limits for a resource quota*Shown as cpu*                                                                                                             |
| **kubernetes\_state.resourcequota.limits.memory.limit**(gauge)              | Hard limit on the sum of memory bytes limits for a resource quota*Shown as byte*                                                                                                        |
| **kubernetes\_state.service.count**(gauge)                                  | Sum by namespace and type to count active services                                                                                                                                      |
| **kubernetes\_state.statefulset.count**(gauge)                              | The number of statefulsets                                                                                                                                                              |
| **kubernetes\_state.statefulset.replicas**(gauge)                           | The number of replicas per statefulset                                                                                                                                                  |
| **kubernetes\_state.statefulset.replicas\_desired**(gauge)                  | The number of desired replicas per statefulset                                                                                                                                          |
| **kubernetes\_state.statefulset.replicas\_current**(gauge)                  | The number of current replicas per StatefulSet                                                                                                                                          |
| **kubernetes\_state.statefulset.replicas\_ready**(gauge)                    | The number of ready replicas per StatefulSet                                                                                                                                            |
| **kubernetes\_state.statefulset.replicas\_updated**(gauge)                  | The number of updated replicas per StatefulSet                                                                                                                                          |
| **kubernetes\_state.telemetry.payload.size**(gauge)                         | The message size received from kube-state-metrics*Shown as byte*                                                                                                                        |
| **kubernetes\_state.telemetry.metrics.processed.count**(count)              | The number of metrics processed                                                                                                                                                         |
| **kubernetes\_state.telemetry.metrics.input.count**(count)                  | The number of metrics received                                                                                                                                                          |
| **kubernetes\_state.telemetry.metrics.blacklist.count**(count)              | The number of metrics blacklisted by the check                                                                                                                                          |
| **kubernetes\_state.telemetry.metrics.ignored.count**(count)                | The number of metrics ignored by the check                                                                                                                                              |
| **kubernetes\_state.telemetry.collector.metrics.count**(count)              | The number of metrics by collector (kubernetes object kind) by kubernetes namespaces                                                                                                    |
| **kubernetes\_state.vpa.lower\_bound**(gauge)                               | The vpa lower bound recommendation                                                                                                                                                      |
| **kubernetes\_state.vpa.target**(gauge)                                     | The vpa target recommendation                                                                                                                                                           |
| **kubernetes\_state.vpa.uncapped\_target**(gauge)                           | The vpa uncapped recommendation recommendation                                                                                                                                          |
| **kubernetes\_state.vpa.upperbound**(gauge)                                 | The vpa upper bound recommendation                                                                                                                                                      |
| **kubernetes\_state.vpa.update\_mode**(gauge)                               | The vpa update mode                                                                                                                                                                     |

### Events{% #events %}

The Kubernetes-state check does not include any events.

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

See [../kubernetes/assets/service_checks.json](https://github.com/DataDog/integrations-core/blob/master/kubernetes/assets/service_checks.json) for a list of service checks provided by this integration.

## Troubleshooting{% #troubleshooting %}

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