We are moving to Kubernetes with our applications. So I’ve installed Rancher Desktop om my laptop to get some hands-on experience. I’ll post my findings here.
Metrics server and Metrics API
With the Metrics API you can get CPU and Memory usage from your nodes or pods. By default this is not working in Rancher Desktop.
kubectl top node
error: Metrics API not available
kubectl top pod -A --sort-by memory
error: Metrics API not available
The documentation shows you’ll need a Metrics Server to get this working. Also a location with deployment information is provided. But there is a faster method for Rancher Desktop.
Extensions
Rancher Desktop provides extensions from a “marketplace”. Look for tachometer and install it.
Now the Metrics Server is installed and the Metrics API will work. You’ll also get an interactive view of the pods resource usage in the Rancher Desktop Tachometer tab.
References
Kubernetes documentation https://kubernetes.io/docs/tasks/debug/debug-cluster/resource-metrics-pipeline
Tachometer on docker hub https://hub.docker.com/extensions/julianb90/tachometer