Skip to content

Kubernetes BestEffort QoS

BestEffort is a specific class of [[Kubernetes Quality of Service (QoS)]] assigned to Pods where resource allocation is handled with the lowest priority by the cluster scheduler.^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md]

Definition

A Pod is classified as BestEffort when all containers within that Pod have not set any values for requests or limits regarding CPU or Memory resources^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md]. This configuration implies that the Pod does not request a specific amount of resources and does not impose a maximum cap on its usage^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md].

Configuration Example

To create a BestEffort Pod, the resources field in the container specification should be left empty or omitted entirely^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md].

apiVersion: v1
kind: [Pod](<./pod.md>)
metadata:
  name: qos-demo-3
  namespace: qos-example
spec:
  containers:
  - name: qos-demo-3-ctr
    image: nginx

Characteristics

Lowest Priority

BestEffort Pods are assigned the lowest priority within the Kubernetes resource management hierarchy^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md]. This status makes them the first candidates for eviction when the system faces resource shortages, such as insufficient memory^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md].

Resource Behavior

Because they do not specify requests, these Pods can be scheduled on nodes that are already running many workloads, provided there is any minimal amount of resources available. Since they lack limits, they can potentially consume idle resources on the node, but they offer no guarantees regarding performance or stability^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md].

Comparison with other QoS Classes

  • [[Guaranteed QoS]]: Pods where requests equal limits for all containers.
  • [[Burstable QoS]]: Pods where at least one container has a request set, but they do not meet the strict equality of Guaranteed Pods.

Sources

^[400-devops-06-kubernetes-k8s-ithelp-day21-readme.md]