Description
What happened?
Hello,
We observed that the node_name
scheduler plugin might not be functioning as expected.
In the current implementation, this plugin’s Filter
function checks if a given node’s name
matches the scheduling pod’s spec.nodeName
. So this plugin is expected to filter out any node whose name
does not match at the Filter
stage,
However, according to the Kubernetes documentation and our tests, any pod with a non-empty spec.nodeName
will bypass the default scheduler.
This leads to a case: whenever the node_name
plugin is invoked (at the Filter
stage), the pod’s spec.nodeName
must be empty. Then the plugin won't filter out any nodes, making it not functioning.
We're a bit confused about this and want to clarify: is this the correct behavior of the node_name
plugin, or are there scenarios that it would behave differently and meaningful? Thanks for your answer!
What did you expect to happen?
If our understanding is correct,
then we think this plugin should be removed, as it does not filter out any nodes.
How can we reproduce it (as minimally and precisely as possible)?
- By creating a pod with a non-empty
spec.nodeName
, the scheduler will ignore this pod. - Only when creating a pod with an empty
spec.nodeName
, the scheduler will schedule this pod.
Anything else we need to know?
/sig scheduling
Kubernetes version
1.31
Cloud provider
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here