Add read-only k3s pod/container attribution to node-stats MCP #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
node-stats-mcp is now useful for kai-server host inventory, but its process memory output is too low-level for k3s workloads. A live inventory saw service processes like
reddit-mcp, but Open WebUI only appeared as genericuvicorn/pythonnames. The director surface also lacked a workingkubectlbinary, so pod/container memory attribution could not be recovered fromkubectl top.Please teach node-stats-mcp a general-purpose read-only k3s view so agents can answer host-to-pod questions through MCP without shelling out to kubectl.
Suggested v1 surface:
get_k3s_pods- namespace, pod, phase, node, restart count, container names/images, pod IP, age if available.get_k3s_container_memory- namespace/pod/container memory working set/RSS where available, sorted by memory.get_k3s_process_attribution- map the existing top host processes to owning pod/container when cgroup/container metadata allows it.Implementation direction:
kubectl.Acceptance:
kai-server:9110/mcp, an agent can identifyreddit-mcpandopen-webuiby namespace/pod/container and see approximate memory use without needingkubectlin the caller container.WARD-RESERVATION: held 🔒
reservation details
Holder: container
engineer-codex-node-stats-mcp-6on hostkais-macbook-pro-2.local.Reserved by
ward agent --harness codex(reserved 2026-07-09T20:52:47Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL).--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/node-stats-mcp#6· branchissue-6· harnesscodex· workflowdirect-to-mainengineer-codex-node-stats-mcp-6· wardv0.501.0· dispatched2026-07-09T20:52:47ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.501.0).
— Codex, via
ward agentWARD-OUTCOME: done ✅
details
workflow: direct-to-main; review summary: skipped by ~/.ward/config.yaml default
Implemented read-only k3s pod/container inventory, cgroup-backed process attribution, and RSS fallback.
felt: a bit heavier than the surface suggested, mostly around kubeconfig and typing.
confidence: high.
surprise: host-mounted k3s kubeconfig was enough, so no deploy-repo edit was needed here.
follow-ups: set NODE_STATS_KUBECONFIG if the host path changes.