Kubernetes clusters average about 8% CPU use. Cut waste safely with request rightsizing, autoscaling, spot, and OpenCost, keeping SLOs.
The Kubernetes bill arrives and it is double what was budgeted. Someone asks the engineering team what changed. Nothing specific changed. The cluster just grew, because it was easier to over-provision than to tune. This is the default state of most clusters older than eighteen months.
The numbers are bleak. Cast AI's 2026 State of Kubernetes Optimization Report, based on about 23,000 clusters across AWS, Azure, and GCP, found average CPU utilization of 8%, memory utilization of 20%, and GPU utilization of 5%. CPU over-provisioning rose from 40% to 69% year over year. Cast AI sells optimization software, and these figures describe clusters before optimization, so treat them as a baseline and not as a law of nature.
Idle capacity is also not the same as avoidable spend. Storage, networking, control planes, and headroom for spikes all cost money at any utilization. Teams that work through the steps below commonly cut a meaningful share of their compute bill without touching SLOs, because each step is measured against real usage before it ships.
Kubernetes manages availability, not cost. When in doubt, it keeps a resource alive and reserved, even if nothing is using it. Four drivers explain most of the waste:
requests.memory: 2Gi and requests.cpu: 1000m out of caution while real usage is 200Mi and 80m. The scheduler reserves the full request, and nodes fill up with ghost capacity.Each driver has a specific fix. Work through them in this order, because each step makes the next one safer.
Start with measurement, because you cannot optimize what you cannot see. kubectl top gives a quick view, and Goldilocks gives per-workload recommendations next to your current requests.
## Node-level CPU and memory usagekubectl top nodes ## Biggest pod memory consumerskubectl top pods -A --sort-by=memory | head -20For a proper view, deploy Goldilocks. It runs VPA in recommendation mode for every workload in a labeled namespace.
helm repo add fairwinds-stable https://charts.fairwinds.com/stablehelm install goldilocks fairwinds-stable/goldilocks \ --namespace goldilocks \ --create-namespace ## Enable recommendations for one namespacekubectl label namespace production \ goldilocks.fairwinds.com/enabled=trueThe dashboard lists each Deployment with its current requests and a suggested value. Goldilocks needs the Kubernetes Metrics Server and the VPA recommender installed, so check those first if the dashboard stays empty.
The single most useful number to track from day one is the ratio of used CPU to requested CPU per namespace. If you already run Prometheus with kube-state-metrics, this query gives it to you:
sum by (namespace) ( rate(container_cpu_usage_seconds_total{container!=""}[5m]))/sum by (namespace) ( kube_pod_container_resource_requests{resource="cpu"})A namespace sitting at 0.05 to 0.15 is a rightsizing candidate. A namespace above 0.8 has little headroom, so leave it alone.
Rightsize requests from observed usage, using VPA in recommendation mode. This is usually the highest-return change because a pod with oversized requests blocks scheduler capacity even while idle. The node reports "full" to the scheduler when real utilization is 20%.
apiVersion: autoscaling.k8s.io/v1kind: VerticalPodAutoscalermetadata: name: payment-service-vpa namespace: productionspec: targetRef: apiVersion: apps/v1 kind: Deployment name: payment-service updatePolicy: updateMode: "Off"## Read recommendations after at least 24 hours of datakubectl describe vpa payment-service-vpa -n productionApply the recommended values to your Deployment manifests, then repeat for every service. It is tedious, and it is also the highest-ROI work of the quarter. Some rules keep it safe:
š Remember: In-place pod resize reached stable in Kubernetes v1.35. It lets requests and limits change without restarting the pod in most cases, which removes the biggest friction in acting on VPA recommendations continuously. Check your cluster and VPA versions before relying on it in production.
Use one node autoscaler, not both on the same nodes. Cluster Autoscaler (CA) scales existing node groups based on pending pods and removes underused nodes, while Karpenter provisions exact-fit instances directly and consolidates them. Static node groups are a cost trap: a group sized for a dinner-rush peak sits at a fraction of capacity at 3 AM.
## Cluster Autoscaler: key settings (Helm values)autoDiscovery: clusterName: prod-cluster extraArgs: scale-down-utilization-threshold: "0.5" scale-down-delay-after-add: "10m" balance-similar-node-groups: "true"The important detail is that CA computes utilization from pod requests, not live usage. That is why Step 2 comes first: oversized requests make nodes look busy and block scale-down.
If you are on AWS (or AKS with node auto-provisioning), Karpenter is the usual alternative. A NodePool with consolidation enabled looks like this:
apiVersion: karpenter.sh/v1kind: NodePoolmetadata: name: generalspec: template: spec: nodeClassRef: group: karpenter.k8s.aws kind: EC2NodeClass name: default requirements: - key: karpenter.sh/capacity-type operator: In values: ["spot", "on-demand"] disruption: consolidationPolicy: WhenEmptyOrUnderutilized consolidateAfter: 1mInstall it from the official chart and pin the version:
helm upgrade --install karpenter \ oci://public.ecr.aws/karpenter/karpenter \ --namespace karpenter --create-namespace \ --version "${KARPENTER_VERSION}"š” Tip: If scale-down still stalls after rightsizing, look for PodDisruptionBudgets with no slack, pods using emptyDir or local storage, and pods annotated cluster-autoscaler.kubernetes.io/safe-to-evict: "false".
Scale dev and staging down outside working hours, because nobody needs a staging cluster at 2 AM on a Sunday. KEDA's cron scaler can scale a Deployment to zero and bring it back before the team starts work:
apiVersion: keda.sh/v1alpha1kind: ScaledObjectmetadata: name: staging-api-scaledown namespace: stagingspec: scaleTargetRef: name: api-service minReplicaCount: 0 maxReplicaCount: 5 triggers: - type: cron metadata: timezone: Asia/Kolkata start: "30 8 * * 1-5" end: "0 21 * * 1-5" desiredReplicas: "3"For whole namespaces, a tool such as kube-downscaler can scale everything to zero outside working hours with a single annotation. Pair this with a node autoscaler so the emptied nodes are actually removed, otherwise you save pods but still pay for the nodes.
Run stateless, interruption-tolerant workloads on spot or preemptible capacity, which commonly costs 60 to 90% less than on-demand. API servers, queue workers, and batch jobs are good candidates. The safety comes from disruption budgets, spreading, and a dedicated taint.
apiVersion: policy/v1kind: PodDisruptionBudgetmetadata: name: api-pdb namespace: productionspec: minAvailable: 2 selector: matchLabels: app: api-serviceTaint spot nodes with a key you control, so only workloads that tolerate interruption land there. Note that node.kubernetes.io/spot is not a built-in taint, so choose your own:
## On spot nodes: taint capacity-type=spot:NoSchedule## In tolerant pods:tolerations: - key: "capacity-type" operator: "Equal" value: "spot" effect: "NoSchedule"Diversify across several instance types and zones, because a single spot pool can be reclaimed all at once. Handle the two-minute interruption notice with graceful shutdown (terminationGracePeriodSeconds and a preStop hook). Never run databases, persistent Redis, or Kafka brokers on spot nodes.
Share GPUs between pods whenever a workload does not need a whole device. Cast AI's 2026 data puts average GPU utilization at 5%, and an idle GPU costs dollars per hour compared with cents for a CPU core. If your cluster runs inference or training, this is often the largest remaining saving after Steps 1 to 5.
The NVIDIA device plugin supports time-slicing, which lets several pods share one GPU:
version: v1sharing: timeSlicing: resources: - name: nvidia.com/gpu replicas: 4Time-slicing gives no memory isolation, so one pod can starve another. For stronger isolation on supported cards, use Multi-Instance GPU (MIG) partitions. Whichever you choose, first add per-pod GPU metrics (for example from DCGM Exporter) so you know which workloads are actually idle.
Wire OpenCost into Prometheus and Grafana so you can see spend by namespace, label, and workload. OpenCost is the open-source standard for this, and it turns "which team spends the most" into a thirty-second answer.
helm repo add opencost \ https://opencost.github.io/opencost-helm-charthelm install opencost opencost/opencost \ --namespace opencost \ --create-namespaceLabel every workload with a team and cost-center label from day one. Without labels, OpenCost can only group by namespace, and shared namespaces hide who owns the spend.
If you need continuous, automatic rightsizing and not just a dashboard, autonomous platforms such as Cast AI or ScaleOps are the next step. Get the free visibility layer working first, so you can judge whether a paid tool is saving more than it costs.
Change one service at a time, and watch three signals for at least one full traffic cycle before moving on. If any signal worsens, roll back that single change. This is what makes cost work safe: every step is small, measured and reversible.
OOMKilled restart means the memory request is too low.sum by (pod) ( rate(container_cpu_cfs_throttled_periods_total[5m]))/sum by (pod) ( rate(container_cpu_cfs_periods_total[5m]))Alert when a pod's throttle ratio stays above 0.25 for ten minutes after a change. That is a practical early warning that rightsizing went too far, long before users notice.
Savings vary widely and do not add up. Fixing requests changes how many nodes you need, so it overlaps with autoscaling and spot savings.
| Technique | Typical saving | Risk |
|---|---|---|
| Fix resource requests | High | Low |
| Scale non-prod to zero | Medium | Very low |
| Node autoscaling | Medium | Low |
| Spot instances | High on eligible workloads | Medium |
| Fractional GPU sharing | High on GPU spend | Medium |
Start with fixing requests and scaling non-production down. These two usually justify the effort within the first week, and neither touches production traffic.
Do not optimize and change SLOs at the same time. Run two weeks of VPA recommendations in observation mode before applying anything to production, and compare them with usage at your true peak (dinner rush for a food-delivery app, market open at 9:15 AM IST for a brokerage, a festive sale launch for e-commerce).
Make safe defaults the default. A LimitRange ensures that deployments without explicit requests still get sensible values, which stops ghost capacity from accumulating silently:
apiVersion: v1kind: LimitRangemetadata: name: default-requests namespace: productionspec: limits: - defaultRequest: memory: 128Mi cpu: 100m type: ContainerThis sets only default requests. Avoid also setting a tight default CPU limit, because CPU limits throttle bursty services. Add a ResourceQuota per namespace so a single team cannot quietly claim the whole cluster.
Review cost monthly using three numbers: the ratio of requested to used CPU and memory, the percentage of eligible workloads running on spot, and the number of non-production hours still running. If the first number is not falling, your requests are not being rightsized.
Noteš References and Further Reading
- Cast AI 2026 State of Kubernetes Optimization - Source of the utilization figures (vendor data)
- Goldilocks Documentation - VPA-based resource recommendations
- OpenCost - Open-source Kubernetes cost monitoring
- KEDA Documentation - Event-driven and scheduled autoscaling
- Karpenter - Node provisioning and consolidation
Cast AI's 2026 report puts average CPU utilization near 8%, so reaching 40 to 60% of requested CPU at steady state is already a large improvement. Pushing higher removes the headroom you need for traffic spikes and node failures, so tie the target to your SLOs and peak-to-average traffic ratio.
No. VPA still generates the recommendation. In-place pod resize, stable since Kubernetes v1.35, only lets you apply new requests and limits without restarting the pod in most cases, which makes continuous rightsizing practical. Check your VPA version for its in-place update mode before relying on it.
Cluster Autoscaler decides scale-down from the sum of pod requests, not actual usage. A node full of pods with oversized requests looks busy to the autoscaler even at 10% real CPU. Fix the requests first, then check for blockers like PodDisruptionBudgets, local storage, and the safe-to-evict annotation.
Fix oversized resource requests. Teams that have never tuned them often find a large share of requested capacity unused, because the scheduler reserves the full request on a node even when the pod uses a fraction. Rightsized requests also let autoscalers remove whole nodes.
Pods typically claim a whole GPU even when they use a fraction of it, and Cast AI's 2026 data puts average GPU utilization at about 5%. Without GPU time-slicing, MIG, or per-pod GPU metrics, that waste stays invisible on a standard cost dashboard while each idle GPU costs dollars per hour.
Discussion0