This repo is a minimal example for Kubernetes device plugin.
kubectl apply -f deploy/device-plugin-example.yaml
Then describe worker nodes.
Capacity:
example.com/device: 2
Allocatable:
example.com/device: 2
kubectl apply -f deploy/test-pod.yaml
kubectl apply -f deploy/test-pod2.yaml
kubectl apply -f deploy/test-pod3.yaml
Then 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 latest
Then run go mod tidy