Skip to content
gohacks.dev
DevOps

Kubernetes CPU and Memory Calculator

Convert Kubernetes CPU and memory quantities (500m, 1.5, 512Mi, 2G), add up requests across replicas, see each pod's QoS class and estimate the nodes needed.

Free · No sign-up · Your inputs stay in your browser

Input

Convert and add up Kubernetes CPU and memory

Output

1.75 cores, 1.70 GiB requested

WorkloadCPU req / limMemory req / limQoS class
web250m / 1000m256 MiB / 512 MiBBurstable
worker500m488 MiB / 1024 MiBBurstable

Nodes needed (requests only)

1

at 4 vCPU / 16 GiB each

worker: 512M is decimal (488.3 MiB). Mi and Gi are the powers of 1024 most people mean.

The scheduler places pods by their requests, never their limits. A container over its CPU limit is throttled; one over its memory limit is OOM-killed. Node count assumes about 10% of CPU and 15% of memory are kept by the kubelet and system pods; check kubectl describe node for the real allocatable.

Runs in this browser. Nothing you paste is sent to a server.

Requests schedule, limits enforce

The scheduler places a pod on a node with enough unrequested capacity; limits are not considered. At runtime a container over its CPU limit is throttled, and one over its memory limit is killed with OOMKilled. A pod whose requests equal its limits for every container gets the Guaranteed QoS class and is the last evicted under pressure. See Resource Management for Pods and Containers.

M is not Mi

512M is 512,000,000 bytes and 512Mi is 536,870,912. Mixing them is harmless for requests and confusing for limits, where a container sized for 512Mi can be killed at 488Mi.

Share

Frequently asked questions

Should I set CPU limits?
Opinions differ. Without CPU limits a pod can use idle CPU on its node, which helps latency; with them, throttling can add latency even when the node is idle. Always set memory limits.
What does 250m CPU mean?
250 millicores: a quarter of one CPU core's time. 1 or 1000m is a full core.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools