Skip to main content

K8s Kubelet Stats

Overview

K8s Kubelet Stats scrapes the Kubelet /stats/summary endpoint on each node for node/pod/container resource metrics (CPU, memory, disk, network).

Supported platforms

  • Kubernetes: Metrics

Deployment Context

ParameterTypeDefaultRequiredDescription
kindstringDaemonSetYesFixed to DaemonSet (one collector per node).
priorityClassbooleanfalseNoEnable priority class for pods.
priorityClassNamestringConditionalName when priorityClass=true.
apply_tolerationsbooleanfalseNoRun on control-plane nodes.

Scrape Configuration

| Parameter | Type | Default | Required | Description | | ------------------- | ------- | ------------------------------ | -------- | ------------------------------------------------------------------- | --- | --- | ------ | | collection_interval | string | 10s | No | Scrape frequency (pattern: ^\\d+(ms | s | m | h)$). | | port | integer | 10250 | No | Kubelet port (10250=HTTPS, 10255=HTTP read-only). | | endpoint | string | ${env:K8S_NODE_NAME} | No | Target hostname (Downward API). Full: ${env:K8S_NODE_NAME}:10250. | | metric_groups | array | ["node", "pod", "container"] | No | node, pod, container, volume (PVC metrics). Checkbox UI. |

Advanced Configuration

ParameterTypeDefaultRequiredDescription
insecure_skip_verifybooleantrueNoSkip kubelet TLS verification (self-signed certs).
extra_metadata_labelsarray[]No["container.id", "k8s.volume.type"] (extra API calls). Checkbox UI.
node_utilization_metricsbooleanfalseNoPod/container CPU/memory as % of node capacity (needs K8s API).
collect_all_network_interfacesbooleanfalseNoAll NICs (increases cardinality).

Example Configuration

{
// Deployment Context
"kind": "DaemonSet",
"priorityClass": true,
"priorityClassName": "system-node-critical",
"apply_tolerations": true,

// Scrape Configuration
"collection_interval": "15s",
"port": 10250,
"endpoint": "${env:K8S_NODE_NAME}",

// Basic Configuration
"metric_groups": ["node", "pod", "container", "volume"],

// Advanced Configuration
"insecure_skip_verify": true,
"extra_metadata_labels": ["container.id", "k8s.volume.type"],
"node_utilization_metrics": true,
"collect_all_network_interfaces": true,
}

Notes

  • DaemonSet env injection. The packaging layer adds K8S_NODE_NAME and K8S_NODE_IP env vars to every DaemonSet pod via the downward API; the receiver's hardcoded https://${env:K8S_NODE_IP}:10250 endpoint resolves at startup. If you change the deployment kind to anything other than DaemonSet, those env vars won't be injected and the receiver will fail to connect.
  • DaemonSet merge. When a pipeline contains k8s_kubeletstats together with k8s_logs and/or k8s_hostmetrics, all of them are co-located in a single per-node DaemonSet (<pipeline>-node-agent) instead of separate ones. Default on — set ADL_K8S_MERGE_NODE_AGENT=false on the cloud side to opt out. See pipeline architecture.