InfraBench / ai-compute / docker-k8s-sizing

Docker & Kubernetes Resource Sizing Calculator

Compute max pods per node, CPU/Memory bottlenecks, MiB vs MB conversions, and K8s / Docker Compose YAML

Presets:
Worker Node Capacity
Per-Pod Requests & Limits
Max Pods / Node
-
-
Minimum Nodes Needed
-
-
Total Requested CPU
-
-
Unit Conversion
-
-
Generated YAML Snippets
Kubernetes · container resources

          
Docker Compose · resource caps

          

Kubernetes Requests vs. Limits & Avoiding OOMKill

The Kubernetes scheduler places pods strictly using requests against each node's Allocatable capacity (Node Capacity minus OS, kubelet, and eviction-threshold reservations, plus the default 110 pods/node kubelet cap). Runtime enforcement uses limits via Linux cgroups.

  • CPU Is Compressible, Memory Is Not: Exceeding a CPU limit causes CFS throttling (latency spikes), whereas exceeding a memory limit triggers immediate kernel OOMKilled (exit code 137). For stateful or JVM/Python services, setting memory request == limit (Guaranteed QoS class) prevents unexpected node eviction.
  • MiB (Mi) vs. MB (M): Kubernetes distinguishes binary mebibytes (1 Mi = 1,048,576 bytes) from decimal megabytes (1 M = 1,000,000 bytes). Always standardize on Mi / Gi across manifests to match Linux kernel memory accounting.
  • Plan for N+1 Node Redundancy: Add at least 1 extra node above the calculated minimum so rolling upgrades or single-node failures never stall scheduling.

Frequently Asked Questions

What does 500m CPU mean in Kubernetes?

1000m (millicores) equals 1 full vCPU core / hardware hyperthread. Thus 500m requests half a vCPU core, and 250m requests one-quarter of a core.