Home / Insights / Architecture and Modernization

Architecture and Modernization

Kubernetes Cost Control: Right-Sizing, Autoscaling and Spot Capacity

Kubernetes bills follow the capacity you reserve, not the capacity you use. Most of the waste we find in clusters comes from inflated resource requests, autoscaling that only scales up, and Spot capacity used either recklessly or not at all. This guide covers all three, in the order that pays back fastest.

TopicsArchitecture and ModernizationSoftware Costs and Budgets

Key takeaways

  • Resource requests, not actual usage, decide how many nodes you pay for, because the scheduler reserves capacity based on requests. Right-sizing requests is usually the first and largest saving.
  • Pod autoscaling and node autoscaling have to work together: scaling pods down saves nothing unless the cluster also removes the nodes they were using.
  • In-place pod resize became stable in Kubernetes 1.35, which makes vertical right-sizing far less disruptive than it used to be.
  • Spot capacity suits stateless, replicated and interruptible workloads, provided you design for interruption, diversify instance types and keep a stable on-demand baseline.
  • Make cost visible per team and per service, review it monthly, and guard against reliability regressions with load tests and service-level objectives.

Kubernetes makes it easy to run many services on shared infrastructure, and just as easy to pay for far more capacity than those services need. A cluster that started small grows node by node as teams add workloads, each with generous resource requests set once and never revisited. Autoscaling is configured to add capacity under load but rarely tuned to give it back. By the time finance asks why the container bill keeps climbing, nobody is sure which workloads drive it.

This article is for CTOs, engineering managers and platform leads who run Kubernetes on a public cloud and want to reduce cost without hurting reliability. It explains where Kubernetes costs come from, how to right-size workloads, how to combine pod and node autoscaling, how to use Spot capacity safely, and how to keep costs under control once you have reduced them. Examples reference AWS, but the principles apply on Azure and Google Cloud.

Where Kubernetes costs actually come from

The key to Kubernetes cost is understanding what the scheduler does. According to the Kubernetes documentation on resource management, the scheduler uses each container’s resource request to decide which node a pod goes on, and the kubelet reserves at least the requested amount for that container. Limits are different: they cap how much a container may use.

The consequence is simple but often missed. Your cloud provider bills for nodes. The number of nodes you need is driven by the sum of requests, not by what containers actually consume. A service that requests two CPUs and uses a fraction of one still occupies two CPUs of schedulable capacity.

The usual sources of waste

SourceWhat it looks likeTypical fix
Inflated requestsRequests set high at launch for safety and never revisited; nodes look full to the scheduler but CPU utilisation is lowRight-size requests from observed usage
FragmentationNodes partly used because pod shapes do not fit node shapes wellBetter instance choice, node consolidation, bin-packing settings
Scale-up onlyAutoscaling adds replicas or nodes under load but scale-down is disabled, slow or blockedTune scale-down, remove blockers such as restrictive disruption budgets
Always-on non-productionDevelopment, test and preview environments running around the clockSchedules, scale to zero, ephemeral environments
On-demand for everythingInterruptible workloads running on full-price capacitySpot for suitable workloads; commitments for the stable baseline
Hidden extrasLoad balancers, persistent volumes, snapshots, cross-zone traffic and log volumesRegular clean-up and tagging

AWS’s EKS cost optimisation guidance frames the work in three areas: using cost-effective resources (autoscaling, scale-down policies and the right purchasing options), building expenditure awareness, and optimising over time through right-sizing. That is a sensible structure for any cluster, and the sections below follow it.

Right-sizing requests and limits

Right-sizing is usually the largest and safest saving, because it removes reserved capacity that nothing uses. It needs data and a little discipline.

Step-by-step approach

  1. Collect usage data. Gather CPU and memory usage per container over a representative period, including peaks such as month-end batch jobs or marketing campaigns. Prometheus, a managed container metrics service or a cost tool will all do.
  2. Compare usage with requests. For each workload, compare requests with a high percentile of observed usage. Large, consistent gaps are your candidates.
  3. Set new requests with headroom. Base CPU requests on typical usage plus headroom, and memory requests close to peak usage, because memory cannot be throttled.
  4. Decide on limits deliberately. CPU limits cause throttling when reached, which can hurt latency; many teams set CPU requests but leave CPU limits off or generous. Memory limits protect the node, but a container that exceeds its memory limit is terminated, so set them above observed peaks.
  5. Roll out gradually. Change a few workloads at a time, watch latency, error rates and restarts, then continue.
  6. Repeat on a schedule. Usage changes as features ship. Review requests at least quarterly, or automate recommendations.

Vertical autoscaling and in-place resize

The Vertical Pod Autoscaler, an add-on maintained in the Kubernetes autoscaler project, can recommend or apply request values based on observed usage. Historically, applying a change meant recreating the pod, which made teams reluctant to let it act automatically. That has changed: the Kubernetes project announced that in-place pod resize graduated to stable in Kubernetes 1.35, after alpha in 1.27 and beta in 1.33. CPU and memory for a running container can now be changed without recreating the pod, subject to the resize policy and runtime support.

A practical pattern is to run vertical autoscaling in recommendation-only mode first, review its suggestions alongside your own analysis, and only then allow automatic updates for workloads where you trust the behaviour. Avoid letting vertical and horizontal autoscaling both act on the same CPU or memory signal for one workload, because they can work against each other.

Combining pod and node autoscaling

Autoscaling saves money only when capacity goes down as well as up, and only when pod scaling and node scaling are connected.

LayerWhat it changesGood forWatch out for
Horizontal Pod AutoscalerNumber of replicas, based on CPU, memory or custom metricsStateless services with variable trafficScaling on CPU when the real bottleneck is a queue or database
Event-driven scaling (for example KEDA)Replicas based on queue depth or other event sources, including scale to zeroWorkers, consumers, batch processingCold-start latency when scaling from zero
Vertical Pod AutoscalerRequests and limits per containerSteady workloads, right-sizing at scaleConflicts with horizontal scaling on the same metric
Node autoscaling (Cluster Autoscaler, Karpenter)Number and type of nodesMatching node capacity to pending pods and consolidating under-used nodesScale-down blocked by disruption budgets, local storage or pods without controllers
Scheduled scalingReplicas or node counts at set timesNon-production environments, predictable business hoursForgotten schedules after usage patterns change

Make scale-down work

The most common autoscaling problem we see is a cluster that scales up promptly and almost never scales down. Typical causes and fixes:

  • Pod disruption budgets that allow no evictions. Set budgets that protect availability while still allowing one pod at a time to move.
  • Pods that cannot be moved. Bare pods, pods using local storage or pods marked as not safe to evict will block node removal. Fix the workload rather than the autoscaler.
  • Overly cautious scale-down settings. Long delays before removing under-used nodes are sometimes justified, but should be a decision, not a default.
  • No consolidation. Node autoscalers that can repack pods onto fewer, better-fitting nodes recover capacity left by fragmentation.

Scale on the right signal

CPU is a convenient metric but not always the right one. A queue-processing service should scale on queue depth; an API might scale on request rate or latency. Choosing the right signal prevents both over-provisioning and slow reactions to load. Validate scaling behaviour under realistic load, as described in our guide to load testing, before relying on it in production.

Using Spot capacity without hurting reliability

Spot capacity, available on AWS as Spot Instances and with equivalents on Azure and Google Cloud, offers spare compute at a significant discount in exchange for the provider’s right to reclaim it. AWS’s documentation on Spot interruption notices states that EC2 gives a two-minute warning before stopping or terminating a Spot Instance, delivered through an EventBridge event and instance metadata, and that these notices are best effort, so applications must tolerate abrupt interruption.

Which workloads suit Spot

WorkloadSpot suitabilityConditions
Stateless web and API services with several replicasGood, for a share of replicasSpread across zones and instance types; keep an on-demand baseline
Queue workers and batch jobsVery goodIdempotent processing, checkpointing, retries
CI runners and preview environmentsVery goodJobs can be retried
Databases and stateful services with single replicasPoorUse on-demand or managed services
Latency-critical singletons and control componentsPoorKeep on on-demand nodes

Design rules for Spot in Kubernetes

  1. Separate node pools. Run Spot and on-demand nodes in distinct pools and use labels, taints and tolerations so only suitable workloads land on Spot.
  2. Diversify. Allow several instance families and sizes and multiple availability zones, so a shortage in one capacity pool does not take out all your Spot nodes at once.
  3. Handle the notice. Use a node termination handler or your node autoscaler’s interruption handling so nodes are cordoned and drained when a notice arrives.
  4. Shut down gracefully. Make sure applications handle termination signals, finish or hand back in-flight work and have termination grace periods that fit inside the warning window.
  5. Keep a baseline. Run enough on-demand replicas to serve minimum traffic if every Spot node disappears.
  6. Cover the baseline with commitments. For the steady on-demand portion, savings plans or reserved capacity are usually the cheaper option, as the EKS guidance notes for predictable workloads.

For example, an online retailer might run its product API with a fixed number of on-demand replicas and let additional replicas scale out on Spot during traffic peaks, while order processing workers run mostly on Spot with retries. This split is illustrative; the right ratio depends on your tolerance for degraded capacity during an interruption.

Making costs visible and keeping them down

Savings erode unless someone watches them. Expenditure awareness, the second pillar in the EKS guidance, means people can see what their workloads cost and are accountable for it.

Cost allocation

  • Label consistently. Require labels for team, service and environment on every workload, and enforce them with admission policies.
  • Allocate shared costs. Use a cost allocation tool that splits node costs by requests or usage per namespace and label, and decide how to share cluster overheads such as system components and idle capacity.
  • Report per team and service. A monthly report showing cost, requested versus used resources and trends per service turns cost into something teams can act on.

Guardrails

  • Namespace quotas and default requests. Prevent unbounded requests and pods without requests, which make scheduling and allocation unreliable.
  • Non-production schedules. Scale development and test environments down outside working hours, and make preview environments expire automatically.
  • Budgets and alerts. Alert on unusual daily spend, not just monthly totals, so mistakes are caught in days rather than at invoice time.
  • Clean-up routines. Regularly remove unattached volumes, old snapshots, unused load balancers and stale images.

These practices fit into a broader cost cycle; our article on cloud cost optimisation mistakes and an automated optimisation cycle covers the organisational side in more depth.

Is Kubernetes the right platform at all?

Sometimes the largest saving is architectural. For a small number of services, a managed container or serverless platform may cost less to run and far less to operate than a cluster. Our Cloud and DevOps team uses Kubernetes where it suits the application and recommends simpler managed services where they do the job, starting with a review of current spend and then right-sizing, reserved capacity and architecture changes.

A 90-day plan, risks and a checklist

A phased plan

  1. Weeks 1 to 3: baseline. Enable cost allocation and labelling, collect usage data and identify the top workloads by requested capacity. Turn on schedules for non-production environments.
  2. Weeks 4 to 7: right-size. Adjust requests for the biggest gaps, a few workloads at a time, monitoring latency and restarts. Run vertical autoscaling in recommendation mode.
  3. Weeks 8 to 10: autoscaling. Fix scale-down blockers, tune node consolidation and move suitable services to better scaling signals.
  4. Weeks 11 to 13: Spot and commitments. Introduce Spot node pools for batch, CI and a share of stateless replicas, then cover the remaining stable baseline with commitments.

The timings are illustrative and assume a team with time allocated to the work; adjust to your cluster size and capacity.

Risks to manage

  • Reliability regressions. Aggressive right-sizing or Spot use can increase latency, restarts or errors. Track service-level objectives and roll back quickly when they slip.
  • Throttling surprises. Tight CPU limits can slow services under load without obvious errors.
  • Commitment lock-in. Buying commitments before right-sizing locks in waste. Right-size first, commit second.
  • Ownership gaps. Without a named owner, savings drift back within months.

Checklist

  • Every workload has CPU and memory requests based on observed usage, reviewed at least quarterly.
  • Memory limits set above observed peaks; CPU limit policy decided deliberately.
  • Horizontal scaling uses the metric that reflects real load for each service.
  • Node autoscaling scales down and consolidates; disruption budgets allow controlled evictions.
  • Spot used only for suitable workloads, with diversified instance types, interruption handling and an on-demand baseline.
  • Non-production environments scheduled or ephemeral.
  • Cost reported monthly by team and service, with daily anomaly alerts.
  • Commitments purchased only for the right-sized, stable baseline.

Frequently asked questions

What is the quickest way to reduce Kubernetes costs?

Usually right-sizing resource requests for the largest workloads and scheduling non-production environments to scale down outside working hours. Both remove reserved capacity that nothing uses and carry little risk if rolled out gradually.

Should we remove CPU limits?

Many teams set CPU requests but leave CPU limits off or generous, because limits cause throttling that can hurt latency. Memory limits are different and should normally be set, above observed peaks, to protect the node.

Is Spot capacity safe for production?

For suitable workloads, yes: stateless, replicated services and retryable jobs, designed to handle interruption, spread across instance types and zones, and backed by an on-demand baseline. Keep single-replica stateful services on on-demand capacity.

Do we need a third-party cost tool?

Not always. Cloud billing tools and open-source allocation tools may be enough for a single cluster. A dedicated tool becomes worthwhile when several teams share clusters and you need reliable per-team allocation and recommendations.

When should we buy savings plans or reserved capacity?

After right-sizing and autoscaling are in place, and only for the stable on-demand baseline. Committing first locks in today’s waste for the length of the commitment.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Kubernetes documentation: Resource Management for Pods and Containers — accessed 9 November 2026. The scheduler places pods based on resource requests, the kubelet reserves the requested amount, and limits are enforced by the kubelet.
  2. Kubernetes blog: Kubernetes 1.35: In-Place Pod Resize Graduates to Stable (19 December 2025) — accessed 9 November 2026. In-place resize of CPU and memory without recreating pods, and its path from alpha in 1.27 to stable in 1.35.
  3. AWS documentation: Spot Instance interruption notices — accessed 9 November 2026. Two-minute interruption warning, delivery through EventBridge and instance metadata, and the best-effort nature of notices.
  4. AWS: Amazon EKS Best Practices Guide, Cost Optimization — accessed 9 November 2026. Three focus areas of cost-effective resources, expenditure awareness and right-sizing over time, plus purchasing options for predictable workloads.

How much of your Kubernetes bill is reserved capacity nothing uses?

We can review your clusters, compare requests with real usage, fix autoscaling and introduce Spot capacity where it is safe, with a clear plan and expected savings.