Frontend Labs
⋯

41. Cost and capacity

Kubernetes cost is mostly requested capacity (you pay for nodes sized to requests, not to usage) plus data transfer and storage.

Lever Typical saving How
Right-size requests 30–50% VPA recommendations, p95 usage dashboards (§23.6)
Spot/preemptible for stateless + workers 60–90% on those nodes Karpenter capacity-type: spot, PDBs, ≥ 2 replicas, graceful shutdown
arm64 nodes 20–40% multi-arch images (§10.2)
Bin-packing / consolidation 10–30% Karpenter consolidation, fewer node pools
Scale to zero ~100% off-hours for dev KEDA cron trigger, or sleep schedules for dev namespaces
Cross-AZ traffic often a surprise line item topology-aware routing (trafficDistribution: PreferClose on Services), co-locate chatty pairs
Observability bills often 10–30% of infra drop unused metrics (metric_relabel_configs), sample traces, don't log every request
NAT gateway data per-GB charge VPC endpoints for S3/ECR/STS, pull-through cache

Make cost visible per team and namespace with OpenCost / Kubecost, using team and cost-center labels (§19.2).


Generated from real-life-k8s-guide.md · 8 Oct 2026 16:36