Skip to main content
Kubernetes places pods by what they request, not by what they use. A service that requests 1 CPU and uses 100m keeps 900m of a node reserved for nothing, and enough of those adds whole nodes to your bill.

Find over-sized services

  1. Open Observability and select Platform. CPU and memory are shown as requested, used and allocatable. A large gap between requested and used means reserved capacity nobody uses.
  2. Select Applications, then Metrics, and look at each service’s CPU Usage and Memory Usage over a typical week.
  3. Compare with the service’s requests.

Set requests and limits

Set them per service in inframan.yaml:
inframan.yaml
  • Requests are what the service reserves. Set them near its typical use.
  • Limits cap it. A replica that exceeds its memory limit is restarted, so give memory some headroom over the peak.
  • On non-production infrastructures the defaults are a 100m / 128Mi request and a 500m / 256Mi limit.
Different sizes for production and non-production go under environments.
With hpa scaling, the CPU target is a percentage of the request. Lowering a request makes the autoscaler add replicas sooner, so adjust cpu with it.

Who changes what

Inframan never resizes your services on its own. A change to your service’s resources is always one you made in inframan.yaml, reviewed like any other change. The platform’s own components are different. Inframan starts the ingress, Knative and the monitoring stack small, and raises their memory or CPU automatically when they run short, step by step up to a ceiling. See Self-healing.