Kubernetes Resource Requests and Limits Calculator
Enter workloads or import YAML, set your node size and price, and see total requests, QoS classes, how many nodes the pods need and the cost per namespace.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Add workloads
Enter names, namespaces, replicas and containers, or import YAML.
- 2Set resources
Type CPU and memory requests and limits per container.
- 3Check QoS
Read the class badge next to each workload and fix invalid values.
- 4Describe nodes
Enter node size, reserved share, pod limits and node count.
- 5Read fit and cost
See nodes needed, per-node bars and monthly cost per namespace.
- 6Export
Download the workload table as CSV.
เกี่ยวกับเครื่องมือนี้
Kubernetes schedules pods by their resource requests, not their actual usage, so the sum of requests decides how many nodes you pay for. Limits decide when a container is throttled or killed, and the combination of requests and limits decides each pod's quality of service class, which controls who is evicted first when a node runs short of memory. Working this out across many workloads, replicas and sidecars is tedious in a spreadsheet, and the units do not help: 250m, 0.25 and 1.5 for CPU, 512Mi, 1Gi and 1G for memory. This calculator holds a list of workloads with replicas and containers, parses Kubernetes quantity units, works out per-pod and total requests and limits, labels each workload Guaranteed, Burstable or BestEffort, and then packs the pods onto your node type with a first-fit-decreasing estimate to show how many nodes are needed, how full each one is, how far limits overcommit the cluster and what each namespace costs per month at your node price.
Units
CPU accepts millicores (250m) or cores (0.25, 1.5). Memory accepts binary units Ki, Mi, Gi and Ti and decimal units k, M, G and T, so 1Gi is 1,073,741,824 bytes and 1G is 1,000,000,000. Invalid values are outlined in red, and a limit below its request is reported because the API server rejects it.
QoS classes
Guaranteed means every container has CPU and memory limits and requests equal to them (a limit alone counts, since Kubernetes copies it to the request). BestEffort means nothing is set. Everything else is Burstable. Under memory pressure BestEffort pods are evicted first, then Burstable pods using more than their request.
Nodes and bin-packing
Enter vCPU and memory per node, the share reserved for the system and kubelet, maximum pods per node and the pods each node already runs for DaemonSets. Allocatable capacity is computed from those values. Pods are sorted by their largest share of a node and placed on the first node with room, which is close to how the scheduler fills nodes when requests are the limiting factor. The result shows nodes needed, a CPU and memory bar per node and pods that fit on no node at all.
Cost
Monthly cost is the node price times 730 hours times the node count. Each namespace is charged by the larger of its CPU and memory share of the cluster, and idle capacity is shown as unassigned rather than spread across teams.
Limits
The estimate uses requests only. Real scheduling also considers affinity, taints, topology spread, PodDisruptionBudgets, ephemeral storage and actual daemon usage, and cloud providers reserve different amounts per node size. Check kubectl describe node for real allocatable values and treat the numbers as planning figures, not a quote.
ตัวอย่างพร้อมวิธีทำ
Four workloads (web with an Envoy sidecar times 3, api times 4, worker times 2 and redis) request 5 cores and 7.44 GiB across 10 pods. On 3 nodes of 4 vCPU and 16 GiB with 10 percent reserved, allocatable is 3.6 cores and 14.4 GiB per node, so requests use 46 percent of cluster CPU and 17 percent of memory, and bin-packing fits everything on 2 nodes. At 0.192 dollars per node hour the pool costs 420.48 dollars a month; the shop namespace takes a 28 percent share (116.80 dollars) and jobs 19 percent (77.87 dollars). The worker is Guaranteed, web and api are Burstable, and redis is Burstable because it has no CPU limit.
สรุปสั้น ๆ
- หมวดหมู่: นักพัฒนาและข้อมูล
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: Kubernetes Documentation, Resource Management for Pods and Containers; Pod Quality of Service Classes
คำถามที่พบบ่อย
What is the difference between requests and limits?
Requests are what the scheduler reserves for a container and are used to place pods. Limits are the most a container may use: CPU above the limit is throttled, memory above the limit gets the container killed.
Which QoS class should I aim for?
Guaranteed for critical stateful services such as databases, Burstable for most web services, and BestEffort only for jobs that can be interrupted at any time.
Why are my nodes underused although the cluster says it is full?
Because scheduling uses requests. If requests are much higher than real usage, nodes look full on paper. Compare requests with metrics and lower them where safe.
How do I count DaemonSets?
Set System pods per node for small agents, or add the DaemonSet as a workload with replicas equal to your node count.
Can I import my existing manifests?
Yes. Paste Deployments, StatefulSets, Jobs or Pods on the Import tab and their containers, replicas and resources are read into the list.
Is my data stored anywhere?
Only in this browser as a local draft with undo and redo. Nothing is uploaded.
