A sanitized, opinionated reference for cutting the compute bill on Amazon EKS without sacrificing reliability. It pulls together the four levers that move the needle most — Karpenter consolidation, Graviton migration, rightsizing, and honest OpenCost vs. Kubecost measurement — as adaptable patterns rather than a drop-in install.
Sanitized reference. Cluster names, roles, cost centers, and limits here are examples (
example-cluster,cc-1001,payments). Treat this as a pattern library to adapt to your own cluster, not a copy-paste deploy.
| Lever | What it saves | Where |
|---|---|---|
| Karpenter | Bin-packs pods onto fewer, right-sized nodes; Spot-first with consolidation | karpenter/ |
| Graviton | ~20% price/performance vs. equivalent x86 for many workloads | graviton/ |
| Rightsizing | Removes the padding between requests and real usage | rightsizing/ |
| Measurement | OpenCost/Kubecost attribute net (CUR-based) spend by team/namespace | cost-tools/ |
flowchart TD
RS[Rightsizing<br/>requests match real usage] --> PACK
subgraph PACK[Karpenter]
CONS[Consolidation<br/>bin-pack onto fewer nodes]
SPOT[Spot-first + On-Demand fallback]
GRAV[Graviton NodePool<br/>arm64, weighted-preferred]
end
GR[Graviton-ready workloads<br/>multi-arch images] --> GRAV
PACK --> NODES[Fewer, cheaper, better-utilized nodes]
NODES --> MEAS[OpenCost / Kubecost<br/>net cost via CUR]
MEAS -->|shows remaining waste| RS
- Rightsizing shrinks per-pod requests, so Karpenter can pack more pods per node.
- Karpenter consolidation then removes the now-underutilized nodes.
- Graviton makes each of those nodes cheaper for the same performance.
- OpenCost/Kubecost measure net spend by team and feed the next rightsizing pass.
Order matters: rightsize first, then let consolidation and Graviton compound the savings. Measurement closes the loop.
| Path | Contents |
|---|---|
karpenter/ |
NodePool + EC2NodeClass — Spot-first general pool, weighted Graviton pool, consolidation |
graviton/ |
Migration playbook, multi-arch Dockerfile, arm64-ready workload example |
rightsizing/ |
Recommendation-only VPA manifest + a kubectl top usage-vs-requests report script |
cost-tools/ |
OpenCost and Kubecost Helm values (CUR net pricing) + a decision comparison |
docs/ |
Deep dives on each lever + the OpenCost-vs-Kubecost decision |
examples/ |
End-to-end sample workload wired for Graviton + rightsizing |
Apply the Karpenter node configuration (requires Karpenter installed in the cluster):
kubectl apply -f karpenter/ec2nodeclass.yaml
kubectl apply -f karpenter/nodepool-general.yaml
kubectl apply -f karpenter/nodepool-graviton.yamlGet right-sizing recommendations without touching workloads (VPA in Off mode):
kubectl apply -f rightsizing/vpa/payments-api-vpa.yaml
kubectl describe vpa payments-api -n payments # read the recommendationSpot over-/under-provisioning across a namespace at a glance:
./rightsizing/scripts/rightsizing-report.sh paymentsMeasure net spend with OpenCost (CUR-based) — see docs/opencost-vs-kubecost.md:
helm install opencost opencost/opencost -n opencost -f cost-tools/opencost/values.yamldocs/karpenter-consolidation.md— Spot strategy, consolidation policy, disruption budgetsdocs/graviton-migration.md— the arm64 migration playbook, gotchas, rollbackdocs/rightsizing.md— VPA recommendation workflow and how requests drive costdocs/opencost-vs-kubecost.md— the actual decision, side by side
On EKS the bill is mostly EC2, and EC2 waste comes from three habits: nodes sized for peak and never consolidated, x86 chosen by default, and requests set once and never revisited. Each lever here attacks one of those habits, and they compound — but only if you can measure the result, which is why the tooling comparison is part of the repo rather than an afterthought.
See the companion eks-cost-governance-toolkit for the policy-as-code guardrails and per-team
budgets that keep these savings from eroding, and aws-finops-analytics-pack for the AWS-side
analytics that consumes the same team / cost-center attribution keys.
MIT © Pradeep Maddi