| name | container-density-audit |
| description | Audit Kubernetes/container clusters for poor bin-packing — inflated resource requests vs actual usage, low node utilization, missing autoscaling, pods hoarding capacity. Use this skill whenever the user shares k8s manifests, kubectl top / metrics-server output, cluster utilization data, or asks about node counts, pod density, cluster efficiency, or Kubernetes sustainability. Part of Lean Agentic AI Skills; emits lean-findings.json. |
Container Density Audit
Producer skill. Input: manifests (requests/limits), kubectl top nodes/pods output, cluster autoscaler config, node inventory. Output: lean-findings.json.
In Kubernetes the scheduler believes requests, not reality. Every pod requesting 4x what it uses forces the cluster to run nodes that are "full" on paper and idle in silicon. Density is the M-lever: fewer nodes for the same work.
Subject type: emit subject.type: "container-platform" in findings.
Signatures
- Request inflation — usage-to-request ratio < 30% across a workload's pods. High. Evidence: actual vs requested from metrics. Fix: lower requests (state the new value and the headroom retained) or install VPA in recommend mode first.
- Missing requests entirely — scheduler flying blind; density unmanageable. Medium-high.
- Limits == requests everywhere for burstable workloads — no bursting, forced oversizing. Medium (context-dependent — Guaranteed QoS may be deliberate; ask/flag rather than assert).
- Node utilization — fleet p95 CPU/mem below ~50% with stable pod count → node pool downsizing or consolidation candidate. High.
- No cluster autoscaler / no scale-down —
scale-down-disabled annotations everywhere, generous over-provisioning buffers. Medium.
- System overhead — daemonsets summing to a large slice of small nodes → fewer, larger nodes often pack better. Low-medium; name the trade-off (blast radius).
- Missing PodDisruptionBudgets blocking consolidation — autoscaler can't drain. Low.
Honesty rules
Bin-packing tighter trades against noisy-neighbor risk and surge headroom; every density recommendation states retained headroom. Never recommend request cuts from a utilization window that misses known peaks — say what the window was.
Cost signal (countable)
Cost driver: node-hours (or the cluster's billed capacity unit). cost_signal.observed names the current node fleet size and utilisation, direction reflects the consolidation opportunity qualitatively.
Not this skill's job
VM-level sizing (right-size-compute), whether workloads belong on k8s at all (vm-to-serverless-advisor).