
k8sfoams¶
Where is your cluster's requested CPU, memory and GPU actually going, and how much room is left on each node?
k8sfoams is a local, read-only dashboard for Kubernetes. It draws every node as a box and every pod as a foam
sized by its resource requests: what the scheduler reserves, not live usage. That makes it a tool for spotting
over-requesting pods and idle headroom, not a performance monitor. It runs on your laptop, reads ~/.kube/config
(or $KUBECONFIG) with the standard Kubernetes client, and needs no in-cluster deployment and no metrics-server.
The dashboard below is the real thing, running on a synthetic cluster in your browser. Click a node to see its pods
and simulate a drain, hover a pod, type audit:spof-zone into the query bar, or switch to the 3D view.
What it shows¶
-
A squarified treemap of nodes and pods, or an isometric cube per pod with CPU as footprint and memory as height.
-
Free capacity on a cordoned, NotReady, pressured or tainted node is hatched, because it is not really free.
-
Box nodes by zone, region, node pool, instance type or spot / on-demand to see where capacity is uneven.
-
Missing requests or limits, monoliths, naked pods, single replicas and replicas sharing one node, zone or spot pool.
-
Color pods by QoS class to see what the kubelet evicts first under memory pressure.
-
"Can I fit this pod?", "What happens if I drain this node?" and "Do the pending pods fit?", answered against free allocatable capacity, with or without hypothetical nodes.
-
A query bar that highlights matching pods and dims the rest: namespaces, labels, QoS, nodes, findings.
-
GPUs, ephemeral storage and HugePages get their own map, with fragmentation and stranded devices called out.
Quick start¶
pip install k8sfoams
k8sfoams # your kubeconfig contexts, at http://127.0.0.1:8080
k8sfoams --synthetic # no cluster needed: the demo clusters, changing as you watch
See Getting started for installing from source, and Synthetic mode for what the demo clusters contain.