Skip to main content

k8s-pod-foamtree

k8sfoams logo

k8sfoams is a local, read-only dashboard. It answers one question: where is my cluster's requested CPU and memory actually going, and how much room is left on each node?

It shows resource requests (what the scheduler reserves), not live usage. Use it to find pods that request too much and idle headroom. It is not a performance monitor. It runs on your laptop and reads ~/.kube/config (or $KUBECONFIG) with the standard Kubernetes client. It needs no in-cluster deployment and no metrics-server.

Documentation · Live demo: the real dashboard on synthetic clusters, in your browser.

k8sfoams walkthrough on synthetic data: the 2D map, workload highlighting, grouping by zone, node health, audit, QoS, drain and fit simulations, the 3D view and GPUs

A one-minute tour on the synthetic demo clusters. Run it yourself with k8sfoams --synthetic.

Features

  • 2D map and 3D cubes of every node and pod, sized by requests.
  • Node health: the map hatches free capacity on cordoned, NotReady, pressured or tainted nodes, because that capacity is not really free.
  • Topology: group nodes by zone, region, node pool, instance type or spot / on-demand.
  • Audit & hygiene: missing requests or limits, monoliths, naked pods, single replicas, replicas sharing one node, zone or spot pool.
  • QoS & eviction risk: color pods by QoS class.
  • Scheduling simulators: "Can I fit this pod?", "What happens if I drain this node?", "Which nodes could be removed?", "Can I scale this workload by N replicas?" and "Do the pending pods fit?", with hypothetical nodes to try node shapes before you add them.
  • Filtering: a query bar that highlights matching pods by namespace, label, QoS, node, topology or finding.
  • Extended resources: GPUs, ephemeral storage and HugePages, with fragmentation and stranded devices.
  • Export to PNG, SVG, JSON or CSV, and shareable links to any view.
  • Live updates from a watch cache, so scaling a Deployment shows up within seconds.
  • AI advisor (optional): with an OpenAI-compatible key (or a local Ollama model), it gives prioritised recommendations with YAML / kubectl fixes. Its chat answers questions about k8sfoams and the cluster on screen. It is off by default. It shows what it sends before it sends it, and it can redact names.

Installation

pip install k8sfoams
# or with uv
uv pip install k8sfoams

To install from source, see Getting started.

Run

k8sfoams              # your kubeconfig contexts, at http://127.0.0.1:8080
k8sfoams --synthetic  # no cluster needed: generated demo clusters that keep changing

For CI and cron, report writes the same JSON / CSV export without the dashboard. It can also fail the job on a policy:

k8sfoams report --context prod --format csv --output prod.csv
k8sfoams report --context prod --fail-on audit:missing-requests,health:not-ready  # exit 1 when violated

A context switch in the dashboard never changes your kubeconfig. The command-line reference lists every option, the report exit codes and a GitHub Actions example. Synthetic mode describes what the demo clusters contain.

Security

  • Listens on 127.0.0.1 by default. Requests with an unknown Host header (DNS rebinding) or a cross-site Origin get 403.
  • With --host 0.0.0.0 (or any non-loopback address), it warns at startup and requires a token. It prints the token in the startup URL (http://host:8080/#token=…). Use --token to choose the token and --no-auth to opt out. Use --allowed-host NAME for each name you open it by.
  • It only reads the cluster, with your kubeconfig credentials, and never changes it.

See Network access.

Development

make restore_dev     # install with dev dependencies
make run-synthetic   # build the UI and run on the synthetic clusters
make tests           # type checking, linting, security, unit tests
make docs-serve      # the docs site with live reload

See Development for the frontend build, the docs and the CI targets.

Metadata

Release files for k8sfoams 1.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k8sfoams 1.16.0
File Size Uploaded Provenance Actions
k8sfoams-1.16.0.tar.gz 1.0 MB Without provenance Details for k8sfoams-1.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for k8sfoams 1.16.0
File Interpreter ABI Platform Actions
k8sfoams-1.16.0-py3-none-any.whl Python 3 none any Details for k8sfoams-1.16.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / k8sfoams-1.16.0.tar.gz

Download URL k8sfoams-1.16.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
650efb834519f45715d576f8b206a84fe37023de302756d223830383558c8c8e
BLAKE2b-256 checksum
How to use checksums
888d8451a739581c8527e2f0468639a8489d59f874918aa55ed6cded42b55de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / k8sfoams-1.16.0-py3-none-any.whl

Download URL k8sfoams-1.16.0-py3-none-any.whl
Size 976.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3ada5c2f559c909a479cd332997d1a3eff6d6af4f7a7f74e83b0e41a9a84355
BLAKE2b-256 checksum
How to use checksums
91b00c0f4340944e57538c3253baacb890be3b62c884ede5186bb9fb67c934b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for k8sfoams 1.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page