Power Device Plugin to add protected devices into a non-privileged container.
The Power Device Plugin uses the Kubernetes Device Plugin in order to add specific devices to the given Pod.
The device plugin only installs on the workers.
- To deploy the device plugin:
# kustomize build manifests | oc apply -f -
project.project.openshift.io/power-device-plugin created
serviceaccount/power-device-plugin created
clusterrolebinding.rbac.authorization.k8s.io/power-device-plugin created
daemonset.apps/power-device-plugin created
To debug the running plugin, you can use:
export GRPC_GO_LOG_VERBOSITY_LEVEL=99
export GRPC_GO_LOG_SEVERITY_LEVEL=info
Thse are commented out in the DaemonSet.
You can check the kubelet behavior using:
# journalctl -u kubelet
...
7446 handler.go:95] "Registered client" name="power-dev-plugin/dev"
wrapper[7446]: I1219 04:32:20.722778 7446 manager.go:230] "Device plugin connected" resourceName="power-dev-plugin/dev"
wrapper[7446]: I1219 04:32:20.723559 7446 client.go:93] "State pushed for device plugin" resource="power-dev-plugin/dev" re>
wrapper[7446]: I1219 04:32:20.726284 7446 manager.go:279] "Processed device updates for resource" resourceName="power-dev-p>
wrapper[7446]: I1219 04:32:27.293908 7446 setters.go:333] "Updated capacity for device plugin" plugin="power-dev-plugin/dev>
- To deploy the sample:
kustomize build examples | oc apply -f -
- https://github.com/intel/intel-device-plugins-for-kubernetes/blob/main/pkg/deviceplugin/manager.go#L96
- https://github.com/kairen/simple-device-plugin/tree/master
- https://github.com/kubernetes/kubelet/tree/master/pkg/apis/deviceplugin/v1beta1
- https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#examples
The build includes multiple architectures: linux/amd64
, linux/ppc64le
, linux/s390x
.
The build uses the ubi9/ubi:9.4 image.