Deploying the Device Plugin Image
Deploy the device plugin image on all worker nodes.
- Install Golang 1.17 or later.
1yum install golang
- Download the device plugin code and switch to the specified commit ID.
1 2 3
git clone https://github.com/everpeace/k8s-host-device-plugin.git cd k8s-host-device-plugin git checkout 15e0a180dd4fbea7ea09b563b9e0713d3b90579a
- Integrate device-plugin.patch.
Copy device-plugin.patch (in the k8s/DevicesPlugin folder of DemoVideoEngine.tar.gz) to the k8s-host-device-plugin directory.
1 2
cd k8s-host-device-plugin patch -p1 < device-plugin.patch
- Build the device plugin.
1 2 3
# Change the mirror site of Go. export GOPROXY=https://goproxy.cn go build
- Build an image.
1 2
docker build -f Dockerfile -t k8s-hostdev-plugin:0.1 . docker save k8s-hostdev-plugin:0.1 -o k8s-hostdev-plugin.tar
- Import the image.
Copy k8s-hostdev-plugin.tar to all worker nodes and import the image.
1ctr -n k8s.io images import k8s-hostdev-plugin.tar
Parent topic: Deploying Images