-
Notifications
You must be signed in to change notification settings - Fork 1.6k
KEP-2371: update to beta #5632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
KEP-2371: update to beta #5632
Conversation
haircommander
commented
Oct 7, 2025
- One-line PR description:
- Issue link: cAdvisor-less, CRI-full Container and Pod Stats #2371
- Other comments:
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- Conduct research to find the set of metrics from `/metrics/cadvisor` that compliant CRI implementations must expose. | ||
|
||
#### Alpha -> Beta Graduation | ||
#### Beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these be done before feature gate is turned on?
The requirements for PRR have changed so ideally most of the work is complete when this is promoted to beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that's my hope. The containerd side of the verification may need to be done on a prerelease version, but since a lot of the testing will be manual I think that will be okay cc @akhilerm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @haircommander . Will have to manually verify and I am trying to get it merged in before the next beta of containerd 2.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Conformance tests for the fields in
/metrics/cadvisor
should be created.
That sounds like the tests will be automated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Conformance tests for the fields in
/metrics/cadvisor
should be created. - Validate performance impact of this feature is within allowable margin (or non-existent, ideally).
- The CRI stats implementation should perform better than they did with CRI+cAdvisor.
- cAdvisor stats provider will be marked as deprecated, as well as the cAdvisor providing the metrics endpoint
/metrics/cadvisor
. - Write migration documentation for entities relying on metrics from
/metrics/cadvisor
. - Windows stats and metrics will be added.
This seems like a lot to do for beta promotion. Is the plan to do all of this in 1.35 cycle?
It sounds like performance impact of this is also container runtime dependent so I'd expect performance numbers for CRI-O / Containerd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw we do have e2e_node test for it now https://github.com/kubernetes/kubernetes/blob/b393d87d16f225f873f72a79734b3409323b4a05/test/e2e_node/container_metrics_test.go#L39 so we'd have to find a way to transfer to conformance
I'm dropping "Write migration documentation for entities relying on metrics from /metrics/cadvisor." as we have changed the implementation to use /metrics/cadvisor still
I am also dropping windows piece, SIG windows can do a follow-up KEP for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess its not clear to me what this means actually.
This test is marked as "NodeConformance" in test/e2e_node. Are you proposing that we move this test to test/e2e/ and move it to the conformance tests for a k8s distribution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of diff but is this still an open question?
Ideally all components will rely on summary API thereby alleviating need for cAdvisor for container and pod level stats. | ||
This is also a requirement to be able to disable cAdvisor container metrics collection. | ||
|
||
To make clear to cluster admins when metrics are coming from CRI, rather than cadvisor, a new metric `kubelet_metrics_provider` will be used, with `provider` label either `cri` or `cadvisor`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are issues with kubelet metrics provider do you think its worth exposing this in the metric?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would advocate the specific providers should report their own error metrics
* **What specific metrics should inform a rollback?** | ||
###### What specific metrics should inform a rollback? | ||
|
||
The lack of any metrics reported for pods and containers is the worst case scenerio here, and would require either a rollback or for the feature gate to be disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented above but if kubelet provider is not working, should we expose a metric or something?
If Kubelet is unable to post metrics on a node, it seems difficult to find this out currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the admin attempted to roll out the feature and it failed, the metric saying provider is 'cadvisor' unexpectedly would be the signal that the fallback happened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense and the metric is exposed per node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is still a very difficult thing for someone to detect.
The lack of any metrics reported for pods and containers is the worst case scenerio here, and would require either a rollback or for the feature gate to be disabled.
So the only way someone who find this out is if a kubelet on a node stopped posting metrics and that pod/container on that node was not found in prometheus.
That seems very complicated to tell if I had 5000 nodes.
Its worth calling out that the rollback failing would be cadvisor but if the metrics are not being posted then what is the best way to find that out? How does one find the bad node via metrics or monitoring?
Please address the verify job failure. PRR shadow: I left some comments but overall I think it is close. |
Signed-off-by: Peter Hunt <pehunt@redhat.com>
f04c699
to
0c5a6c4
Compare
thanks @kannon92 updated! |
- e2e_node tests for the fields in `/metrics/cadvisor` should be created. | ||
- Validate performance impact of this feature is within allowable margin (or non-existent, ideally). | ||
- The CRI stats implementation should perform better than they did with CRI+cAdvisor. | ||
- cAdvisor stats provider will be marked as deprecated, as well as the cAdvisor providing the metrics endpoint `/metrics/cadvisor`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the deprecation be announced and exposed to the cluster admin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cAdvisor stats provider support will be dropped
My concern is that we will have to give proper notice to remove the cadvisor stats provider.
I am curious if we really need to put removal of cadvisor stats provider in this KEP. I heard that the way dockershim was done caused a lot of problems among end users so not sure if dockershim is the right path to follow here.
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.? | ||
|
||
A piece of work for Beta is moving the source of the contents of `/metrics/cadvisor`. If users toggle the feature gate, | ||
prometheus collectors will have to move the URL. However, it's an expressed intention of the implementation to have the CRI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should answer yes here. You want to deprecate and remove cadvisor stats provider, no?
* **What steps should be taken if SLOs are not being met to determine the problem?** | ||
###### What steps should be taken if SLOs are not being met to determine the problem? | ||
|
||
A cluster admin can investigate the CRI implementation, or revert the feature gate to fallback to cAdvisor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would only be valid for Beta though. This answer would not be possible to do if this feature went GA.
If there is a performance issue or someone wants to turn this feature off, does that need to be supported?
or is the goal to make sure that this feature should never be disabled when GA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A cluster admin can investigate the CRI implementation
I think this answer is coming from a cluster admin who has little knowledge of CRI implementations. What exactly would they do here if this feature misbehaved?
- Usage description: | ||
- Impact of its outage on the feature: The feature, as well as many other pieces of Kubernetes, would not work, as the CRI implementation is vital to the creation and running of Pods. | ||
- Impact of its degraded performance or high-error rates on the feature: All Kuberetes operations will slow down if the CRI spends too much energy in getting the stats. | ||
- All supported CRI-O versions have this feature, but containerd must be version 2.2 or later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will the rollout of this feature go for containerd implementations that do not support this?
Will these clusters fall back to cadvisor stats provider even if the feature gate is enabled?