<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk" -->

---
title: Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes...
description: A deep technical walkthrough of how Kubernetes collects container, pod, and node metrics, tracing the path from Linux cgroups through cAdvisor and into the...
canonical: https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats | daily.dev
og:description: A deep technical walkthrough of how Kubernetes collects container, pod, and node metrics, tracing the path from Linux cgroups through cAdvisor and into the...
og:url: https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk
og:image: https://api.daily.dev/og/posts/orz6uHrNK.png
og:image:alt: Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats

**[LearnKube](https://daily.dev/sources/learnkube)** · 34 min read · 0 upvotes · 0 comments

## Summary

A deep technical walkthrough of how Kubernetes collects container, pod, and node metrics, tracing the path from Linux cgroups through cAdvisor and into the CRI-native metrics model. It covers cgroup v1 vs v2, cgroup drivers (cgroupfs vs systemd), QoS-based cgroup placement, the KubeletCgroupDriverFromCRI feature gate (GA in v1.34), kubelet's four metrics endpoints (/metrics/cadvisor, /stats/summary, /metrics/resource, /metrics), and how enabling the PodAndContainerStatsFromCRI alpha feature gate shifts pod/container stats sourcing from cAdvisor to containerd via CRI gRPC calls, validated with crictl and journalctl.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://learnkube.com/kubernetes-metrics-cadvisor-kubelet-cri>

## Questions this post answers

### What happens when PodAndContainerStatsFromCRI is enabled in kubelet?

Kubelet stops asking cAdvisor for pod and container stats and instead calls the CRI stats RPCs (ListPodSandboxStats, PodSandboxStats, ListContainerStats) directly on the container runtime, such as containerd, over gRPC. cAdvisor keeps providing node-level and filesystem stats. As a result, the /metrics/cadvisor endpoint stops showing per-container labels and only exposes machine-level metrics.

_Track kubelet feature gate changes like this one on daily.dev before they affect your metrics pipeline._

### Is cgroup v1 deprecated in Kubernetes?

Yes, cgroup v1 has been officially deprecated since Kubernetes v1.35 as part of KEP-5573. Starting with v1.35, kubelet no longer starts on cgroup v1 nodes by default unless failCgroupV1 is explicitly set to false, and full code removal is planned no earlier than Kubernetes v1.38, so clusters still on cgroup v1 need a migration plan to cgroup v2.

_Plan cgroup v2 migrations ahead of removal deadlines by following Kubernetes release changes on daily.dev._

### How does kubelet decide whether to use the systemd or cgroupfs cgroup driver?

With the KubeletCgroupDriverFromCRI feature gate, which reached GA in Kubernetes v1.34, kubelet asks the container runtime at startup which cgroup driver to use via the CRI RuntimeConfig RPC, and no longer needs the gate set explicitly on 1.34+. If the runtime doesn't implement RuntimeConfig, kubelet falls back to the cgroupDriver value in its own config file, which must then match the runtime's own setting.

_Compare cgroup driver auto-detection behavior across Kubernetes versions on daily.dev when upgrading clusters._

## Similar posts on daily.dev

- [Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats](https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-4wabf62bx) · ITNEXT · 1 upvotes · 0 comments
- [Understanding Kubernetes metrics: Best practices for effective monitoring](https://daily.dev/posts/understanding-kubernetes-metrics-best-practices-for-effective-monitoring-xcvyov493) · CNCF · 1 upvotes · 0 comments
- [Kubernetes Metrics: Types, Tools, & Monitoring Guide](https://daily.dev/posts/kubernetes-metrics-types-tools-monitoring-guide-vfxngka7f) · Spacelift · 4 upvotes · 0 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats","url":"https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk"},"datePublished":"2026-08-31T11:20:03.930Z","dateModified":"2026-08-31T11:20:30.472Z","description":"A deep technical walkthrough of how Kubernetes collects container, pod, and node metrics, tracing the path from Linux cgroups through cAdvisor and into the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5d33de84bad73721dd2b12c0ce2b8d30?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5d33de84bad73721dd2b12c0ce2b8d30?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"LearnKube","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"LearnKube","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/90786df1b5d44abb91a090a0b6c81517","url":"https://daily.dev/sources/learnkube"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kubernetes,observability","timeRequired":"PT34M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"LearnKube","item":"https://daily.dev/sources/learnkube"},{"@type":"ListItem","position":3,"name":"Kubelet Metrics: How cAdvisor and CRI Collect Kubernetes Stats"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/kubelet-metrics-how-cadvisor-and-cri-collect-kubernetes-stats-orz6uhrnk#faq","mainEntity":[{"@type":"Question","name":"What happens when PodAndContainerStatsFromCRI is enabled in kubelet?","acceptedAnswer":{"@type":"Answer","text":"Kubelet stops asking cAdvisor for pod and container stats and instead calls the CRI stats RPCs (ListPodSandboxStats, PodSandboxStats, ListContainerStats) directly on the container runtime, such as containerd, over gRPC. cAdvisor keeps providing node-level and filesystem stats. As a result, the /metrics/cadvisor endpoint stops showing per-container labels and only exposes machine-level metrics. Track kubelet feature gate changes like this one on daily.dev before they affect your metrics pipeline."}},{"@type":"Question","name":"Is cgroup v1 deprecated in Kubernetes?","acceptedAnswer":{"@type":"Answer","text":"Yes, cgroup v1 has been officially deprecated since Kubernetes v1.35 as part of KEP-5573. Starting with v1.35, kubelet no longer starts on cgroup v1 nodes by default unless failCgroupV1 is explicitly set to false, and full code removal is planned no earlier than Kubernetes v1.38, so clusters still on cgroup v1 need a migration plan to cgroup v2. Plan cgroup v2 migrations ahead of removal deadlines by following Kubernetes release changes on daily.dev."}},{"@type":"Question","name":"How does kubelet decide whether to use the systemd or cgroupfs cgroup driver?","acceptedAnswer":{"@type":"Answer","text":"With the KubeletCgroupDriverFromCRI feature gate, which reached GA in Kubernetes v1.34, kubelet asks the container runtime at startup which cgroup driver to use via the CRI RuntimeConfig RPC, and no longer needs the gate set explicitly on 1.34+. If the runtime doesn't implement RuntimeConfig, kubelet falls back to the cgroupDriver value in its own config file, which must then match the runtime's own setting. Compare cgroup driver auto-detection behavior across Kubernetes versions on daily.dev when upgrading clusters."}}]}
```

