https://drive.google.com/file/d/1uQarejDCpGhAfyNhvSyw4CmMIgDq2VyW/view?usp=sharing
apiVersion: v1
kind: Pod
metadata:
name: nnappone
namespace: learning
labels:
app: nnappone
spec:
containers:
- name: networknuts-app
image: nginx
# β NO `resources` block!
π΄ Key Observation:
There is no
resourcessection β norequests, nolimitsfor CPU or memory.
Kubernetes automatically assigns a Quality of Service (QoS) class to every Pod based on its resource configuration.
| QoS Class | Condition | Priority | Eviction Risk |
|---|---|---|---|
| Guaranteed | requests == limits for all containers & all resources (CPU + memory) |
π Highest | Never evicted due to resource pressure (if node has capacity) |
| Burstable | Some resources have requests β limits, or only requests/limits set for some resources |
π‘ Medium | Evicted after BestEffort, before Guaranteed |
| BestEffort | β No requests or limits for any container |
π» Lowest | First to be evicted under memory pressure! |
π‘ BestEffort = "Use whatever is free β but we make no promises."
β Only acceptable for:
- Temporary debug Pods
- Labs/learning
- Truly stateless, non-critical workloads
# 1. Create namespace
kubectl create namespace learning
# 2. Apply the Pod
kubectl apply -f pod-simple-qos-besteffort.yml
# 3. Check Pod status
kubectl get pods -n learning
# 4. Describe Pod β look for "QoS Class"
kubectl describe pod nnappone -n learning | grep "QoS Class"
# β
Expected output:
# QoS Class: BestEffort
# 5. (Optional) View full resource info in JSON
kubectl get pod nnappone -n learning -o jsonpath='{.status.qosClass}{"\\\\n"}'
# 6. Clean up
kubectl delete pod nnappone -n learning
kubectl delete namespace learning