Why Kubernetes bills creep up

Kubernetes makes it very easy to ask for resources and surprisingly hard to see who is using them. Requests are padded “to be safe”, namespaces outlive the projects that created them, nodes run half-empty and nobody owns the bill. None of it is dramatic; all of it adds up. The good news is that a handful of disciplined steps usually removes a large share of the waste without touching reliability.

Step 1 – Make spend visible

You cannot manage what nobody can see. Start by labelling every workload with team, product, environment and cost centre, and enforce the labels with an admission policy so untagged workloads are rejected.

  • Use a cost-allocation tool, or your cloud provider’s native reports, to break spend down by those labels.
  • Show each team its own number weekly. Teams spend more carefully when they can see what they cost.
  • Include the shared costs – control plane, ingress, logging and monitoring – and allocate them fairly.

Step 2 – Right-size requests and limits

The scheduler reserves capacity based on requests, not actual use. If every service requests twice what it needs, you pay for twice the nodes.

  1. Collect several weeks of real CPU and memory usage per workload, including peaks.
  2. Set requests near typical usage (for example the 90th percentile) and limits with sensible headroom.
  3. Use the vertical pod autoscaler in recommendation mode as a guide, and apply changes gradually.
  4. Watch for CPU throttling and out-of-memory kills after each change.

Memory limits deserve extra care: too tight and pods are killed; too loose and the node is wasted. Treat memory as the constraint to tune first.

Step 3 – Autoscale on real demand

  • Horizontal pod autoscaling on a meaningful signal – requests per second, queue depth or latency – rather than CPU alone.
  • Cluster autoscaling (or a node auto-provisioner) so nodes are added when pods are pending and removed when they are idle.
  • Scale-to-zero for event-driven and batch workloads that have no traffic overnight.
  • Set pod disruption budgets so scale-down never compromises availability.

Step 4 – Use the right capacity mix

Not all workloads need the same guarantees, and the price difference is large.

  • Committed or reserved capacity for the steady baseline you know you will run all year.
  • On-demand for unpredictable growth.
  • Spot or pre-emptible instances for fault-tolerant work: batch jobs, CI runners, stateless services with several replicas. Handle interruptions gracefully and spread across instance types.

Also check instance families. Newer or ARM-based instances often deliver better price-performance for the same workload.

Step 5 – Switch off what nobody uses

  • Schedule development and test environments to shut down outside working hours and at weekends.
  • Give every pre-production namespace an expiry date and delete it automatically.
  • Run a monthly clean-up for orphaned persistent volumes, snapshots, unused load balancers and idle IP addresses.

For many organisations, non-production environments are a third or more of the bill, and the easiest to cut.

Step 6 – Mind storage, networking and observability

  • Storage: choose the right class for each volume, delete detached disks and set lifecycle rules on object storage.
  • Data transfer: cross-zone and cross-region traffic is billed. Keep chatty services in the same zone where resilience allows, and use private endpoints and caching to avoid egress.
  • Logs and metrics: high-cardinality metrics and verbose debug logs can cost as much as the compute. Sample, shorten retention and drop what nobody queries.

Step 7 – Make it a habit

Cost control is a practice, not a project. Put a 30-minute review on the calendar every month. Look at the biggest movers, agree one or two actions with named owners and track the savings. Add cost checks to pull requests for infrastructure changes so surprises are caught before they ship.

Guardrails: protect reliability while you save

  • Never lower requests below measured peak usage without a load test.
  • Keep at least two replicas of anything user-facing, spread across zones.
  • Track error rates and latency alongside cost on the same dashboard.
  • Roll changes out gradually and keep an easy way back.

A simple 30-day plan

  1. Week 1: enforce labels and publish the first per-team cost report.
  2. Week 2: right-size the ten most expensive workloads.
  3. Week 3: add schedules and expiry for non-production environments.
  4. Week 4: review capacity mix, storage and data-transfer, and set the monthly review.
Savings that reduce reliability are not savings. Always measure both.

Key takeaways

  • Visibility first: you cannot cut what you cannot attribute.
  • Requests drive cost; right-sizing is the biggest single lever.
  • Switch off non-production when nobody is using it.
  • Review monthly and protect reliability with guardrails.