Small teams can run production Kubernetes without treating the cloud bill as a mystery. This playbook provides a repeatable method for cluster sizing, workload autoscaling, spot or preemptible capacity, and monthly cost reviews. It uses adjustable inputs rather than fixed provider prices, so you can insert the rates, utilization targets, and reliability requirements that apply to your environment.
Overview
Kubernetes cost optimization starts with a simple distinction: the amount of compute you provision is not the same as the amount of compute your applications use. A cluster can be expensive because nodes are oversized, because workloads request more resources than they need, because autoscaling reacts too slowly, or because temporary and non-production capacity runs continuously.
The goal is not to minimize every line item. The goal is to match infrastructure cost to an agreed service level. Production workloads may need predictable capacity and disruption protection. Batch jobs, development environments, CI runners, and fault-tolerant workers may be suitable for lower-cost interruptible capacity. A useful optimization plan makes those distinctions explicit.
Review the following cost layers separately:
- Node capacity: virtual machine, operating system, and attached storage costs.
- Control plane and platform charges: any cluster, management, or platform fees applicable to your provider and configuration.
- Network and data transfer: traffic between zones, regions, clusters, or external services.
- Supporting services: load balancers, persistent volumes, container registries, observability tools, databases, and backups.
- Operational overhead: the engineering time required to maintain autoscaling, upgrades, capacity policies, and recovery procedures.
For background on whether Kubernetes is appropriate for a small team, see Kubernetes for Small Teams. If your workload is still being designed, the cloud capacity planning workflow can help connect traffic assumptions to infrastructure decisions.
How to estimate
Use a monthly estimate that separates steady-state, peak, and interruptible capacity. The basic calculation is:
Monthly compute cost = node count × hourly node rate × hours in the billing period
For a more realistic cluster estimate, add the other recurring components:
Total monthly estimate = compute + platform fees + storage + network + load balancing + observability + backups
Do not use a single node count if your cluster changes size. Instead, calculate each pool independently:
Pool cost = average nodes in pool × effective hourly rate × billing hours
“Average nodes” should reflect the period being modeled, not only the maximum. If a pool runs at four nodes overnight and eight nodes during the business day, estimate the weighted average from those operating windows. For a first pass, divide the month into representative periods such as low traffic, normal traffic, and peak traffic.
For each workload, compare requested resources with observed usage. A practical utilization measure is:
Request utilization = average measured usage ÷ requested resource
Review CPU and memory independently. A service using 25% of its CPU request but 85% of its memory request should not be resized using a CPU-only conclusion. Also check throttling, out-of-memory events, latency, queue depth, and restart counts before lowering requests.
For autoscaling, estimate both the floor and the ceiling:
- Minimum replicas: the capacity required for availability, warm-up time, and normal low traffic.
- Target utilization: the point at which another replica should be added. Choose this with latency and startup behavior in mind.
- Maximum replicas: the largest scale-out allowed by budget, dependencies, quotas, and database capacity.
- Scale-down delay: a stabilization period that prevents repeated expansion and contraction during short traffic changes.
Node autoscaling should complement workload autoscaling. If pods can scale from two to ten replicas but nodes take too long to arrive, the application may experience resource pressure before capacity is available. Conversely, a large node minimum can keep idle capacity running even when pod demand is low.
Inputs and assumptions
Create a small worksheet before changing the cluster. Record the source and date for every value, especially rates that may change. Use the following template:
| Input | What to record | Why it matters |
|---|---|---|
| Node pools | Instance family, size, minimum, maximum, and average nodes | Defines the main compute estimate and available capacity |
| Workload requests | CPU and memory requests and limits by deployment | Determines scheduling and how much capacity is reserved |
| Observed usage | Average, high-percentile, and peak CPU and memory usage | Supports safe rightsizing instead of guesswork |
| Autoscaling | Replica floor, ceiling, target, and stabilization settings | Controls how capacity follows demand |
| Interruptible capacity | Eligible workloads, fallback pool, effective rate, and interruption response | Measures savings without assuming all workloads can tolerate interruption |
| Fixed services | Storage, load balancers, logs, metrics, backups, and network assumptions | Prevents compute savings from hiding a growing supporting bill |
Use separate node pools for workloads with different operational requirements. A common pattern is a stable pool for system components and critical services, an elastic pool for ordinary stateless applications, and an interruptible pool for batch, CI, asynchronous workers, or other workloads designed to retry. The exact pool design depends on your provider, scheduler configuration, workload tolerations, and recovery behavior.
Spot, preemptible, or interruptible VMs should be modeled as a reliability decision, not simply a discount toggle. Before using them, confirm that workloads can be rescheduled, data is stored outside the node, termination handling is configured, and a stable fallback exists. Compare providers using these questions rather than an unverified headline rate:
| Question | What to compare |
|---|---|
| Capacity access | Which zones, machine families, and sizes are available for the workload? |
| Pricing input | What is the current effective rate for the selected configuration, and how does it differ from stable capacity? |
| Interruption handling | What notice, drain, or termination signals can the workload use? |
| Fallback behavior | Can the cluster add stable capacity when interruptible capacity is unavailable? |
| Operational effort | How much configuration and monitoring does the approach require from the team? |
Pull billing data by cluster, namespace, node pool, and environment where possible. When direct allocation is unavailable, use labels, resource requests, or an agreed shared-cost rule. The rule matters less than applying it consistently from month to month.
Worked examples
Consider a hypothetical cluster with two pools. The stable pool averages three nodes at an assumed rate of 0.20 currency units per hour. The interruptible pool averages four nodes at an assumed rate of 0.07 currency units per hour. Using a 730-hour billing month only as a worksheet assumption:
- Stable pool: 3 × 0.20 × 730 = 438 currency units per month.
- Interruptible pool: 4 × 0.07 × 730 = 204.40 currency units per month.
- Estimated compute total: 642.40 currency units per month.
These are illustrative inputs, not provider pricing. Add platform fees, storage, network, and observability before comparing the result with an invoice.
Now suppose a review finds that the stable pool has an average of five nodes, while the workload only requires three during normal periods. Rather than immediately reducing the minimum, test the reason for the excess: daemonsets, pod anti-affinity, unavailable zones, large requests, pending deployments, or a deliberately reserved failover margin. If two nodes are genuinely unnecessary during normal operation, model the change as:
Potential compute reduction = removed average nodes × effective hourly rate × billing hours
For autoscaling, assume a service normally runs four replicas and reaches eight during a recurring peak. If each replica requests 0.5 CPU and 1 GiB of memory, the application request changes from 2 CPU and 4 GiB to 4 CPU and 8 GiB at peak. The cluster worksheet should then ask whether the existing node pools have that headroom, whether the peak lasts long enough to justify pre-provisioned capacity, and whether the downstream database can handle the additional replicas.
Before a deployment change, complete this cost-impact worksheet:
- Record the current replica range, resource requests, node-pool placement, and average node count.
- Record the proposed values and the expected duration of the change.
- Estimate additional pod resources and convert them into likely node demand.
- Multiply incremental average nodes by the applicable effective hourly rate and billing hours.
- Add related storage, network, logging, database, and load-balancer effects.
- Define a rollback threshold for cost, latency, errors, or pending pods.
This approach also works in reverse. A reduction in requests may lower node demand, but only if the scheduler can consolidate pods and the node pool is allowed to scale down. Verify the result from billing data and cluster utilization rather than assuming every request reduction becomes an immediate saving.
When to recalculate
Make cost review a monthly operating habit and perform a deeper recalculation after material changes. At minimum, revisit the model when provider pricing inputs change, discount rates or interruptible capacity conditions move, instance families change, traffic patterns shift, or a major autoscaler or managed Kubernetes feature changes.
During each monthly review, check:
- Actual spend versus the estimate, separated by cluster, environment, and node pool.
- Average and high-percentile CPU and memory utilization.
- Requested resources that remain consistently far above measured usage.
- Pending pods, unschedulable events, node scale-up time, and scale-down activity.
- Replica counts, peak duration, and whether autoscaling reached its ceiling.
- Interruptions, evictions, failed retries, and fallback capacity usage.
- Storage growth, log volume, network transfer, and load-balancer changes.
Useful starting queries depend on your metrics system, but the questions are consistent. Query container CPU and memory usage against requests; graph desired, current, and available replicas; compare node allocatable resources with requested resources; and identify namespaces or workloads with the largest increase in spend. Keep the query definitions and dashboard links in the review document so the process is repeatable.
After each review, choose one or two controlled actions: adjust a request, change a minimum or maximum, move an eligible workload to an interruptible pool, remove idle capacity, or revise an inaccurate allocation rule. Record the expected monthly effect, the reliability risk, the owner, and the date for verification.
Finally, treat cost optimization as part of production readiness. Validate access controls, workload isolation, backup behavior, and recovery procedures before pursuing deeper savings. The cloud security review checklist and Terraform deployment checklist can help keep infrastructure changes controlled. For broader architecture decisions, compare the results with guidance on production-ready SaaS architecture and use the cloud cost optimization calculator to maintain a consistent estimate outside the cluster.