Pod Scheduling — process of assigning Pods to Nodes based on resource requirements and constraints.
1apiVersion: v12kind: Pod3metadata:4 name: gpu-pod5spec:6 nodeSelector:7 accelerator: nvidia-tesla-v1008 affinity:9 podAffinity:10 preferredDuringSchedulingIgnoredDuringExecution:11 - weight: 10012 podAffinityTerm:13 labelSelector:14 matchLabels:15 app: cache16 topologyKey: kubernetes.io/hostname17 nodeAffinity:18 requiredDuringSchedulingIgnoredDuringExecution:19 nodeSelectorTerms:20 - matchExpressions:21 - key: zone22 operator: In23 values:24 - us-west-2a25 tolerations:26 - key: "dedicated"27 operator: "Equal"28 value: "gpu"29 effect: "NoSchedule"30 topologySpreadConstraints:31 - maxSkew: 132 topologyKey: topology.kubernetes.io/zone33 whenUnsatisfiable: DoNotSchedule34 labelSelector:35 matchLabels:36 app: myapp
Scheduling Plugins: