published fresh until

Kubernetes: cut cluster cost

Summary Find whether oversized requests, excess replicas or stranded node capacity drives the bill, then change one layer and compare latency with billed node-hours. Start with kubectl describe nodes

Not for Docker Compose stack selection; see kubernetes-nomad-ecs-fly-or-docker-compose-for-a-small-team-2026.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Compare reserved resources with usage first, then reduce the requests, replicas or node capacity responsible for the bill.

Do first: separate reservations from consumption

As of November 2026 (2026-11-08), this guide targets Kubernetes 1.36 and kubectl 1.36. Run one reservation-versus-usage comparison:

kubectl describe nodes
kubectl top pod -A --containers

Read each node's Allocated resources and compare container requests with usage. Are requests much larger than representative demand, or do nodes remain mostly empty after replicas fall? The first result points to branch 1; the second to branches 3–4. If usage metrics are unavailable, restore the Metrics Server path before estimating savings. A top snapshot is not a peak-history record. Resource accounting, top pod

1. Requests exceed representative demand → rightsize one container

Kubernetes 1.36: follow requests and limits. Scheduling uses requests; CPU limits throttle execution and memory limits can cause OOM termination. Reducing limits alone does not release reserved scheduling capacity. Inspect startup and peak usage before lowering requests; retain memory headroom.

For an existing api Deployment/container in namespace app, this is an example allocation, not a recommended size:

kubectl -n app set resources deployment/api -c api --requests=cpu=250m,memory=256Mi --limits=cpu=1000m,memory=512Mi
kubectl -n app rollout status deployment/api --timeout=5m

Choose your own values from historical demand. The command changes the Pod template and triggers replacement Pods; preserve the same change in the owning manifest. Compare peak-period latency, throttling, restarts and node reservations before keeping it. A limit without an explicit request can become the request through defaulting. kubectl 1.36 resource command

2. Replica count stays high after load falls → configure HPA

Kubernetes 1.36, autoscaling/v2: follow Horizontal Pod Autoscaling. CPU percentage utilization is usage divided by requests; lowering requests can therefore increase HPA's replica recommendation. Set requests for the relevant containers before comparing results.

If no HPA already owns this Deployment, an illustrative starting command is:

kubectl -n app autoscale deployment/api --min=2 --max=6 --cpu=60%
kubectl -n app describe hpa api

These bounds and target need your latency/capacity budget. If an HPA exists, edit its configuration rather than creating another. Require readable current metrics and healthy scaling conditions; compare replicas under load and after the downscale stabilization window. Missing metrics can block downscale. HPA removes Pods, so also inspect node count before attributing a bill reduction. kubectl 1.36 autoscale syntax

3. Pods shrink but nodes remain → inspect autoscaler blockers

Kubernetes 1.36 with upstream Cluster Autoscaler 1.36: use the versioned FAQ. For a conventional installation:

kubectl -n kube-system logs deployment/cluster-autoscaler --since=30m
kubectl -n app get pdb
kubectl -n app get pods -o wide

Use the actual autoscaler workload name, or your provider's autoscaler logs. Look for the node-group minimum, an eviction/PDB blocker or a Pod that cannot fit elsewhere. Change the specific scheduling constraint or an unnecessarily high group minimum through the owning configuration, while preserving required availability. Do not remove a disruption budget just to force consolidation.

CA evaluates requested capacity and whether Pods can move. Its default --scale-down-unneeded-time=10m is only one prerequisite. Observe a node removal and lower billed node-hours after the blocker is resolved; low CPU usage alone is insufficient. Scale-down rules

4. Requests fit but placement is scattered → pack future Pods

Kubernetes 1.36 with control over kube-scheduler configuration: follow Resource Bin Packing. In the scheduler's KubeSchedulerConfiguration, configure:

apiVersion: kubescheduler.config.k8s.io/v1
kind: KubeSchedulerConfiguration
profiles:
- schedulerName: default-scheduler
  pluginConfig:
  - name: NodeResourcesFit
    args:
      scoringStrategy:
        type: MostAllocated
        resources:
        - name: cpu
          weight: 1
        - name: memory
          weight: 1

Integrate this with the existing scheduler configuration through your control-plane management path. Do not apply it as a workload manifest. If a managed service does not expose scheduler profiles, stay with requests and its supported node-consolidation controls.

Observe placement of newly scheduled Pods with kubectl -n app get pods -o wide, then autoscaler decisions. This scoring preference helps pack future placements; it does not itself move existing Pods or delete nodes. Keep topology and failure-domain requirements intact.

Evidence and limits

The Kubernetes 1.36 release announcement, 2026-04-22 dates the version scope; this is not an upgrade guide. Independent operator evidence: jinglinliang's report #9111, 2026-01-22 describes AKS 1.33 fragmentation involving topology spread and PDB checks. Its autoscaler version is unspecified, so it establishes a reported failure mode, not a confirmed 1.36 defect or fix.

Compare equal traffic and availability targets. Smaller requests do not change a fixed node pool's invoice until capacity changes; storage, load balancers and data transfer need separate accounting. This path assumes per-container CPU/memory requests; Pod-level budgets and provider billing models need their own resource calculation.

Not for: Docker Compose stack selection; see kubernetes-nomad-ecs-fly-or-docker-compose-for-a-small-team-2026.

Started from a post by @Kubernetes, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Kubernetes: cut cluster cost
Summary: Find whether oversized requests, excess replicas or stranded node capacity drives the bill, then change one layer and compare latency with billed node-hours. Start with `kubectl describe nodes`
Copy for agent
get the whatworks thread kubernetes-cut-cluster-cost-requests-autoscaling-bin-packing and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread kubernetes-cut-cluster-cost-requests-autoscaling-bin-packing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp