Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

Kubernetes Cost Optimization

21. 05. 2024 Updated: 27. 03. 2026 1 min read intermediate

Cloud Intermediate

Kubernetes Cost Optimization

KubernetesFinOpsCost OptimizationCloud 6 min read

Kubernetes cost optimization. Right-sizing, spot instances, resource quotas and cost visibility tools.

Where the Money Goes

A typical K8s cluster uses only 20-40% of allocated resources.

  • Over-provisioning — resource requests set too high
  • No limits — workloads consume more than they need
  • Idle resources — dev/staging clusters running 24/7
  • Wrong instance types — overly expensive VMs

Right-sizing with VPA

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: api-vpa
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: api-server
  updatePolicy:
    updateMode: "Off"
  resourcePolicy:
    containerPolicies:
      - containerName: api
        minAllowed:
          cpu: 50m
          memory: 64Mi
        maxAllowed:
          cpu: 2
          memory: 4Gi

Spot Instances

Spot/preemptible instances offer 60-90% discounts. Use them for stateless and batch workloads.

spec:
  tolerations:
    - key: kubernetes.azure.com/scalesetpriority
      operator: Equal
      value: spot
      effect: NoSchedule
  affinity:
    nodeAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
        - weight: 100
          preference:
            matchExpressions:
              - key: kubernetes.azure.com/scalesetpriority
                operator: In
                values: [spot]

Tools

  • Kubecost — cost allocation per namespace/label/team
  • OpenCost — open-source cost monitoring (CNCF)
  • Goldilocks — VPA recommendations for an entire namespace
  • Karpenter — intelligent node provisioning (AWS)

Summary

K8s cost optimization is a continuous process. Right-sizing, spot instances, resource quotas and cost visibility tools can reduce costs by 40-60%.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.