Kubelet
Kubelet
Device Plugin
(DaemonSet Pod)
Device Plugin
(DaemonSet Pod)
API Server
API Server
kube-scheduler
kube-scheduler
User
User
Node Startup: Kubelet Prepares Registration Service
① Start Registration gRPC service
Create kubelet.sock (Unix Socket)
Path: /var/lib/kubelet/device-plugins/kubelet.sock
Device Plugin Starts and Registers
② Device Plugin Pod starts
Mount host kubelet.sock into container
③ Register(endpoint, version, resourceName)
via kubelet.sock
Registration successful
Device Discovery and Resource Reporting
④ ListAndWatch()
via Device Plugin's Unix Socket
Return device list [{ID, Health}, ...]
(continuously listen for device add/remove events)
⑤ Update Node status
Node.status.capacity[nvidia.com/gpu] = 1
User Submits Pod
⑥ Create Pod
(resources.limits: nvidia.com/gpu: 1)
Notify pending Pod
⑦ Filter nodes meeting resource requirements
Bind result (write Pod.spec.nodeName)
Device Allocation and Container Start
Notify pending Pod on this node
⑧ Allocate(deviceIDs)
Return allocation result
(device file paths, env vars, etc.)
⑨ Start container, inject device info
Mount /dev/nvidia0
Inject NVIDIA_VISIBLE_DEVICES