The Descheduler fails to evict Pods based on scheduling policies. This occurs when eviction rules conflict with Pod Disruption Budgets, node affinity requirements, or resource constraints. Resolve by reviewing descheduler strategies, PDB settings, and cluster topology.
The Descheduler is a Kubernetes component that identifies and evicts Pods from nodes based on policies to balance the cluster. When it encounters errors, it may fail to evict underutilized Pods, leading to suboptimal resource distribution. Errors can stem from permission issues, conflicting constraints, or misconfigured policies.
Verify the descheduler is running and check its logs:
kubectl get pod -n kube-system -l app=descheduler
kubectl logs -n kube-system -l app=descheduler --tail=100Check the descheduler policy and strategies:
kubectl get configmap -n kube-system descheduler-policy -o yaml
kubectl get deschedulerpolicy -o yamlEnsure policies are not too restrictive or conflicting.
List PDBs that may prevent eviction:
kubectl get pdb -A
kubectl describe pdb <name> -n <namespace>Verify minAvailable/maxUnavailable settings allow some disruption.
Check target Pods for constraints preventing eviction:
kubectl get pod <pod-name> -o yaml | grep -E "affinity|topologySpreadConstraints|nodeSelector"Loosen constraints if they conflict with rebalancing goals.
Check if descheduler has eviction permissions:
kubectl get clusterrole descheduler -o yaml
kubectl get clusterrolebinding descheduler -o yamlEnsure the role includes "evict" verb on Pods.
Assess current cluster balance:
kubectl top nodes
kubectl top pods -A
kubectl describe nodes | grep -A5 "Allocated resources"Update descheduler ConfigMap or DeschedulerPolicy:
apiVersion: descheduler.x-k8s.io/v1alpha1
kind: DeschedulerPolicy
strategies:
- name: "RemovePodsViolatingNodeAffinity"
params:
nodeAffinityType:
- requiredDuringSchedulingIgnoredDuringExecution
- name: "RemovePodsViolatingInterPodAntiAffinity"Re-deploy descheduler after changes.
Watch descheduler metrics to verify fixes:
kubectl logs -n kube-system -l app=descheduler -f
grep -i "evict" /var/log/pods/kube-system_descheduler-*/descheduler.logVerify evictions complete successfully.
Descheduler works with the kube-scheduler, not against it. If you see persistent eviction failures, check both components. The eviction process respects graceful termination periods (terminationGracePeriodSeconds), so very large values may cause timeouts. In production clusters, use multiple descheduler replicas with leader election to avoid conflicts. Monitor descheduler CPU/memory usage as it scans all Pods and Nodes during each run.
No subnets found for EKS cluster
How to fix "eks subnet not found" in Kubernetes
unable to compute replica count
How to fix "unable to compute replica count" in Kubernetes HPA
error: context not found
How to fix "error: context not found" in Kubernetes
default backend - 404
How to fix "default backend - 404" in Kubernetes Ingress
serviceaccount cannot list resource
How to fix "serviceaccount cannot list resource" in Kubernetes