How to fix Preempted in Kubernetes
Preempted pods were evicted to make room for higher-priority pods. Adjust priority classes, add cluster capacity, or review resource requests.
Quick fix
Fixes Preempted
kubectl describe pod <preempted-pod>- Understand the preemption event
- Review and fix priority class assignments
- Add cluster capacity
- Use non-preempting priority classes
kubectl describe pod <preempted-pod>Preempted
What this error means
Pod preemption occurs when a higher-priority pod cannot be scheduled due to insufficient resources, so the scheduler evicts lower-priority pods to make room. Unlike node-pressure eviction (kubelet protecting node health), preemption is a scheduling decision to prioritize important workloads. Preemption is controlled by PriorityClass resources. Pods with higher priority values can preempt pods with lower values. The scheduler terminates victim pods gracefully and schedules the pending high-priority pod on the freed resources.
Typical symptoms
- Pod shows status Preempted or events mention preemption
- Lower-priority pods repeatedly evicted when high-priority pods schedule
- Pending pods with message about preemption victims
- Unexpected pod terminations during cluster resource contention
- Batch jobs interrupted by production workloads
- Events show nominated node for pending pods
Common causes
- Higher-priority pod needed resources occupied by lower-priority pods
- Cluster lacks sufficient resources for all workloads
- Priority classes misconfigured - non-critical pods given high priority
- Autoscaler not adding nodes fast enough
- Resource requests too high relative to cluster capacity
- No preemption policy set on priority class (defaults to preempt)
How to fix "Preempted"
Check why the pod was preempted:
kubectl describe pod <preempted-pod>Look at Events for:
- "Preempted by <namespace>/<pod-name>" - shows what preempted it
- Priority class of victim and preemptor
Check priority classes in use:
kubectl get priorityclasses
kubectl get pod <pod-name> -o yaml | grep priorityClassNameAudit priority usage across the cluster:
# See all pods with their priorities
kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,PRIORITY:.spec.priorityClassNameCommon priority hierarchy:
# System critical (built-in)
system-cluster-critical: 2000000000
system-node-critical: 2000001000
# Production workloads
production: 1000000
# Default/batch workloads
default: 0
batch: -100Ensure non-critical workloads don't have elevated priorities.
If legitimate high-priority pods are preempting needed workloads:
# Check node utilization
kubectl top nodes
# Check pending pods
kubectl get pods --field-selector=status.phase=PendingSolutions:
- Add more nodes to the cluster
- Use larger node instance types
- Enable cluster autoscaler for dynamic scaling
# Example: Scale node pool (cloud-specific)
# GKE
gcloud container clusters resize CLUSTER --num-nodes=5
# EKS (via node group)
aws eks update-nodegroup-config --cluster-name CLUSTER --nodegroup-name NODEGROUP --scaling-config minSize=3,maxSize=10,desiredSize=5Create priority classes that queue without preempting:
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority-non-preempting
value: 1000000
preemptionPolicy: Never # Won't evict other pods
globalDefault: false
description: "High priority but won't preempt others"Pods with this class wait in queue rather than evicting existing pods.
PDBs limit voluntary disruptions but don't prevent preemption directly. They're more useful for planned operations:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: app-pdb
spec:
minAvailable: 2 # or maxUnavailable: 1
selector:
matchLabels:
app: critical-appFor preemption protection, use appropriate priority classes instead.
Right-size resource requests to reduce resource contention:
# Check actual vs requested resources
kubectl top pods
kubectl get pods -o custom-columns=NAME:.metadata.name,REQ_CPU:.spec.containers[*].resources.requests.cpu,REQ_MEM:.spec.containers[*].resources.requests.memoryReduce over-provisioned requests:
resources:
requests:
cpu: "100m" # Actual need, not worst-case
memory: "256Mi"
limits:
cpu: "500m" # Allow bursting
memory: "512Mi"Lower requests mean more pods fit, reducing preemption pressure.
Advanced notes
Preemption respects PodDisruptionBudgets for voluntary disruptions but can override them for critical scheduling needs. The scheduler tries to minimize preemption impact by selecting victims that:
1. Have lower priority
2. Won't violate PDBs
3. Require evicting fewer pods
RBAC can restrict who creates high-priority pods:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: priority-user
rules:
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
resourceNames: ["low-priority", "medium-priority"] # Not high-priority
verbs: ["use"]Monitor preemption with:
kubectl get events --field-selector reason=PreemptedFrequently asked questions
- What does "Preempted" mean?
- Pod preemption occurs when a higher-priority pod cannot be scheduled due to insufficient resources, so the scheduler evicts lower-priority pods to make room. Unlike node-pressure eviction (kubelet protecting node health), preemption is a scheduling decision to prioritize important workloads. Preemption is controlled by PriorityClass resources.
- How do I fix "Preempted"?
- Preempted pods were evicted to make room for higher-priority pods. Adjust priority classes, add cluster capacity, or review resource requests.
- What causes "Preempted"?
- Higher-priority pod needed resources occupied by lower-priority pods Cluster lacks sufficient resources for all workloads Priority classes misconfigured - non-critical pods given high priority
- Is the "Preempted" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐Kubernetes Official Documentation
- ๐Kubernetes Docs: pod priority preemption(Official Docs)
- ๐
- ๐