Which Quality of Service (QoS) class in Kubernetes guarantees that a pod will never be evicted due to resource contention?
Think about which class requires both requests and limits to be set equally.
The Guaranteed QoS class requires that every container in the pod has memory and CPU requests and limits set to the same values. This ensures the pod is the last to be evicted under resource pressure.
Given the following pod YAML snippet, what is the QoS class assigned to this pod?
apiVersion: v1
kind: Pod
metadata:
name: example-pod
spec:
containers:
- name: app
image: nginx
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "200Mi"
cpu: "200m"Check if requests and limits are equal for all resources.
The pod has resource requests and limits set, but they are not equal. This makes the pod Burstable. Guaranteed requires requests and limits to be equal.
Which pod resource configuration will result in the pod being assigned the BestEffort QoS class?
BestEffort pods do not reserve any resources.
BestEffort QoS class is assigned when no resource requests or limits are set for any container in the pod.
You notice that a pod with resource requests and limits set differently is evicted during node resource pressure. What is the most likely QoS class of this pod?
Recall eviction priority order based on QoS classes.
Burstable pods have resource requests and limits set but not equal, so they have lower eviction priority than Guaranteed but higher than BestEffort.
You want to check the QoS class of a running pod named web-server. Which kubectl command will show this information directly?
Look for a command that extracts the QoS class from pod status.
The jsonpath option extracts the QoS class directly from the pod's status field. The other commands either do not show QoS or show unrelated information.