https://rancher.com/ logo
#general
Title
# general
r

rapid-angle-72412

03/08/2023, 4:35 PM
Hi everyone, i'm running a k3d cluster locally on WSL2 and I would like to monitor its resources usage in real-time ? I tried to use prometheus but I don't know how to connect it to my cluster. Do you know how to set up prometheus or is there a better way to do that ? Thanks for your help 🙂
b

bright-fireman-42144

03/08/2023, 5:03 PM
what resources specifically are you trying to monitor. Since it is WSL2 your can just monitor the hyper-v VMs using typical Microsoft tools. But since you are living like I am, in a spaghetti mess of virtualization it really depends on what and why you need to monitor. If it related to podSpec's it will be different than just CPU and memory of the hyper-V VM for example.
r

rapid-angle-72412

03/09/2023, 9:00 AM
Hi Dave! Actually, I'm trying to monitor CPU and memory usage of two seperate things. First the cluster itself and second each pods running on the cluster.
b

bright-fireman-42144

03/09/2023, 12:27 PM
resource monitor or any of the sysinternal tools (permonfor windows can monitor your hyper-v VMs. Rancher has built-in monitoring itself (this is 2.5 but it hasn't changed much): https://ranchermanager.docs.rancher.com/v2.5/pages-for-subheaders/monitoring-and-alerting for more native monitoring you can start with the
<http://metrics.k8s.io|metrics.k8s.io>
API (https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-usage-monitoring/) And I am a HUGE fan of the LENS IDE and it's various plugins. https://github.com/lensapp/lens
there is of course the native https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ and if command line is more of a preference: https://k9scli.io/
26 Views