Bin packing and cluster autoscaler coexistence¶
Attune optimizes pod requests and limits (vertical loop). Real cluster cost reduction usually also needs better packing and fewer (or smaller) nodes. Those are complementary jobs.
What Attune does¶
- Right-sizes running pods via in-place resize
- Guards increases against node allocatable headroom
- Skips request increases when the node is under MemoryPressure, DiskPressure, or PIDPressure (decreases still allowed)
- Exposes savings metrics and status for capacity planning
What Attune does not do¶
- Provision or deprovision nodes
- Replace Cluster Autoscaler, Karpenter-class provisioners, or cloud ASGs
- Own bin-packing placement (the scheduler still places pods)
Safe coexistence patterns¶
- Run Attune so over-requested workloads free request capacity.
- Let your node autoscaler consolidate underutilized nodes on its own schedule and disruption budgets.
- Prefer Recommend → Canary → Auto so aggressive shrink does not fight concurrent node drains without observation.
- Use savings / reclaimed capacity signals (status + Grafana) as input to capacity reviews; do not wire Attune as a remote node controller.
Node capacity awareness¶
See also issue-aligned behavior:
- Skip resizes that would make total pod requests exceed node allocatable
- Skip request increases under node pressure conditions
Tune maxAllowed and change caps so recommendations stay within typical
node shapes for the pool.
Related¶
- Multi-cluster for fleet dashboards
- Scaling guide for operator sizing
- HPA coexistence
Reclaimed capacity signals¶
After each reconcile (non-Observe modes), Attune estimates freeable request capacity if recommended decreases were applied:
| Surface | Field / metric |
|---|---|
| Status | status.savings.reclaimedCpuRequest, reclaimedMemoryRequest |
| Status (legacy names) | cpuRequestReduction, memoryRequestReduction |
| Prometheus | attune_reclaimed_request_cpu_cores{namespace,policy} |
| Prometheus | attune_reclaimed_request_memory_bytes{namespace,policy} |
| Prometheus (namespace totals) | attune_savings_cpu_cores_total, attune_savings_memory_bytes_total |
Using with cluster autoscalers¶
- Prefer Attune in Recommend or Canary until reclaimed capacity is stable.
- Feed reclaimed metrics into capacity dashboards (Grafana panel "Reclaimed request capacity").
- Let Cluster Autoscaler / Karpenter consolidate on their disruption budgets; do not trigger node delete from Attune.
- Cross-check node pressure skips (
attune_capacity_skip_total) so you do not interpret "no resize" as "no savings opportunity."
Phase B design (optional export for consolidation controllers)¶
Future opt-in work (not required for Phase A):
- Annotate or export a small ConfigMap per namespace with aggregate
reclaimedCpu/reclaimedMemoryand policy generation for external consolidation controllers to scrape without Prometheus. - No hard dependency on a vendor autoscaler API in Attune core.
See also node capacity formulas.