Skip to content

Add nodeSelector to nvidia-device-plugin DaemonSet - #8859

Open
mmustafasenoglu wants to merge 1 commit into
eksctl-io:mainfrom
mmustafasenoglu:fix/nvidia-plugin-node-selector
Open

mmustafasenoglu wants to merge 1 commit into
eksctl-io:mainfrom
mmustafasenoglu:fix/nvidia-plugin-node-selector

Conversation

@mmustafasenoglu

Copy link
Copy Markdown

Fixes #8858

The nvidia-device-plugin-daemonset only had a toleration for the nvidia.com/gpu taint but no nodeSelector, so Kubernetes could schedule it on non-GPU nodes. On clusters with mixed node types (e.g. CPU head + GPU worker), this caused CrashLoopBackOff on CPU nodes since there's no GPU to discover, and repeated restarts filled disk until kubelet applied DiskPressure taint.

Changes:

  • pkg/addons/assets/nvidia-device-plugin.yaml: Add nvidia.com/gpu.present: true nodeSelector to the DaemonSet template
  • pkg/addons/device_plugin.go: Add SetNodeSelector to the DevicePlugin interface and implement it for all device plugins (NvidiaDevicePlugin sets the GPU label, Neuron/EFA are no-ops)
  • pkg/addons/device_plugin_test.go: Add tests for SetNodeSelector behavior

The nvidia-device-plugin-daemonset only had a toleration for the
nvidia.com/gpu taint but no nodeSelector, which meant it could be
scheduled on non-GPU nodes. On clusters with mixed node types, this
caused CrashLoopBackOff on CPU nodes and DiskPressure from restarts.

Add nvidia.com/gpu.present=true nodeSelector to the DaemonSet template
and a SetNodeSelector method to the DevicePlugin interface, matching
the label that the NVIDIA GPU Operator sets on GPU-capable nodes.

Fixes eksctl-io#8858
@github-actions

Copy link
Copy Markdown
Contributor

Hello mmustafasenoglu 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] nvidia-device-plugin-daemonset has no nodeSelector, gets scheduled onto non-GPU nodes too (and can take down an unrelated node with DiskPressure)

1 participant