-
Notifications
You must be signed in to change notification settings - Fork 920
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
kubectl describe
sometimes shows memory in millibytes
#1597
Comments
This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
kubectl describe node
sometimes shows total memory in millibyteskubectl describe
sometimes shows total memory in millibytes
kubectl describe
sometimes shows total memory in millibyteskubectl describe
sometimes shows memory in millibytes
I see the same thing, and also get a warning. Here is what I did:
Are you able to use
|
Regardless, it seems like a pretty bad way to show the node resource usage when you do I'm not sure if that is kubectl formatting the quantity or if it comes from the API already formatted 👀 |
The warning is probably missed for most people who are using an automated CI environment; no one sees it unless it prevents it from being applied.
ran
but this is also not meant to be human readable, i guess? |
It looks like requests/limits are parsed into a Quantity type. From there, it has some functions that looks like it supports different "scales", so allowing for the conversion between different units. For So there should be the ability to detect and handle the display format, if it can be decided how it should be done. Is it just detecting when memory is fractional and rounding up to bytes? So in the case of I suppose it could also print a warning in the describe output saying that a fractional byte quantity was detected. Ideally, resources should not specify memory or storage quantities this way at all, since there isn't really any meaning to a fractional byte. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
We could emit a warning at admission time when this is detected. And then either round up or leave it as-is. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/assign |
I’ve implemented a feature that rounds memory requests to the nearest unit, providing a human-readable output |
via
kubectl describe node XXX
:This can happens when some pods request sub-byte memory accidentally.
I saw a pod requesting
0.1Gi
of memory.which shows up in kubernetes as:
This phenomenon happens here because 10 does not divide a perfect power of 2:
This sub-byte number propagates throughout and is visible in the
descibe node
output as above, as well as thedescribe pod
output.Expected Behaviour:
Rounding to nearest actual unit (bytes) or a human readable output with 3 significant digits on the biggest unit.
Environment:
EKS 1.29, kubectl client at 1.30.0
The text was updated successfully, but these errors were encountered: