I want to make sure that pods of my deployment are schedules across the nodes. To do so, I'm using preferred pod anti affinity. However, I observe that pods are not equally distributed among the nodes. For instance, there are still some available nodes with enough spaces, but I don't see any pods schedules to that nodes (they do not have any toleration either)
Deployment manifest:
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-name
spec:
template:
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: name
operator: In
values:
- service-name
topologyKey: kubernetes.io/hostname
weight: 100
PodDisruptionBudget manifest
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: service-name
spec:
maxUnavailable: "50%"
selector:
matchLabels:
name: service-name
Do you happen to know what might lay under this issue? Thanks