title: Kubernetes: Pod Resources
agents: kubernetes
catalog: containerization/kubernetes
license: GPLv2
distribution: check_mk
description:
 This check monitors the pods respective to the Kubernetes DaemonSet, StatefulSet, Deployment, Node
 or Cluster. Specifically, it monitors the number of pods which are in the phases

 - running

 - pending

 - failed

 - succeeded

 - unknown

 Moreover, on clusters and nodes the check monitors the number of allocatable pods, the pod capacity
 and the number of free pods available on the node/cluster. The number of free pods is equal to the
 number of allocatable pods minus the number of pending and running pods.

 Upper levels for {WARN}/{CRIT} can be defined for the time a pod is pending.
 The duration a pod is pending is calculated based on the time checkmk has seen the pod, not on data
 provided by the Kubernetes API. This means the pending phase duration is zero when the
 monitoring first begins, even if there are pods, which have been pending for much longer. By
 default, any time a pod spends pending is tolerated and the service remains {OK}.

 If a pod exceeds the tolerating time period, the pod name will be displayed next to the number of
 pods. If there are more than three pods exceeding the time limit, only the those three pods, which
 have been in the pending phase the longest will be shown.

 The service goes {WARN}/{CRIT} if the count of free pods is less than 10%/5% of the allocatable
 pods.

 The levels for pending and free pods can be configured via the rule Kubernetes pod resources.

 The pod names of unknown pods are displayed in similar fashion as for the pending pods. However,
 pod names are not displayed based on how long they have been unknown.

 The check requires that the special agent kube is configured.

discovery:
 One service is created.
