Docs ยป Supported integrations in Splunk Observability Cloud ยป Collector components: Receivers ยป Kubernetes cluster receiver

Kubernetes cluster receiver ๐Ÿ”—

The Kubernetes cluster receiver collects cluster metrics using the Kubernetes API server. You can use a single instance of this receiver to monitor an entire Kubernetes cluster. The supported pipeline type is metrics. To filter in or out other Kubernetes elements, such as containers, pods, nodes, namespaces, or clusters, use the Filter processor instead. Learn more at Filter processor. See Process your data with pipelines for more information on the different types of pipelines.

Kubernetes version 1.21 and higher is compatible with the Kubernetes navigator. Using lower versions of Kubernetes is not supported for this receiver and might result in the navigator not displaying all clusters.

Note

This receiver replaces the kubernetes-cluster Smart Agent monitor.

Get started ๐Ÿ”—

By default, the Kubernetes cluster receiver is already activated in the Helm chart of the Splunk OpenTelemetry Collectors. See Configure the Collector for Kubernetes with Helm for more information, including the default Collected metrics and dimensions for Kubernetes.

To activate the Kubernetes cluster receiver manually in the Collector configuration, add k8s_cluster to the receivers section of your configuration file, as shown in the following example:

receivers:
  k8s_cluster:
    auth_type: kubeConfig
    collection_interval: 30s
    node_conditions_to_report: ["Ready", "MemoryPressure"]
    allocatable_types_to_report: ["cpu","memory"]
    metadata_exporters: [signalfx]

To complete the configuration, include the receiver in the metrics pipeline of the service section of your configuration file. For example:

service:
  pipelines:
    metrics:
      receivers: [k8s_cluster]

Sync metadata_exporters ๐Ÿ”—

Use metadata_exporters as a list of metadata exporters to sync with metadata collected by the Kubernetes cluster receiver. For example:

receivers:
  k8s_cluster:
    auth_type: serviceAccount
    metadata_exporters:
    - signalfx

Exporters specified in this list need to implement the following interface. If an exporter doesnโ€™t implement the interface, startup fails.

type MetadataExporter interface {
  ConsumeMetadata(metadata []*MetadataUpdate) error
}

type MetadataUpdate struct {
  ResourceIDKey string
  ResourceID    ResourceID
  MetadataDelta
}

type MetadataDelta struct {
  MetadataToAdd    map[string]string
  MetadataToRemove map[string]string
  MetadataToUpdate map[string]string
}

Set node_conditions_to_report ๐Ÿ”—

Use the following configuration to have the k8s_cluster receiver emit two metrics, k8s.node.condition_ready and k8s.node.condition_memory_pressure, one for each condition in the configuration:

# ...
k8s_cluster:
  node_conditions_to_report:
    - Ready
    - MemoryPressure
# ...

The value is 1 if the ConditionStatus for the corresponding Condition is True, 0 if itโ€™s False, and -1 if itโ€™s Unknown. To learn more, search for โ€œConditionsโ€ in the Kubernetes documentation.

Settings ๐Ÿ”—

The following table shows the configuration options for the receiver:

NameTypeDefaultDescription
auth_typestringserviceAccount

How to authenticate to the K8s API server. This can be one of none (for no auth), serviceAccount (to use the standard service account token provided to the agent pod), or kubeConfig to use credentials from ~/.kube/config.

collection_intervalint6410s

Collection interval for metrics.

node_conditions_to_reportslice

Node condition types to report. See all condition types, see here: https://kubernetes.io/docs/concepts/architecture/nodes/#condition.

allocatable_types_to_reportslice

Allocate resource types to report. See all resource types, see here: https://kubernetes.io/docs/concepts/architecture/nodes/#capacity

metadata_exportersslice

List of exporters to which metadata from this receiver should be forwarded to.

distributionstringkubernetes

Whether OpenShift supprot should be enabled or not.

Metrics ๐Ÿ”—

Caution

The SignalFx exporter excludes some available metrics by default. Learn more about default metric filters in List of metrics excluded by default. See Collected metrics and dimensions for Kubernetes to see how the Collector processes Kubernetes metrics.

The following metrics, resource attributes, and attributes are available. For more information, including which resource attributes are included by default, refer to Kubernetes Cluster receiver metadata in GitHub.

NameTypeUnit ActiveDescriptionAttributes
k8s.container.cpu_requestGauge{cpu}Yes

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

k8s.container.cpu_limitGauge{cpu}Yes

Maximum 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_requestGaugeByYes

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

k8s.container.memory_limitGaugeByYes

Maximum 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_requestGaugeByYes

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

k8s.container.storage_limitGaugeByYes

Maximum 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_requestGaugeByYes

Resource requested for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

k8s.container.ephemeralstorage_limitGaugeByYes

Maximum resource limit set for the container. See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#resourcerequirements-v1-core for details

k8s.container.restartsGauge{restart}Yes

How 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.readyGaugeYes

Whether a container has passed its readiness probe (0 for no, 1 for yes)

k8s.pod.phaseGaugeYes

Current phase of the pod (1 - Pending, 2 - Running, 3 - Succeeded, 4 - Failed, 5 - Unknown)

k8s.pod.status_reasonGaugeNo

Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4 - Shutdown, 5 - UnexpectedAdmissionError, 6 - Unknown)

k8s.deployment.desiredGauge{pod}Yes

Number of desired pods in this deployment

k8s.deployment.availableGauge{pod}Yes

Total number of available pods (ready for at least minReadySeconds) targeted by this deployment

k8s.cronjob.active_jobsGauge{job}Yes

The number of actively running jobs for a cronjob

k8s.daemonset.current_scheduled_nodesGauge{node}Yes

Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod

k8s.daemonset.desired_scheduled_nodesGauge{node}Yes

Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod)

k8s.daemonset.misscheduled_nodesGauge{node}Yes

Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod

k8s.daemonset.ready_nodesGauge{node}Yes

Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready

k8s.hpa.max_replicasGauge{pod}Yes

Maximum number of replicas to which the autoscaler can scale up.

k8s.hpa.min_replicasGauge{pod}Yes

Minimum number of replicas to which the autoscaler can scale up.

k8s.hpa.current_replicasGauge{pod}Yes

Current number of pod replicas managed by this autoscaler.

k8s.hpa.desired_replicasGauge{pod}Yes

Desired number of pod replicas managed by this autoscaler.

k8s.job.active_podsGauge{pod}Yes

The number of actively running pods for a job

k8s.job.desired_successful_podsGauge{pod}Yes

The desired number of successfully finished pods the job should be run with

k8s.job.failed_podsGauge{pod}Yes

The number of pods which reached phase Failed for a job

k8s.job.max_parallel_podsGauge{pod}Yes

The max desired number of pods the job should run at any given time

k8s.job.successful_podsGauge{pod}Yes

The number of pods which reached phase Succeeded for a job

k8s.namespace.phaseGaugeYes

The current phase of namespaces (1 for active and 0 for terminating)

k8s.replicaset.desiredGauge{pod}Yes

Number of desired pods in this replicaset

k8s.replicaset.availableGauge{pod}Yes

Total number of available pods (ready for at least minReadySeconds) targeted by this replicaset

k8s.replication_controller.desiredGauge{pod}Yes

Number of desired pods in this replication_controller

k8s.replication_controller.availableGauge{pod}Yes

Total number of available pods (ready for at least minReadySeconds) targeted by this replication_controller

k8s.resource_quota.hard_limitGauge{resource}Yes

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.usedGauge{resource}Yes

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.statefulset.desired_podsGauge{pod}Yes

Number of desired pods in the stateful set (the spec.replicas field)

k8s.statefulset.ready_podsGauge{pod}Yes

Number of pods created by the stateful set that have the Ready condition

k8s.statefulset.current_podsGauge{pod}Yes

The number of pods created by the StatefulSet controller from the StatefulSet version

k8s.statefulset.updated_podsGauge{pod}Yes

Number of pods created by the StatefulSet controller from the StatefulSet version

openshift.clusterquota.limitGauge{resource}Yes

The configured upper limit for a particular resource.

openshift.clusterquota.usedGauge{resource}Yes

The usage for a particular resource with a configured limit.

openshift.appliedclusterquota.limitGauge{resource}Yes

The upper limit for a particular resource in a specific namespace.

openshift.appliedclusterquota.usedGauge{resource}Yes

The usage for a particular resource in a specific namespace.

k8s.node.conditionGauge{condition}No

The condition of a particular Node.

Resource Attributes

NameType Description
k8s.namespace.uidstring

The k8s namespace uid.

k8s.namespace.namestring

The k8s namespace name.

k8s.node.uidstring

The k8s node uid.

k8s.node.namestring

The k8s node name.

container.idstring

The container id.

container.image.namestring

The container image name

container.image.tagstring

The container image tag

k8s.container.namestring

The k8s container name

k8s.pod.namestring

The k8s pod name.

k8s.pod.uidstring

The k8s pod uid.

k8s.pod.qos_classstring

The k8s pod qos class name. One of Guaranteed, Burstable, BestEffort.

k8s.replicaset.namestring

The k8s replicaset name

k8s.replicaset.uidstring

The k8s replicaset uid

k8s.replicationcontroller.namestring

The k8s replicationcontroller name.

k8s.replicationcontroller.uidstring

The k8s replicationcontroller uid.

k8s.resourcequota.uidstring

The k8s resourcequota uid.

k8s.resourcequota.namestring

The k8s resourcequota name.

k8s.statefulset.uidstring

The k8s statefulset uid.

k8s.statefulset.namestring

The k8s statefulset name.

k8s.deployment.uidstring

The UID of the Deployment.

k8s.deployment.namestring

The name of the Deployment.

k8s.cronjob.uidstring

The k8s CronJob uid.

k8s.cronjob.namestring

The k8s CronJob name

k8s.daemonset.namestring

The k8s daemonset name.

k8s.daemonset.uidstring

The k8s daemonset uid.

k8s.hpa.uidstring

The k8s hpa uid.

k8s.hpa.namestring

The k8s hpa name.

k8s.job.namestring

The k8s pod name.

k8s.job.uidstring

The k8s job uid.

k8s.kubelet.versionstring

The version of Kubelet running on the node.

container.runtimestring

The container runtime used by Kubernetes Node.

container.runtime.versionstring

The version of container runtime used by Kubernetes Node.

os.descriptionstring

The os description used by Kubernetes Node.

os.typestring

The os type used by Kubernetes Node.

openshift.clusterquota.uidstring

The k8s ClusterResourceQuota uid.

openshift.clusterquota.namestring

The k8s ClusterResourceQuota name.

k8s.container.status.last_terminated_reasonstring

Last terminated reason of a container.

Attributes

NameType Description Values
k8s.namespace.namestring

The k8s namespace name.

resourcestring

the name of the resource on which the quota is applied

conditionstring

the name of Kubernetes Node condition. Example: Ready, Memory, PID, DiskPressure

Activate or deactivate specific metrics ๐Ÿ”—

You can activate or deactivate specific metrics by setting the enabled field in the metrics section for each metric. For example:

receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

The following is an example of host metrics receiver configuration with activated metrics:

receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true

Note

Deactivated metrics arenโ€™t sent to Splunk Observability Cloud.

Billing ๐Ÿ”—

  • If youโ€™re in a MTS-based subscription, all metrics count towards metrics usage.

  • If youโ€™re in a host-based plan, metrics listed as active (Active: Yes) on this document are considered default and are included free of charge.

Learn more at Infrastructure Monitoring subscription usage (Host and metric plans).

Troubleshooting ๐Ÿ”—

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers .

  • Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups in the Get Started with Splunk Community manual.

This page was last updated on Feb 17, 2025.