aksarav / kube-node-usage Goto Github PK
View Code? Open in Web Editor NEWKubernetes Node Usage Visualizer to view Disk, Memory and CPU Usage - From Terminal
License: GNU General Public License v2.0
Kubernetes Node Usage Visualizer to view Disk, Memory and CPU Usage - From Terminal
License: GNU General Public License v2.0
i download git repo and trying to run lib from release folder but it is not running.
from where we can get python code.
or please update installation steps.
python3 kube-node-usage.py --disk
# Kube-Node-Usage
# Release 1.0.3
# https://github.com/AKSarav/Kube-Node-Usage
Failed to execute the Kubectl get nodes command
We would like to see what the requests/limits are. We can see it by individually describing our nodes, but it would be really nice to integrate that into this tool.
Thanks!
Hi,
Just ran the disk command with: python kube-node-usage.py --disk
but it fails with the following error:
# Kube-Node-Usage
# Release 2.0.0
# https://github.com/AKSarav/Kube-Node-Usage
Traceback (most recent call last):
File "/home/chris/workspace/Kube-Node-Usage/kube-node-usage.py", line 361, in <module>
main()
File "/home/chris/workspace/Kube-Node-Usage/kube-node-usage.py", line 352, in main
action(usagetype, sortby, isreverse, filternodes, filtercolors)
File "/home/chris/workspace/Kube-Node-Usage/kube-node-usage.py", line 165, in action
max_inmb=round(int(maximum) / 1024 / 1024)
ValueError: invalid literal for int() with base 10: '51175Mi'
From the kubectl get nodes -o json
command output; here is an example of the returned values:
"allocatable": {
"cpu": "40",
"ephemeral-storage": "50977832921",
"hugepages-1Gi": "0",
"hugepages-2Mi": "0",
"memory": "65491060Ki",
"pods": "110"
},
"capacity": {
"cpu": "40",
"ephemeral-storage": "51175Mi",
"hugepages-1Gi": "0",
"hugepages-2Mi": "0",
"memory": "65491060Ki",
"pods": "110"
},
Is this an issue with the k8s format?
For information, here is the version of k8s:
kubectl version
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.7+k3s1", GitCommit:"8432d7f239676dfe8f748c0c2a3fabf8cf40a826", GitTreeState:"clean", BuildDate:"2022-02-24T23:03:47Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
Hope this will help.
Regards,
Chris
Hi,
I got the following error when running command:
python3 kube-node-usage.py --cpu --sort=usage
"Failed to execute the Kubectl get node command"
Please note that I'm able to successfully execute the command:
kubectl get nodes
Thanks for your support.
Regards
Tested on Linux: It seems the application can be exited with "q" or ctrl-c while it states 'press any key to exit'. Space and return do not work.
https://github.com/AKSarav/Kube-Node-Usage/blob/main/kube-node-usage.py#L111
Variables ending with inmb
starting here should be suffixed with ingb
since you devide the Ki value by 1024 twice, which gives GiB.
As the title says, when I run any command it says
"Failed to execute the Kubectl get nodes command"
This is a kubernetes running on oracle cloud, with 3 nodes.
If I run kubectl get nodes I get the correct info, but running the python script I get the error.
I think it is best practice to add the build results to .gitignore to prevent accidental commits and repository bloat.
To make discovery of the current artifacts easier they could be attached to a github release and the 'release' folder removed from git. (You may want to rewrite the history to reduce the size of the git repository.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.