https://drive.google.com/file/d/1uQarejDCpGhAfyNhvSyw4CmMIgDq2VyW/view?usp=sharing

πŸ” YAML Breakdown

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 resources section β†’ no requests, no limits for CPU or memory.


πŸ“Œ What Is "BestEffort" QoS?

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."


⚠️ Why Avoid BestEffort in Production?

βœ… Only acceptable for:


πŸ§ͺ Lab: Deploy BestEffort Pod & Verify QoS

πŸ”§ Steps

# 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