K8s Resource Calculator
Runs in browserCalculate CPU & memory requests/limits
CPU Resources
0.1 cores
0.5 cores
Memory Resources
0.13 Gi
0.50 Gi
Node Capacity (for density calc)
How to Use
Set CPU and Memory requests/limits to see analysis.
You will see:
- QoS Class (Guaranteed, etc.)
- OOM & Throttling Risk
- Pod Density Analysis
QoS Class
Burstable
Medium priority. Has some requests/limits set but not equal.
CPU Throttle Risk
Burst: 5.0x request
Memory OOM Risk
Burst: 4.0x request
Pods per Node
40
Limited by CPU
Overcommit
CPU, Memory
Generated YAML
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"Understanding Resources
Request: Guaranteed resources. Used for scheduling.
Limit: Maximum allowed. Exceeding CPU causes throttling, exceeding memory causes OOM kill.
Throttling: When CPU usage exceeds limit, container is throttled (slowed down).
OOM Kill: When memory exceeds limit, container is killed and restarted.
About Kubernetes Resource Management
Kubernetes resource requests and limits define how much CPU and memory containers can use. Proper configuration ensures efficient cluster utilization, prevents resource starvation, and enables effective autoscaling.
Requests vs Limits
Requests
- Guaranteed resources for scheduling
- Pod won't schedule without available resources
- Used for scheduling decisions
Limits
- Maximum resources allowed
- CPU throttled if exceeded
- OOMKilled if memory exceeded
Resource Units
CPU
- 1
- = 1 vCPU/core
- 500m
- = 0.5 CPU (millicores)
- 100m
- = 0.1 CPU = 10%
Memory
- 128Mi
- = 128 Mebibytes
- 1Gi
- = 1 Gibibyte
- 512M
- = 512 Megabytes (decimal)
QoS Classes
Guaranteed
Requests = Limits for all containers. Highest priority, last to be evicted.
Burstable
Requests < Limits. Can burst above requests if resources available.
BestEffort
No requests/limits set. Lowest priority, first to be evicted under pressure.
💡 Pro Tips
- Set requests based on actual usage from metrics
- Set limits 20-50% above requests for burst capacity
- Use Vertical Pod Autoscaler (VPA) to right-size resources
- Monitor OOMKilled events and CPU throttling
- Consider using LimitRanges and ResourceQuotas for governance
References & Further Reading
- Kubernetes Docs: Resource Management - Official guide.
- Configure QoS for Pods - Understanding Quality of Service classes.