Skip to content

feat(k8s): node capacity and GPU allocation in the dashboard's Kubernetes tab #807

Closed as not planned

Description

@dan-petty

Context & Rationale

After #686, the Kubernetes tab shows only whether nodes are Ready. Most of the capacity data is already available:

  • Node allocatable CPU, memory and nvidia.com/gpu are on the Node objects that the core/v1 list_node call returns (src/devops_cli/k8s/service.py:196-214). On 2026-10-01 every node of the workstation's cluster reported allocatable nvidia.com/gpu.
  • Live usage needs the metrics.k8s.io API. The cluster's metrics-server serves it (/apis/metrics.k8s.io/v1beta1/nodes returned a NodeMetricsList), but no code in src reads it: rg -F metrics.k8s.io src finds nothing. The only mention of node usage is kubectl top in src/devops_cli/ai/knowledge_base/it_domains/tools/kubectl.md:66-67.

Scope & Deliverables

  • Deliverable: a node view in the Kubernetes tab that shows, for each node:
    • CPU and memory requested (the sum of pod requests) against allocatable;
    • live usage from metrics.k8s.io when the API is served, and "usage unavailable" otherwise;
    • GPUs requested against allocatable nvidia.com/gpu.
  • Acceptance criteria:
    • The requested and allocatable figures match "Allocated resources" in kubectl describe node.
    • Usage matches kubectl top nodes within one refresh.
    • When the metrics API is absent, the view says so and the pod table is unaffected.
    • Tests fake both APIs and use generic node names.
  • Key questions:
    • Gauges or a table? A table row per node with a text bar (proposed).
    • Fetch metrics on every refresh? Only while the node view is visible (proposed).
  • Constraint: no Prometheus dependency. The view only reads from the cluster, and all API calls run on worker threads with a bounded _request_timeout. No physical node names appear in tests or docs (AGENTS.md:30).

Strategic Alignment

Activity

  1. added
    type/feature
    scope/k8s
    priority/p3-low
    on Oct 1, 2026
  2. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #808, #809 and #811. All four split from #686 and add to the Kubernetes tab's BINDINGS (ui/dashboard.py:169-183); whichever lands second checks its key is free. Found by the 2026-10-08 backlog review.

  3. dan-petty commented on Oct 25, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned, 2026-10-25. The owner accepted the recommendation to use k9s for the Kubernetes functions of devops dashboard. The audit of the Kubernetes and Logs tabs is on #1885.

    k9s v0.51.0, which devops install-tools pins, covers this item. :nodes shows each node with its CPU and memory use against allocatable from metrics.k8s.io, and the columns GPU/A and GPU/C for nvidia.com/gpu and amd.com/gpu (strings of the installed binary, 2026-10-25). The pod view shows the GPU requests and limits of each pod.

    One part is not in k9s: the sum of the GPU requests on each node. kubectl describe node <node> shows it under "Allocated resources".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p3-lowscope/k8stype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions