DEV Community

Michal Marszalek
Michal Marszalek

Posted on

How much room is actually left on that k8s node?

I spent a lot of time optimizing autoscaling on a GKE cluster at my previous company. During that process, I realized no tools were available to visualize how the Kubernetes scheduler perceives cluster nodes something that could help explain why a pod gets assigned to one node over another.

So, I created a simple Python application to visualize requested resources in a Kubernetes cluster. And that’s how k8sfoams was born.
It's a local, read-only dashboard that reads your ~/.kube/config, pulls node capacity and pod resource requests, and draws your cluster as a treemap: one box per node, one foam per pod, containers nested inside, and space where the free capacity actually is. No in-cluster deployment. No metrics-server.
One pip install.
pip install k8sfoams

It supports CPU or memory visualization on a 2D view.

2d view

Or both in 3D view.
3d view

It's rendered in pure CSS 3D, so no WebGL and no GPU required.
Check out the repository and let me know your thoughts:

Top comments (0)