Skip to main content
RunBook Academy

KubernetesLXXXIV · Resource Capacity PlanningCapacity planning

Capacity forecasting — the planning horizon

Advanced⏱ ~12 minkubectl

What you'll learn

  • Explain the capacity forecasting discipline
  • Identify the inputs (workload growth, business projections)
  • Compute the capacity plan and cost projection
  • Plan the capacity for the planning horizon

Prerequisites

Verified against Kubernetes 1.34.x · kubeadm 1.34.x · kubectl 1.34.x · etcd 3.6.x · CoreDNS 1.11.x · containerd 1.7.x / 2.x · 2026-08-16

Not yet marked complete on this device.

Capacity forecasting is the discipline of planning the cluster’s capacity for the planning horizon. The inputs are the workload growth and the business projections; the outputs are the capacity plan and the cost projection. This lesson walks the discipline, the inputs, the outputs, and the production patterns.

The planning horizon

The planning horizon is the time frame for the forecast:

flowchart LR
    A[Q1] --> B[Q2]
    B --> C[Q3]
    C --> D[Q4]
    D --> E[Year-end]

The planning horizon is typically 1 year (4 quarters). The forecast is per quarter.

The inputs

The inputs to capacity forecasting:

The workload growth

The workload growth is the per-workload forecast:

Workload: nginx
Q1: 5 replicas, 500m / 1Gi
Q2: 7 replicas, 500m / 1Gi (50% growth)
Q3: 10 replicas, 500m / 1Gi (43% growth)
Q4: 15 replicas, 500m / 1Gi (50% growth)

The growth is per workload; the planning is per workload.

The business projections

The business projections are the marketing and product inputs:

Marketing: Q3 launch of new product, 2x traffic expected
Product: Q2 feature rollout, 30% load increase
Sales: Q4 enterprise contracts, 50% load increase

The business projections are the context for the workload growth.

The historical data

The historical data is the baseline:

Last year: 100 vCPU, 200Gi memory
Last quarter: 110 vCPU, 220Gi memory
Growth: 10% per quarter

The historical data is the trend.

The capacity plan

The capacity plan is the per-quarter forecast:

Q1: 5 nodes, 40 vCPU, 160Gi memory
Q2: 7 nodes, 56 vCPU, 224Gi memory  (40% growth)
Q3: 10 nodes, 80 vCPU, 320Gi memory  (43% growth)
Q4: 15 nodes, 120 vCPU, 480Gi memory  (50% growth)

The plan is per quarter.

The cost projection

The cost projection is the per-quarter cost:

Q1: 5 nodes * $100 = $500/month, $1500/quarter
Q2: 7 nodes * $100 = $700/month, $2100/quarter
Q3: 10 nodes * $100 = $1000/month, $3000/quarter
Q4: 15 nodes * $100 = $1500/month, $4500/quarter

Annual: 4 quarters * (avg 9.25 nodes * $100) = $11,100/year

The cost projection is per quarter; the annual cost is the sum.

The forecast review

The forecast is reviewed quarterly:

gantt
    title Capacity review cadence
    dateFormat  YYYY-MM-DD
    section Reviews
    Q1 review       :done, 2026-04-01, 1d
    Q2 review       :active, 2026-07-01, 1d
    Q3 review       :2026-10-01, 1d
    Q4 review       :2027-01-01, 1d

The cadence is quarterly. The forecast is updated.

The forecast accuracy

The forecast accuracy is the difference between the forecast and the actual:

Q1 forecast: 5 nodes
Q1 actual: 6 nodes (20% over forecast)
Q2 forecast: 7 nodes (adjusted to 8 based on Q1)

The forecast is adjusted based on the actual.

The forecast tools

The forecast tools:

  • Spreadsheet: the manual approach.
  • Custom scripts: company’s internal tool.
  • Cloud provider tools: AWS Compute Optimizer, GCP Recommender, Azure Advisor.

The tools are the input for the forecast.

The forecast output

The forecast output is the deliverable:

Q1-Q4 FORECAST: 11,100/year
Q1-Q4 ACTUAL: 10,500/year (5% under forecast, due to right-sizing)

VARIANCE: 600 (5.4% under forecast)

The forecast vs the actual is the input for the next forecast.

The cloud commitment

The forecast is the basis for the cloud commitment:

Reserved Instances: 1-year commitment, 30% discount
Savings Plans: 1-year commitment, 25% discount
Spot Instances: 70% discount, for batch workloads

The cloud commitment is the cost optimization.

Cross-course references

  • The VPA course (Part LXXXIII) covers the right-sizing.
  • The HPA course (Part LXXXII) covers the scaling.
  • The Capacity Sizing course (Part LXXV) covers the node sizing.

Quiz

Knowledge check · 4 questions

  1. Q1. What is the typical planning horizon for capacity forecasting?

  2. Q2. The forecast is adjusted based on the actual usage from the previous quarter.

  3. Q3. Walk the capacity forecast for a 1-year horizon.

    Cluster: 5 nodes, 40 vCPU, 160Gi memory. Growth: 30% per quarter. Cost: $100/month per node. The team is computing the annual forecast.

  4. Q4. What is the role of the cloud commitment in capacity forecasting?

Passing score: 75%. Answers are checked in this browser.

Production discipline

  • Forecast the capacity per quarter. The annual plan is the deliverable.
  • Review the forecast quarterly. The actual vs the forecast.
  • Use the forecast for cloud commitments. Reserved Instances, Savings Plans.
  • Document the forecast. The assumptions, the inputs, the outputs.
  • Adjust the forecast based on the actual. The iterative improvement.
  • Plan the growth. The workload and the business projections.

The capacity forecasting is the cluster’s planning horizon. Operating it well is forecasting per quarter, adjusting based on the actual, and committing to the right capacity.