Skip to main content

FinOps: Cost Optimization

Key Takeaways for AI & Readers
  • Billable Requests: Cloud costs are determined by resource "requests" rather than actual usage; over-requesting leads to wasted spend.
  • Visibility Tools: Use Kubecost or OpenCost to attribute spending to specific teams and identify optimization opportunities.
  • Right-Sizing: Vertical Pod Autoscaler (VPA) and automated recommendations help align resource requests with actual historical performance.
  • Spot Instances: Leverage heavily discounted spare cloud capacity for stateless, interruption-tolerant workloads to significantly reduce infrastructure costs.

Cloud providers charge you for the Nodes you provision. If your developers request too much CPU/RAM, you are paying for "Ghost Resources"—capacity that is reserved but never used.

1. Requests vs. The Bill

In Kubernetes, your cost is driven by Requests, not actual usage.

spec:
replicas:
template:
spec:
resources:
requests:
cpu: m
memory: Mi
Estimated Monthly Cost
$18.00
Efficiency (Requests vs Usage)42%
💡 Kubecost suggests reducing CPU to 100m.
In Kubernetes, you pay for what you Request, not what you use. Tuning these numbers is the key to FinOps.

If you have a Pod that uses 10MB of RAM but you request 1GB, you are paying for that 1GB for as long as the Pod is scheduled.

2. Kubecost & OpenCost

To manage this, you need visibility. Kubecost is the leading tool for:

  • Allocation: Seeing exactly which Team or Namespace is spending the most money.
  • Efficiency: Finding "Idle" containers that have massive requests but low usage.
  • Right-sizing: Providing specific recommendations (e.g., "Change CPU request from 500m to 100m to save $40/mo").

3. Automated Savings

Vertical Pod Autoscaler (VPA)

Automatically adjusts the requests of your pods based on historical usage. If an app uses more than it requested, VPA increases the request.

Spot Instances (Karpenter / Cluster Autoscaler)

Use "Spare Capacity" from AWS/GCP at a 70-90% discount.

  • The Catch: The cloud provider can take the node back with a 2-minute notice.
  • Strategy: Use Spot for stateless apps (Web servers) and On-Demand for stateful apps (Databases).

4. Resource Quotas

As an admin, set ResourceQuotas on Namespaces to prevent a single team from accidentally running up a $10,000 bill overnight.