Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To solve these problems, we should first have a clear knowledge of device plugin. A related concept for device plugin is kubernetes extended-resources. In conclusion, By sending a patch node request to the kubernetes apiserver, a custom resource type is added to the node, which is used for the quota statistics of the resource and the corresponding QoS configuration.

Example

To send a patch node request conveniently, we first execute kube proxy command to start it temporarily, then add six intel.com/devices to a node:

curl --header "Content-Type: application/json-patch+json" \
--request PATCH \
--data '[{"op": "add", "path": "/status/capacity/intel.com~1devices", "value": "6"}]' \
http://localhost:8001/api/v1/nodes/192.168.222.66/status

Now we 

Device plugin

Overview

draw.io Diagram
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNamedevice_plugin
simpleViewerfalse
width
diagramWidth631
revision1

Why device plugin

  • Very few devices are handled natively by Kubelet (cpu and memory)
  • Need a sustainable solution for vendors to be able to advertise their resources to Kubelet and monitor them without writing custom Kubernetes code
  • A consistent and portable solution to consume hardware devices across k8s clusters to use a particular device type (GPU, QAT, FPGA, etc.) in pods
  • ...

...