我要评分
获取效率
正确性
完整性
易理解

Deploying the Device Plugin Image

Deploy the device plugin image on all worker nodes.

  1. Install Golang 1.17 or later.
    yum install golang
  2. Download the device plugin code and switch to the specified commit ID.
    git clone https://github.com/everpeace/k8s-host-device-plugin.git
    cd  k8s-host-device-plugin
    git checkout 15e0a180dd4fbea7ea09b563b9e0713d3b90579a
  3. Integrate device-plugin.patch.

    Copy device-plugin.patch (in the k8s/DevicesPlugin folder of DemoVideoEngine.tar.gz) to the k8s-host-device-plugin directory.

    cd k8s-host-device-plugin
    patch -p1 < device-plugin.patch
  4. Build the device plugin.
    # Change the mirror site of Go.
    export GOPROXY=https://goproxy.cn
    go build
  5. Build an image.
    docker build -f Dockerfile  -t k8s-hostdev-plugin:0.1 .
    docker save k8s-hostdev-plugin:0.1 -o k8s-hostdev-plugin.tar
  6. Import the image.

    Copy k8s-hostdev-plugin.tar to all worker nodes and import the image.

    ctr -n k8s.io images import k8s-hostdev-plugin.tar