kubebox icon indicating copy to clipboard operation
kubebox copied to clipboard

CPU limits wrong

Open lduparc opened this issue 5 years ago • 7 comments

Running Kubebox (latest version)

CPU LImit (red line) display CPU request config and not real limit set in Deployment config. Checking kubernetes dashboard, cpu is well set. All ok concerning memory.

Eg:

resources:
  limits:
    cpu: 4
    memory: 4Gi
  requests:
    cpu: 1
    memory: 2Gi

Screenshot from Kubebox:

Screenshot 2020-11-11 at 12 37 57

Screenshot from Kubernetes dashboard:

Screenshot 2020-11-11 at 12 39 32

lduparc avatar Nov 11 '20 11:11 lduparc

Interesting, it's taken from cAdvisor stats:

https://github.com/astefanutti/kubebox/blob/1e599a10d52e32cb47cec7fca90e519779aaa251/lib/ui/dashboard.js#L588

I need to dig into it to understand why that's different from the pod compute resources.

astefanutti avatar Nov 12 '20 11:11 astefanutti

Hi,

Thinking about this issue. FYI I'm using kubernetes 1.19 and I saw some breaing changes between kube-state-metrics & cadvisor which can explain (not sure) why we don't have the right information on Kubebox

lduparc avatar Nov 21 '20 09:11 lduparc

It's not related to kubernetes 1.19. I check kubebox version 0.7.0 and all is ok. This issue exist since version 0.8.0. Issue still exist on v0.9.0

Thanks

lduparc avatar Nov 24 '20 12:11 lduparc

Thanks for the precision. That helps a lot. Before 0.8.0, the cAdvisor embedded into the kubelet was queried through the container stats API. Starting 0.8.0, it uses the APIs from the external cAdvisor DaemonSet.

Here is what was used from the container stats endpoint response:

https://github.com/astefanutti/kubebox/blob/01b28a2dc33831c635f4577e691c3a2bc977a6a0/lib/ui/dashboard.js#L484

While the following bit from the cAdvisor API doesn't seem to match:

https://github.com/astefanutti/kubebox/blob/1e599a10d52e32cb47cec7fca90e519779aaa251/lib/ui/dashboard.js#L588

astefanutti avatar Nov 24 '20 12:11 astefanutti

Hi, Hope end of year are good for you.

Any news concerning this issue ? Are you able to reproduce ?

Thanks.

lduparc avatar Dec 28 '20 09:12 lduparc

@lduparc I don't have any update. I've mostly been AFK to enjoy end of 2020 😄. I'll work on it ASAP and keep you posted.

astefanutti avatar Jan 03 '21 11:01 astefanutti

Happy New Year,

Let me know if you need help to test.

lduparc avatar Jan 07 '21 09:01 lduparc

I've removed the limits from the time series in 0448a18e9e6acabba004d44fd1d0625027ba48ed, as they tend to flatten the other ones. I may find a better way to bring the limits in the UI.

astefanutti avatar Mar 15 '23 15:03 astefanutti