@@ -11,21 +11,21 @@ You must install and set up the following FPGA plugin modules for correct operat
1111
1212### Get source code:
1313```
14- $ mkdir -p $GOPATH/src/github.com/intel/
15- $ cd $GOPATH/src/github.com/intel/
16- $ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
14+ $ mkdir -p $GOPATH/src/github.com/intel/
15+ $ cd $GOPATH/src/github.com/intel/
16+ $ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
1717```
1818
1919### Build FPGA device plugin:
2020```
21- $ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
22- $ make fpga_plugin
21+ $ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
22+ $ make fpga_plugin
2323```
2424
2525### Verify kubelet socket exists in /var/lib/kubelet/device-plugins/ directory:
2626```
27- $ ls /var/lib/kubelet/device-plugins/kubelet.sock
28- /var/lib/kubelet/device-plugins/kubelet.sock
27+ $ ls /var/lib/kubelet/device-plugins/kubelet.sock
28+ /var/lib/kubelet/device-plugins/kubelet.sock
2929```
3030
3131### Choose mode for FPGA device plugin
@@ -46,66 +46,66 @@ translated to resources of the same type.
4646
47471 . Run FPGA device plugin as administrator:
4848```
49- $ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
50- $ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
51- $ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode af -kubeconfig $KUBE_CONF
52- FPGA device plugin started in af mode
53- device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-af-f7df405cbd7acf7222f144b0b93acd18.sock
54- device-plugin registered
49+ $ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
50+ $ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
51+ $ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode af -kubeconfig $KUBE_CONF
52+ FPGA device plugin started in af mode
53+ device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-af-f7df405cbd7acf7222f144b0b93acd18.sock
54+ device-plugin registered
5555```
5656
57572 . Check if FPGA device plugin is registered on master:
5858```
59- $ kubectl describe node <node name> | grep fpga.intel.com
60- fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
61- fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
59+ $ kubectl describe node <node name> | grep fpga.intel.com
60+ fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
61+ fpga.intel.com/af-f7df405cbd7acf7222f144b0b93acd18: 1
6262```
6363
6464#### Run FPGA device plugin in region mode
6565
66661 . Run FPGA device plugin as administrator:
6767```
68- $ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
69- $ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
70- $ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode region -kubeconfig $KUBE_CONF
71- FPGA device plugin started in region mode
72- device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-region-ce48969398f05f33946d560708be108a.sock
73- device-plugin registered
68+ $ export KUBE_CONF=/var/run/kubernetes/admin.kubeconfig # path to kubeconfig with admin's credentials
69+ $ export NODE_NAME="<node name>" # if the node's name was overridden and differs from hostname
70+ $ sudo -E $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/fpga_plugin/fpga_plugin -mode region -kubeconfig $KUBE_CONF
71+ FPGA device plugin started in region mode
72+ device-plugin start server at: /var/lib/kubelet/device-plugins/fpga.intel.com-region-ce48969398f05f33946d560708be108a.sock
73+ device-plugin registered
7474```
7575
76762 . Check if FPGA device plugin is registered on master:
7777```
78- $ kubectl describe node <node name> | grep fpga.intel.com
79- fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
80- fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
78+ $ kubectl describe node <node name> | grep fpga.intel.com
79+ fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
80+ fpga.intel.com/region-ce48969398f05f33946d560708be108a: 1
8181```
8282
8383### Deploy FPGA device plugin as DaemonSet
8484
85851 . To deploy the plugin in a production cluster, create a service account
8686for the plugin:
8787 ```
88- $ kubectl create -f deployments/fpga_plugin/fpga_plugin_service_account.yaml
89- serviceaccount/intel-fpga-plugin-controller created
90- clusterrole.rbac.authorization.k8s.io/node-getter created
91- clusterrolebinding.rbac.authorization.k8s.io/get-nodes created
88+ $ kubectl create -f deployments/fpga_plugin/fpga_plugin_service_account.yaml
89+ serviceaccount/intel-fpga-plugin-controller created
90+ clusterrole.rbac.authorization.k8s.io/node-getter created
91+ clusterrolebinding.rbac.authorization.k8s.io/get-nodes created
9292 ```
9393
94942 . Create the DaemonSet:
9595 ```
96- $ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
97- daemonset.apps/intel-fpga-plugin created
96+ $ kubectl create -f deployments/fpga_plugin/fpga_plugin.yaml
97+ daemonset.apps/intel-fpga-plugin created
9898 ```
9999
1001003. Build an image from sources:
101101 ```
102- $ make intel-fpga-plugin
102+ $ make intel-fpga-plugin
103103 ```
104104 This image launches `fpga_plugin` in `af` mode by default.
105105
106106 You can override the mode on a per-node basis using this annotation:
107107 ```
108- $ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
108+ $ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
109109 ```
110110 To use your own container image, modify the
111111 `deployments/fpga_plugin/fpga_plugin.yaml` file.
0 commit comments