Learning how to implement the Kubernetes device plugins. This device plugin will automatically maps the SATA device according to your container SATA requirement.
The list of prerequisites for running the SATA device plugin is described below:
DevicePlugins feature gate enabledTo build image:
$ make build_image
To install the SATA device plugins:
$ kubectl create -f https://raw.githubusercontent.com/kairen/simple-device-plugin/master/artifacts/simple-device-plugin.yml
$ kubectl -n kube-system get po -l name=device-plugin
NAME READY STATUS RESTARTS AGE
simple-device-plugin-ds-jlj8k 1/1 Running 0 38s
simple-device-plugin-ds-sn2ff 1/1 Running 0 38s
To run the SATA pod:
$ kubectl create -f https://raw.githubusercontent.com/kairen/simple-device-plugin/master/artifacts/test-device-pod.yml
$ kubectl get po
NAME READY STATUS RESTARTS AGE
test-device-pod 1/1 Running 0 30s
$ kubectl exec -ti test-device-pod sh
/ # ls /dev/ | grep "sd[a-z]"
sdb
/ # mkfs.vfat /dev/sdb
/ # od -vAn -N4 -tu4 < /dev/sdb
1838176491
Content type
Image
Digest
Size
8.7 MB
Last updated
over 8 years ago
docker pull kairen/simple-device-plugin