This repo is a minimal example for Kubernetes device plugin.
kubectl apply -f deploy/device-plugin-example.yamlThen describe worker nodes.
Capacity:
example.com/device: 2
Allocatable:
example.com/device: 2kubectl apply -f deploy/test-pod.yaml
kubectl apply -f deploy/test-pod2.yaml
kubectl apply -f deploy/test-pod3.yamlThen watch pods.
Add the replace for the unknown modules to go.mod as follows.
replace k8s.io/component-helpers => k8s.io/component-helpers latest
replace k8s.io/api => k8s.io/api latest
replace k8s.io/apimachinery => k8s.io/apimachinery latestThen run go mod tidy