https://drive.google.com/file/d/1i6DcsQp3H-3PkiLRQQR5dnn5O_dCDg_b/view?usp=sharing
apiVersion: v1
kind: Pod
metadata:
name: nnappone
namespace: learning
labels:
app: nnappone
spec:
containers:
- name: crackone-app
image: nginx
resources:
requests:
memory: "150Mi" # โ Minimum guaranteed
limits:
memory: "250Mi" # โ Maximum allowed
# โ No CPU resources defined!
๐ Key Observation:
- Only memory has
requestsandlimits- CPU has no resources defined โ This is enough to make the Pod Burstable (not BestEffort, not Guaranteed)
A Pod is Burstable if at least one of these is true:
requests โ limits for any resource (e.g., memory: 150Mi โ 250Mi), ORrequests or limits defined for only some resources (e.g., memory defined, but CPU missing)โ Your Pod qualifies because:
- Memory:
requests (150Mi)<limits (250Mi)โ burst allowed- CPU: not defined โ treated as BestEffort for CPU, but Burstable overall
๐ฏ Kubernetes Rule:
Burstable = Not BestEffort AND Not Guaranteed
| QoS Class | Memory requests |
Memory limits |
CPU Defined? | Eviction Priority |
|---|---|---|---|---|
| BestEffort | โ | โ | โ | ๐ด First |
| Burstable | โ (150Mi) | โ (250Mi) | โ | ๐ก Medium |
| Guaranteed | โ (e.g., 200Mi) | โ (=200Mi) | โ (equal req/lim) | ๐ข Last |
๐ก Burstable Behavior:
- Gets 150Mi guaranteed at startup (scheduler reserves this).
- Can burst up to 250Mi if node has free memory.
- If memory pressure occurs:
- Evicted after BestEffort Pods
- Evicted before Guaranteed Pods
- Among Burstable Pods: those using more than requested are killed first.
# 1. Create namespace
kubectl create namespace learning
# 2. Apply the Pod
kubectl apply -f pod-simple-qos-burstable.yml
# 3. Check Pod status
kubectl get pods -n learning
# 4. Describe Pod โ check QoS Class and resources
kubectl describe pod nnappone -n learning | grep -A 5 -B 2 "QoS\\\\|Limits\\\\|Requests"
# โ
Expected output:
# Requests:
# memory: 150Mi
# Limits:
# memory: 250Mi
# QoS Class: Burstable
# 5. (Optional) Extract QoS via JSONPath
kubectl get pod nnappone -n learning -o jsonpath='{.status.qosClass}{"\\\\n"}'
# 6. Clean up
kubectl delete pod nnappone -n learning
kubectl delete namespace learning