This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/k8sclusterreceiver.md.

Kubernetes Cluster Receiver

OpenTelemetry Collector receiver · contrib distribution

The Kubernetes Cluster receiver collects cluster-level metrics and entity events from the Kubernetes API server. It uses the K8s API to listen for updates. A single instance of this receiver should be used to monitor a cluster.

  • Component ID: contrib-k8sclusterreceiver
  • Name: k8sclusterreceiver
  • Type: receiver
  • Distribution: contrib
  • Repository: opentelemetry-collector-contrib

Stability

LevelSignals
betametrics
developmentlogs

Metrics

MetricTypeValue typeUnitStabilityEnabledAttributesDescription
k8s.container.cpu_limitgaugedouble{cpu}developmentyesMaximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.cpu_requestgaugedouble{cpu}developmentyesResource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.ephemeralstorage_limitgaugeintBydevelopmentyesMaximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.ephemeralstorage_requestgaugeintBydevelopmentyesResource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.memory_limitgaugeintBydevelopmentyesMaximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.memory_requestgaugeintBydevelopmentyesResource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.readygaugeintdevelopmentyesWhether a container has passed its readiness probe (0 for no, 1 for yes)
k8s.container.restartsgaugeint{restart}developmentyesHow many times the container has restarted in the recent past. This value is pulled directly from the K8s API and the value can go indefinitely high and be reset to 0 at any time depending on how your kubelet is configured to prune dead containers. It is best to not depend too much on the exact value but rather look at it as either == 0, in which case you can conclude there were no restarts in the recent past, or > 0, in which case you can conclude there were restarts in the recent past, and not try and analyze the value beyond that.
k8s.container.status.reasonsumint{container}developmentnok8s.container.status.reason (string)Experimental metric, may experience breaking changes. Describes the number of K8s containers that are currently in a state for a given reason. All possible container state reasons will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state reason will be non-zero.
k8s.container.status.statesumint{container}developmentnok8s.container.status.state (string)Experimental metric, may experience breaking changes. Describes the number of K8s containers that are currently in a given state. All possible container states will be reported at each time interval to avoid missing metrics. Only the value corresponding to the current state will be non-zero.
k8s.container.storage_limitgaugeintBydevelopmentyesMaximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.container.storage_requestgaugeintBydevelopmentyesResource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details
k8s.cronjob.active_jobsgaugeint{job}developmentyesThe number of actively running jobs for a cronjob
k8s.daemonset.current_scheduled_nodesgaugeint{node}developmentyesNumber of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod
k8s.daemonset.desired_scheduled_nodesgaugeint{node}developmentyesNumber of nodes that should be running the daemon pod (including nodes currently running the daemon pod)
k8s.daemonset.misscheduled_nodesgaugeint{node}developmentyesNumber of nodes that are running the daemon pod, but are not supposed to run the daemon pod
k8s.daemonset.ready_nodesgaugeint{node}developmentyesNumber of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready
k8s.deployment.availablegaugeint{pod}developmentyesTotal number of available pods (ready for at least minReadySeconds) targeted by this deployment
k8s.deployment.desiredgaugeint{pod}developmentyesNumber of desired pods in this deployment
k8s.hpa.current_replicasgaugeint{pod}developmentyesCurrent number of pod replicas managed by this autoscaler.
k8s.hpa.desired_replicasgaugeint{pod}developmentyesDesired number of pod replicas managed by this autoscaler.
k8s.hpa.max_replicasgaugeint{pod}developmentyesMaximum number of replicas to which the autoscaler can scale up.
k8s.hpa.min_replicasgaugeint{pod}developmentyesMinimum number of replicas to which the autoscaler can scale up.
k8s.job.active_podsgaugeint{pod}developmentyesThe number of actively running pods for a job
k8s.job.desired_successful_podsgaugeint{pod}developmentyesThe desired number of successfully finished pods the job should be run with
k8s.job.failed_podsgaugeint{pod}developmentyesThe number of pods which reached phase Failed for a job
k8s.job.max_parallel_podsgaugeint{pod}developmentyesThe max desired number of pods the job should run at any given time
k8s.job.successful_podsgaugeint{pod}developmentyesThe number of pods which reached phase Succeeded for a job
k8s.namespace.phasegaugeintdevelopmentyesThe current phase of namespaces (1 for active and 0 for terminating)
k8s.node.conditiongaugeint{condition}developmentnocondition (string)The condition of a particular Node.
k8s.persistentvolume.status.phasesumint{persistentvolume}developmentnok8s.persistentvolume.status.phase (string)The current phase of the PersistentVolume (1 for the current phase, 0 for others).
k8s.persistentvolume.storage.capacitysumintBydevelopmentnoThe storage capacity of the PersistentVolume.
k8s.persistentvolumeclaim.status.phasesumint{persistentvolumeclaim}developmentnok8s.persistentvolumeclaim.status.phase (string)The current phase of the PersistentVolumeClaim (1 for the current phase, 0 for others).
k8s.persistentvolumeclaim.storage.capacitysumintBydevelopmentnoThe actual storage capacity provisioned for the PersistentVolumeClaim. Only available when bound.
k8s.persistentvolumeclaim.storage.requestsumintBydevelopmentnoThe storage requested by the PersistentVolumeClaim.
k8s.pod.phasegaugeintdevelopmentyesCurrent phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown)
k8s.pod.status_reasongaugeintdevelopmentnoCurrent status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown)
k8s.replicaset.availablegaugeint{pod}developmentyesTotal number of available pods (ready for at least minReadySeconds) targeted by this replicaset
k8s.replicaset.desiredgaugeint{pod}developmentyesNumber of desired pods in this replicaset
k8s.replication_controller.availablegaugeint{pod}developmentyesTotal number of available pods (ready for at least minReadySeconds) targeted by this replication_controller
k8s.replication_controller.desiredgaugeint{pod}developmentyesNumber of desired pods in this replication_controller
k8s.resource_quota.hard_limitgaugeint{resource}developmentyesresource (string)The upper limit for a particular resource in a specific namespace. Will only be sent if a quota is specified. CPU requests/limits will be sent as millicores
k8s.resource_quota.usedgaugeint{resource}developmentyesresource (string)The usage for a particular resource in a specific namespace. Will only be sent if a quota is specified. CPU requests/limits will be sent as millicores
k8s.service.endpoint.countgaugeint{endpoint}developmentnok8s.service.endpoint.address_type (string), k8s.service.endpoint.condition (string), k8s.service.endpoint.zone (string)The number of endpoints for a service, broken down by condition, address type, and zone.
k8s.service.load_balancer.ingress.countgaugeint{ingress}developmentnoThe number of load balancer ingress points (external IPs/hostnames) assigned to the service.
k8s.statefulset.current_podsgaugeint{pod}developmentyesThe number of pods created by the StatefulSet controller from the StatefulSet version
k8s.statefulset.desired_podsgaugeint{pod}developmentyesNumber of desired pods in the stateful set (the spec.replicas field)
k8s.statefulset.ready_podsgaugeint{pod}developmentyesNumber of pods created by the stateful set that have the Ready condition
k8s.statefulset.updated_podsgaugeint{pod}developmentyesNumber of pods created by the StatefulSet controller from the StatefulSet version
openshift.appliedclusterquota.limitgaugeint{resource}developmentyesk8s.namespace.name (string), resource (string)The upper limit for a particular resource in a specific namespace.
openshift.appliedclusterquota.usedgaugeint{resource}developmentyesk8s.namespace.name (string), resource (string)The usage for a particular resource in a specific namespace.
openshift.clusterquota.limitgaugeint{resource}developmentyesresource (string)The configured upper limit for a particular resource.
openshift.clusterquota.usedgaugeint{resource}developmentyesresource (string)The usage for a particular resource with a configured limit.

Attributes

AttributeTypeDescription
conditionstringthe name of Kubernetes Node condition. Example: Ready, Memory, PID, DiskPressure
k8s.container.status.reasonstringThe reason of the current container status.
k8s.container.status.statestringThe state of the container (terminated, running, waiting). See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core for details.
k8s.namespace.namestringThe k8s namespace name.
k8s.persistentvolume.status.phasestringThe phase of the PersistentVolume.
k8s.persistentvolumeclaim.status.phasestringThe phase of the PersistentVolumeClaim.
k8s.service.endpoint.address_typestringThe address type of the endpoint.
k8s.service.endpoint.conditionstringThe condition of the service endpoint.
k8s.service.endpoint.zonestringThe zone of the service endpoint, typically corresponding to a failure domain.
resourcestringthe name of the resource on which the quota is applied

Data

  • JSON (latest): /data/collector/components/contrib-k8sclusterreceiver/latest.json
  • JSON (pinned): /data/collector/components/contrib-k8sclusterreceiver/contrib-k8sclusterreceiver-ba02d9ae6fbd.json
  • Explore: /collector/components/contrib/k8sclusterreceiver