Closed andresm53 closed 7 months ago
/assign @rexagod /triage accepted
FYI While this seems like a bug, it is recommended to use kube-scheduler
's exposed metrics for kube_pod_resource_{limit/request}s
.
Thanks @rexagod . The problem with that (kube-scheduler's exposed metrics
) is: in my particular case, I am using Openshift (4.12) and by default it uses kube_pod_resource_limit
to display the cpu metrics chart. This is how it looks like, for the example pod I provided before. As you can see the chart is confusing, because the pod doesn't effectively has any cpu limits, but the chart implies that it has.
@andresm53 Oh wow! Thank you for bringing this up, I'll ping the console
folks internally to take a look. That being said, I believe https://github.com/openshift/console would be a better place to raise this.
Closing, feel free to reopen in openshift/console
.
What happened: Given the following pod:
kube_pod_resource_limit
reports 500m as the pod limit.What you expected to happen: As per Init Containers documentation:
Since the app container doesn't have cpu limits, which means "no limit", I would have expected that
kube_pod_resource_limit
reportsnone
.How to reproduce it (as minimally and precisely as possible):
sum(kube_pod_resource_limit{resource='cpu',pod='example',namespace='test'})
Anything else we need to know?:
Environment: Openshift 4.12.
kubectl version
):I0102 12:41:29.597851 1 server.go:254] "Run with Kubernetes cluster version" major="1" minor="25"