Skip to main content

K8s Cluster

Overview

K8s Cluster collects cluster-level state metrics from the Kubernetes API server. It provides visibility into node conditions, resource allocation, workload states, and metadata across your cluster. It is ideal for monitoring cluster health, scheduling behavior, and infrastructure-level signals.

Supported platforms

  • Kubernetes: Metrics

Workload Configuration

ParameterTypeDefaultRequiredDescription
kindstringDeploymentYesThe source runs as a Deployment.
enable_leader_electionbooleantrueNoEnsures only one pod scrapes the API at a time (HA mode).
replica_scaling_typestringmanualNoScaling mode: manual or auto.
replicasinteger2ConditionalRequired when replica_scaling_type = manual.
priorityClassbooleanfalseNoAssign priority class to pods.
priorityClassNamestringConditionalRequired when priorityClass = true.
apply_tolerationsbooleanfalseNoAllow scheduling on control-plane nodes.

Metric & Metadata Configuration

ParameterTypeDefaultRequiredDescription
collection_intervalstring10sNoFrequency at which cluster metrics are collected.
resource_attributesarray["container.id", "k8s.pod.uid"]NoAdditional resource attributes attached to metrics.
node_conditions_to_reportarray["Ready"]NoNode conditions emitted as metrics (supported options: Ready, MemoryPressure, DiskPressure, PIDPressure, NetworkUnavailable).
allocatable_types_to_reportarray[]NoNode allocatable resources to track (options: cpu, memory, pods, ephemeral-storage).

Advanced Settings

ParameterTypeDefaultRequiredDescription
distributionstringkubernetesNoKubernetes distribution (kubernetes or openshift).
namespacesarray[]NoLimit metrics to specific namespaces.
metadata_collection_intervalstring5mNoInterval for refreshing metadata.

Example Configuration

{
// Workload Configuration
"kind": "Deployment",
"enable_leader_election": true,
"replica_scaling_type": "manual",
"replicas": 2,
"priorityClass": false,
"priorityClassName": "",
"apply_tolerations": false,

// Metric & Metadata Configuration
"collection_interval": "10s",
"resource_attributes": ["container.id", "k8s.pod.uid", "k8s.node.uid"],
"node_conditions_to_report": ["Ready", "MemoryPressure", "DiskPressure"],
"allocatable_types_to_report": ["cpu", "memory", "pods"],

// Advanced Settings
"distribution": "kubernetes",
"namespaces": ["production", "staging"],
"metadata_collection_interval": "5m",
}