1. Home
  2. Developer tools
  3. Kubernetes Resource Calculator

Kubernetes Resource Calculator

Size requests and limits with numbers instead of guesses, and understand what 250m and 512Mi actually mean.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Kubernetes Resource Calculator

  1. Enter requests and limits for each container in the pod.
  2. Set replicas and node size.
  3. Read totals, QoS class and nodes needed; copy the YAML.

Features

  • Parses 250m, 0.5, 512Mi, 1Gi, 1G, 1e9 and other quantities
  • QoS: Guaranteed, Burstable or BestEffort, as Kubernetes decides it
  • Pods per node and nodes needed from requests
  • Warnings for missing limits and requests larger than limits
  • resources: YAML for every container

Supported formats

Input

  • Form input

You get

  • YAML

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Kubernetes Resource Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Node fit uses requests only and a flat system reservation; DaemonSets and kubelet eviction thresholds reduce real capacity further.

Guide

Kubernetes CPU and memory requests, limits and QoS explained with numbers

Every container in Kubernetes can declare how much CPU and memory it needs and how much it may use. Those two numbers decide where pods are scheduled, which pods are evicted first under pressure and how many fit on a node, yet they are often copied from an example without much thought. This calculator adds them up for a whole pod, shows the QoS class Kubernetes will assign and estimates node capacity.

The units

CPU is measured in cores. 1 is one full core or vCPU, and 250m is 250 millicores, a quarter of a core; 0.5 and 500m mean the same thing. Memory is measured in bytes with suffixes, and the suffixes come in two families: Mi and Gi are powers of 1024, while M and G are powers of 1000. 512Mi is 536,870,912 bytes and 512M is 512,000,000, about 5% less, so mixing them up quietly changes your limits.

Requests and limits

A request is a reservation: the scheduler only places a pod on a node that has that much unreserved capacity, and the container is guaranteed at least that share. A limit is a ceiling. A container that tries to use more CPU than its limit is throttled, which slows it down; one that uses more memory than its limit is killed and restarted. If a container sets a limit without a request, Kubernetes copies the limit into the request, and the calculator does the same.

QoS classes

Kubernetes sorts pods into three quality-of-service classes from their containers’ settings. A pod with no requests or limits at all is BestEffort and is evicted first when a node runs short. A pod where every container has CPU and memory limits equal to its requests is Guaranteed and is evicted last. Everything in between is Burstable. The class appears in kubectl describe pod and matters most on busy nodes.

Node fit

Enter the node’s vCPUs and memory, and a percentage reserved for the operating system and the kubelet. The calculator divides the remaining CPU and memory by the pod’s requests and takes the smaller result as the number of pods per node, then works out how many nodes the chosen replica count needs. It also shows how much the replicas could use in total if every container went up to its limits.

A worked example

The Sample pod has an app container requesting 250m CPU and 256Mi memory with limits of 1 core and 512Mi, plus a log-shipper sidecar requesting 50m and 64Mi with limits of 200m and 128Mi. The pod requests 300m (0.3 cores) and 320Mi in total, and its QoS class is Burstable because requests and limits differ. On a 4-vCPU, 16 GiB node with 10% reserved, CPU is the tighter resource: 12 pods fit, so three replicas need one node.

Warnings

The calculator warns about containers without a memory limit, since one leak can starve the whole node; containers without any CPU request, which the scheduler treats as needing nothing; requests larger than limits, which the API server rejects; and quantities it cannot parse.

What the estimate leaves out

Real nodes also run DaemonSets such as log collectors and network agents, and the kubelet keeps eviction thresholds free, so actual capacity is lower than the estimate. Compare with the Allocatable section of kubectl describe node for exact numbers.

Checked against the current version of the Kubernetes Resource Calculator on .

Frequently asked questions

What happens when a container exceeds its memory limit?

The kernel’s out-of-memory killer stops it and Kubernetes restarts the container, showing OOMKilled as the reason. Unlike CPU, memory cannot be throttled, so a container that keeps growing past its limit ends up in a restart loop.

Why is my pod Pending even though the node looks idle?

Scheduling uses requests, not actual usage. If the pods already placed on the node have requested most of its allocatable CPU or memory, a new pod does not fit even when real usage is low. Lower over-sized requests or add nodes.

What is the difference between Mi and M?

Mi is a mebibyte, 1,048,576 bytes; M is a megabyte, 1,000,000 bytes. 512M is about 488Mi. Kubernetes accepts both, so mixing them by accident gives limits about 5% different from what you meant.

Should I set CPU limits?

It depends. Limits throttle a container even when the node has idle CPU, which can add latency. Many teams set CPU requests on every container but limits only where noisy neighbours are a problem; memory limits are always recommended.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.