Kubernetes Cost Optimization: 6 Ways Your Cluster Leaks Money

Kubernetes spends money in requests, not usage, so cluster waste never shows on the cloud bill. Six places it leaks on EKS, GKE and AKS, each with a kubectl command that finds it.

GuideUpdated Nov 2, 2026

Cover Image for Kubernetes Cost Optimization: 6 Ways Your Cluster Leaks Money

Kubernetes Cost Optimization: 6 Ways Your Cluster Leaks Money

Last month's EKS node bill went up again, and Kubernetes didn't raise a single alert, because nothing was wrong. Every pod was healthy. Every node was "full". Then someone runs kubectl top pods -n checkout next to the deployment spec: checkout-api requests 2 CPU and 4 GiB per pod across 12 replicas, and each pod is using about 150 millicores and 800 MiB.

That's 24 cores reserved for under 2 cores of work, and the cluster bought nodes to hold all 24. Kubernetes spends money in requests, not usage, so cluster waste is invisible on the cloud bill, which only ever says "EC2" or "Compute Engine". It collects in six places, the same on EKS, GKE and AKS, and each one has a command that finds it.

Part two turns the six checks into a DIY audit. Part three hands the investigation to CloudThinker agents working through a read-only Kubernetes connection.

01Pods

Padded requests

Requests set once at launch and never compared with real usage again.

02Nodes

Underpacked nodes

Fragmentation and blocked scale-down leave ten nodes doing six nodes of work.

03Storage

Orphaned volumes

Released PVs and cloud disks that outlive the StatefulSet or the cluster.

04Network

Empty load balancers

LoadBalancer Services with no endpoints, billing every hour.

05Namespaces

Forgotten environments

Preview and experiment namespaces holding all of the above.

06Scaling

Static capacity

No HPA, no node autoscaling, non-prod running at peak around the clock.

The six leaks this guide covers, each with a detection command you can run today.

Why the bill can't show you this

Kubernetes turns requests into money in three steps. The scheduler places pods by their requests. The Cluster Autoscaler adds nodes when pending pods can't fit by their requests. The cloud bills nodes. Actual usage never enters the calculation:

01YAML

Request 2 CPU

A padded number copied from another deployment.

02Scheduler

Reserves it

The node is marked full whether the pod uses 2 cores or 150m.

03Autoscaler

Adds a node

Pending pods trigger scale-up against requests, not usage.

04Cloud bill

Pays for air

Every node is billed by the hour, used or not.

Requests are the unit Kubernetes spends money in. Usage never enters the calculation.

So a padded request is a reservation that turns straight into a node. The bill sees the node and nothing below it. Finding waste means going under the bill, into the cluster, and comparing the numbers Kubernetes acts on with the numbers that describe reality.

1. Overprovisioned resource requests and limits

What it is. A request is a reservation, not a measurement. If a pod requests 2 CPU and 4 GiB, the scheduler carves that much out of a node whether the container uses it or not.

Why it happens. Requests get set once, at launch, by copying another deployment's YAML or padding a guess "to be safe". Nothing forces a revisit. An oversized request never pages anyone, while an undersized one causes OOMKills at 2 a.m. Every incentive points the same way.

How to detect it. With metrics-server installed (default on GKE and AKS, an add-on on EKS), pull live usage:

kubectl top pods -A --sort-by=cpu

Then pull what those same pods request:

kubectl get pods -A -o custom-columns=\
'NAMESPACE:.metadata.namespace,POD:.metadata.name,CPU_REQ:.spec.containers[*].resources.requests.cpu,MEM_REQ:.spec.containers[*].resources.requests.memory'

Line the two up for your ten largest deployments. A pod requesting 2000m and using 150m is a rightsizing candidate. The Kubernetes resource management docs cover request and limit semantics. One caution: kubectl top is a point-in-time sample, so a nightly batch job looks idle at 2 p.m. Part two replaces the sample with a week of Prometheus data and VPA recommendations.

What it costs. The arithmetic from the opening: on 8-vCPU nodes, checkout-api alone holds three nodes for less than one node's worth of work. Multiply by every deployment nobody has revisited.

2. Underpacked and idle nodes

What it is. Even with sensible requests, nodes can run half-empty. Mismatched pod sizes, nodeSelector and taint sprawl, strict PodDisruptionBudgets, and node groups that scale up but never consolidate leave you with ten nodes doing six nodes' work. The extreme case is a fully idle node: kubelet, kube-proxy, a log shipper and nothing else, billing around the clock.

Why it happens. The Cluster Autoscaler is conservative about scale-down by design. A node must sit below the utilization threshold (50% of requests by default) for a sustained window, and pods with local storage, restrictive PDBs or the safe-to-evict: "false" annotation block eviction entirely. Nobody notices, because the cluster works.

How to detect it. Compare requested and actual per node:

kubectl top nodes
kubectl describe nodes | grep -A 8 "Allocated resources"

Read the two together. Low allocation across many nodes means a bin-packing problem: the Cluster Autoscaler isn't consolidating, or you have too many small node groups. High allocation with low kubectl top usage points back to leak 1. Then look for the usual scale-down blocker, a PDB that allows no evictions at all:

kubectl get pdb -A -o json \
  | jq -r '.items[] | select(.status.disruptionsAllowed == 0)
    | "\(.metadata.namespace)/\(.metadata.name)"'

On EKS, Karpenter consolidates actively, repacking pods onto fewer, better-fitting instances instead of only removing empty nodes.

What it costs. A whole node per blocked scale-down. An idle m5.2xlarge worker is about $280 a month at on-demand list price in us-east-1 (EC2 pricing).

3. Orphaned persistent volumes and cloud disks

What it is. Delete a StatefulSet and its PVCs usually stay behind, each backed by a real EBS volume, Persistent Disk or Azure Disk. PVs with a Retain reclaim policy sit in Released state after their claim is deleted: still provisioned, still billing, attached to nothing.

Why it happens. Retain is the safe choice for anything stateful, and deleting storage feels irreversible, so nobody does it. Cluster teardown makes it worse. Delete a cluster without cleaning up PVCs first and the disks outlive it, invisible to any future kubectl command.

How to detect it. Inside the cluster:

kubectl get pv -o wide | grep -w Released

Then check the cloud side for disks Kubernetes provisioned but no longer tracks. On AWS, the EBS CSI driver tags the volumes it creates:

aws ec2 describe-volumes \
  --filters Name=status,Values=available Name=tag-key,Values=kubernetes.io/created-for/pvc/name \
  --query 'Volumes[*].{ID:VolumeId,Size:Size,Created:CreateTime}' --output table

The equivalents are gcloud compute disks list --filter="-users:*" on GKE and az disk list --query "[?diskState=='Unattached']" on AKS. Snapshot anything you're unsure about, then delete.

What it costs. Full price for storage nobody reads: gp3 is $0.08 per GB-month in us-east-1 (EBS pricing). It's the safest money on this list, since a Released volume has no consumer.

4. Load balancers with nothing behind them

What it is. Every Service of type LoadBalancer provisions a real cloud load balancer (an NLB or classic ELB on AWS, a forwarding rule on GCP, a rule on an Azure Load Balancer), and it bills by the hour whether traffic arrives or not. Per-namespace ingress controllers and demo services from long-dead experiments pile them up.

Why it happens. type: LoadBalancer is the path of least resistance, and plenty of Helm charts default to it. Deleting the Deployment doesn't delete the Service, so the load balancer stays.

How to detect it. List every load balancer Service in the cluster:

kubectl get svc -A --field-selector spec.type=LoadBalancer

For each one, check whether anything is behind it:

kubectl get endpointslices -n NAMESPACE -l kubernetes.io/service-name=SERVICE_NAME

No ready endpoints means the load balancer can't serve a single request. While you're there, count how many of the rest could sit behind one ingress controller or Gateway API gateway.

What it costs. An NLB is $0.0225 an hour in us-east-1, about $16 a month before any traffic (ELB pricing). Small each, but among the easiest deletions you'll ever approve.

5. Abandoned namespaces and forgotten environments

What it is. A preview environment per pull request, a loadtest-q3 namespace, a proof of concept from an engineer who left. Each abandoned namespace is a bundle of the leaks above: pods holding requests, PVCs holding disks, Services holding load balancers.

Why it happens. Namespaces are free to create and awkward to delete. Nobody is sure what's still needed, and there's no expiry unless you build one. CI systems that create preview environments but only sometimes tear them down are the classic source.

How to detect it. Rank namespaces by pod count and look for names nobody recognizes:

kubectl get pods -A --no-headers | awk '{print $1}' | sort | uniq -c | sort -rn

Namespaces missing from that list aren't necessarily clean. They can still hold PVCs and load balancer Services:

kubectl get pvc,svc -n SUSPECT_NAMESPACE

For dollars per namespace, turn on your provider's view: split cost allocation data for EKS, GKE cost allocation or AKS cost analysis. Part two covers all three.

What it costs. The sum of leaks 1, 3 and 4 for every namespace nobody owns.

6. Missing or misconfigured autoscaling

What it is. Autoscaling is the difference between paying for peak capacity 730 hours a month and paying for it only during the peak. Three layers matter: HPA scaling pods with load, the Cluster Autoscaler or Karpenter scaling nodes with pods, and schedules that shrink non-production outside business hours. Static node groups sized for peak are the most expensive default in Kubernetes.

Why it happens. Autoscaling needs trust that scale-up will be fast enough. One slow node launch during an incident gets it disabled "temporarily", forever. And a raised minReplicas set during an incident rarely gets lowered afterwards.

How to detect it. Check whether the layers exist at all:

kubectl get hpa -A
kubectl get deploy -A | grep -iE 'cluster-autoscaler|karpenter'

Empty HPA output on a cluster full of stateless services is a finding by itself. So is an HPA whose REPLICAS equals MINPODS while CPU sits far under target: the floor, not the load, sets its size. For managed node pools, check at the provider: gcloud container node-pools describe POOL --cluster CLUSTER --format="value(autoscaling.enabled)" on GKE, and az aks nodepool show --resource-group RG --cluster-name CLUSTER --name POOL --query enableAutoScaling on AKS. The HPA docs cover pod-level setup.

What it costs. A business-hours dev cluster (60 of the week's 168 hours) running around the clock pays for about 64% idle compute.

The six checks on one page

#LeakFirst commandWhat it costs
1Overprovisioned requestskubectl top pods against requested CPU and memoryNodes bought for reserved air
2Underpacked nodeskubectl describe nodes against kubectl top nodesA whole node per blocked scale-down
3Orphaned volumeskubectl get pv for Released, then unattached cloud disksFull price for unread storage
4Empty load balancerskubectl get svc of type LoadBalancer, then EndpointSlicesAbout $16 a month each on AWS
5Forgotten namespacesPod count per namespace, then PVCs and ServicesLeaks 1, 3 and 4, unowned
6Missing autoscalingkubectl get hpa, autoscaler presence, node pool settingsPeak capacity, all month

Why the cleanup sprint never sticks

Every team eventually runs the big cleanup: two engineers, a spreadsheet, a satisfying graph in the next cost review. A quarter later, spend is back where it started.

01Week 0

Cleanup sprint

Two engineers, a spreadsheet, a satisfying graph.

02Weeks 1 to 12

Regrowth

Deploys ship padded requests, PRs spawn namespaces, volumes orphan.

03Quarter end

Back to baseline

Spend returns to where it was and the next sprint gets scheduled.

These leaks are byproducts of normal operations. A cluster regenerates waste at roughly the rate you clean it.

None of the six leaks is a one-time mistake. They're byproducts of normal operations. Every deploy can ship padded requests, because requests live in YAML that nobody re-reads. Every deleted StatefulSet can orphan a volume, because Retain is the right default. Every PR can spawn a preview namespace, because CI creates more reliably than it destroys. And the person who knows whether a namespace is still needed has usually moved on.

With a quarterly audit, each new leak bills for about six weeks on average before anyone looks, and the audit is exactly the work that gets dropped in a heavy release cycle.

What to do next

Run leak 1's two commands on your most expensive namespace today. If the gap looks like the opening's, part two turns the six checks into a full audit with kubectl, kube-state-metrics, VPA recommendations, autoscaler logs and the EKS, GKE and AKS cost views.

Related reading

About the author

ST

Steve Tran

Founder & CTO, CloudThinker

Steve Tran is the founder and CTO of CloudThinker, which builds Frontier Investigation Agents for production cloud operations. He writes about incident investigation, cloud cost, and the practices teams use to safely run autonomous AI agents against production AWS, GCP, and Azure environments.

kubernetescostoptimizationfinopsekskubectldevops