Pre-Production Cost Hygiene: Stop Paying for Idle Environments

Staging and QA often cost as much as prod. Here’s how to cut that in half without slowing releases.

D
Daniel Paz
1 min read

Pre-production is the stealth budget killer. Staging, QA, and preview clusters rarely serve users, yet they run 24/7. A few guardrails can cut their cost in half while keeping release speed intact.

Right-size for intent

  • Smaller node pools: Default to fewer, cheaper instances and scale up only during test windows.
  • Lower HPA floors: Set min replicas to 1 or 2; avoid production-like padding unless load tests demand it.
  • Use cheaper storage classes: GP2/GP3 over provisioned IOPS for anything non-prod.

Automate off-hours savings

  • Scheduled scale-downs: Cron-based HPA caps at night and weekends; wake up before the workday.
  • Suspend non-critical CronJobs: Archive runs during quiet hours; keep only synthetic monitoring alive.
  • Ephemeral previews: Create namespaces on PR open, garbage collect on merge/close.

Control observability spend

  • Shorter retention: 3–7 days of logs and metrics is plenty for staging.
  • Sample traces: Keep SLO traffic at 100%, but sample aggressively for everything else.
  • Sidecar limits: Clamp APM/logging sidecars to tight requests and limits.

Budget and enforce

  • Separate pre-prod into its own projects/accounts so alerts and budgets are isolated.
  • Apply stricter ResourceQuota and LimitRange than production; fail deployments that omit them.
  • Report cost per environment weekly and set a target like “staging ≤ 40% of prod.”

Rollout checklist

  • Baseline current staging spend and utilization.
  • Apply template changes (limits, HPA floors, storage class) to the top 5 services.
  • Add scheduled scale-downs and auto-clean preview namespaces.
  • Re-measure after one week; adjust quotas and retention until the target is met.

Pre-production exists to de-risk releases, not to mirror every production cost. Shape it for short-lived testing, and your burn will drop without slowing shipping.***

👨‍💻

Daniel Paz

Marketing Lead

Read Next

Join 1,000+ FinOps and platform leaders

Get Kubernetes and ECS cost tactics delivered weekly.