Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 969 Bytes

README.md

File metadata and controls

48 lines (33 loc) · 969 Bytes

k8s-device-plugin-example

This repo is a minimal example for Kubernetes device plugin.

Deploy

kubectl apply -f deploy/device-plugin-example.yaml

Then describe worker nodes.

Capacity:
  example.com/device:        2
Allocatable:
  example.com/device:        2

Test

kubectl apply -f deploy/test-pod.yaml
kubectl apply -f deploy/test-pod2.yaml
kubectl apply -f deploy/test-pod3.yaml

Then watch pods.

issues

unknown revision v0.0.0

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

refs