Skip to main content

BestEffort

BestEffort is the Kubernetes QoS class given to pods whose containers set no CPU or memory requests or limits. These pods have no resource guarantees and are the first to be evicted when a node runs short of memory.

What BestEffort means

Kubernetes assigns a QoS class automatically from your resource settings. If no container in the pod has any request or limit, the pod is BestEffort. The scheduler treats its footprint as nearly zero, so it can be packed onto an already busy node, and the kubelet kills it first under memory pressure.

flowchart TD M["Node memory pressure"] -->|"first"| B["BestEffort pods
evicted first"] B -->|"if still low"| U["Burstable pods
over their requests"] U -->|"last resort"| G["Guaranteed pods"] classDef warn fill:#FEE2E2,color:#1E293B classDef mid fill:#FFEDD5,color:#1E293B classDef safe fill:#D1FAE5,color:#1E293B classDef start fill:#475569,color:#ffffff class M start class B warn class U mid class G safe

How a pod becomes BestEffort

YAML
containers:
- name: api
image: registry.example.com/api:v2.1.0
# No resources block at all, so the pod is BestEffort
Bash
kubectl get pod risky-api -n production -o jsonpath='{.status.qosClass}'
# BestEffort
# Find every BestEffort pod in the cluster
kubectl get pods -A -o json | \
jq -r '.items[] | select(.status.qosClass=="BestEffort") | [.metadata.namespace, .metadata.name] | @tsv'

How to eliminate BestEffort

Set requests and limits based on measured usage, then add a LimitRange so no pod in the namespace can slip through without them.

YAML
apiVersion: v1
kind: LimitRange
metadata:
name: prevent-besteffort
namespace: production
spec:
limits:
- type: Container
defaultRequest:
cpu: "100m"
memory: "128Mi"
default:
cpu: "500m"
memory: "512Mi"

The LimitRange admission controller injects these defaults at pod creation, so pods in that namespace become Burstable instead.

Remember

BestEffort is fine for throwaway debug pods and disposable batch jobs in non-production namespaces. In production namespaces, treat it as a bug.

Tip

Alert on kube_pod_status_qos_class{qos_class="BestEffort"} in production namespaces to catch misconfigured deployments before a traffic spike does.

Common Mistake

Assuming a BestEffort pod that has run for weeks is safe. It survives only while the node has spare memory, and it vanishes with no warning the first time pressure hits.

Frequently Asked Questions

Why would a pod end up BestEffort if nobody chose it?

It is almost always the accidental result of a manifest missing the resources block. Helm charts with empty default values are a common source, because the chart renders no requests or limits at all.

Does a ResourceQuota block BestEffort pods?

Yes, if the namespace quota covers CPU or memory, pods without requests and limits are rejected at admission. A LimitRange that injects defaults lets those pods through as Burstable.

Can a BestEffort pod hurt other pods?

Yes. Because the scheduler assumes it uses almost nothing, nodes can be overcommitted, and a leaking BestEffort pod can push the node into memory pressure that evicts other workloads.

Found a mistake, an outdated step or a broken link?