Skip to content
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

Add resource awareness for node #1963

Closed
huoqifeng opened this issue Dec 6, 2020 · 7 comments
Closed

Add resource awareness for node #1963

huoqifeng opened this issue Dec 6, 2020 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@huoqifeng
Copy link

What would you like to be added:
Resources awareness of a container node comes from the host, it's not same as the resources limited by the cgroup. There is a PR tracked in cadvisor to discuss how to hack it google/cadvisor#2699, I recently find a project lxcfs https://github.com/lxc/lxcfs which seems meet all the requirements.

Why is this needed:
With this implemented, we can use metrics to monitor a container nodes resources capability and usability.

@huoqifeng huoqifeng added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 6, 2020
@BenTheElder
Copy link
Member

It's not clear to me that lxcfs is actually a reasonable approach here, or that kind is a good approach to running things with serious resource management (e.g. most users probably have swap enabled which would ordinarily cause kubelet to refuse to run).

The system reserved approach seems possibly acceptable

@huoqifeng
Copy link
Author

I agree https://github.com/lxc/lxcfs did not handle SWAP precisely, and I agree kind does not serious depends on resources awareness today. But I think it's a good feature for users who use kind that he/she can also uses metrics server against kind cluster -- isn't it cool to experiment more functions on kind? Right, maybe, more options need be explored for right approach...

@BenTheElder
Copy link
Member

Sure but experimenting is possible without agreeing to ship something in the project 😅

I commented upstream about another approach.

@BenTheElder BenTheElder added the kind/design Categorizes issue or PR as related to design. label Dec 8, 2020
@BenTheElder
Copy link
Member

there's discussion in google/cadvisor#2699 and in SIG Node slack. There's significant pushback against having any way to tell cAdvisor what the actual host limits are w/o relying on auto-detection and against letting cAdvisor read it from the cgroup.

To a certain extent it may still be possible to implement a bad version of this by setting a computed system-reserved at the kubelet level. Or by bind mounting static fakes / using something similar to lxcfs (bringing on their own problems...).

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 2, 2021
@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 1, 2021
@BenTheElder BenTheElder added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jun 23, 2021
@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Jun 23, 2021
@kubernetes-sigs kubernetes-sigs deleted a comment from fejta-bot Jun 23, 2021
@BenTheElder
Copy link
Member

we may have a new opportunity in the future kubernetes/enhancements#2371

@MadhavJivrajani
Copy link

/remove-kind design
/kind feature
kind/design is migrated to kind/feature, see kubernetes/community#6144 for more details

@k8s-ci-robot k8s-ci-robot removed the kind/design Categorizes issue or PR as related to design. label Oct 11, 2021
@BenTheElder
Copy link
Member

This is really a dupe of the earlier issue #877

Worth noting that kubelet seems to be moving in the direction of CRI providing the stats, not necessarily with cAdvisor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

4 participants