Skip to content

Kubernetes QoS BestEffort class

Kubernetes QoS BestEffort class (Quality of Service) is one of the three service quality classes assigned to Pods based on their resource configuration. It represents the lowest priority for resource scheduling and allocation^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].

A Pod is classified as BestEffort only when every container within that Pod has no requests or limits set for CPU or memory^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].

Definition and Configuration

To create a BestEffort Pod, the resource section in the Pod specification must be empty or omitted^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].

apiVersion: v1
kind: Pod
metadata:
  name: qos-demo-3
  namespace: qos-example
spec:
  containers:
  - name: qos-demo-3-ctr
    image: nginx
    # resources are not set

After the Pod is created, you can verify its classification by viewing its status, where the qosClass field will display BestEffort^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].

Characteristics and Behavior

BestEffort Pods are designed to use whatever minimal resources are available on a node, but they operate with significant risks compared to other QoS classes^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].

  • Lowest Priority: In the hierarchy of QoS classes, BestEffort Pods have the lowest priority^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].
  • Eviction Strategy: When the system faces resource constraints (such as memory pressure), BestEffort Pods are the first candidates to be killed or evicted to free up resources for higher-priority Pods^[400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md].
  • No Resource Guarantees: These Pods do not have reserved resources. Their performance is entirely dependent on the node's idle capacity, which can fluctuate dynamically.

Comparison with Other Classes

Sources

  • 400-devops__06-Kubernetes__k8s-ithelp__Day21__README.md