@@ -11,21 +11,21 @@ You must install and set up the following FPGA plugin modules for correct operat
11
11
12
12
### Get source code:
13
13
```
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
17
17
```
18
18
19
19
### Build FPGA device plugin:
20
20
```
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
23
23
```
24
24
25
25
### Verify kubelet socket exists in /var/lib/kubelet/device-plugins/ directory:
26
26
```
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
29
29
```
30
30
31
31
### Choose mode for FPGA device plugin
@@ -46,66 +46,66 @@ translated to resources of the same type.
46
46
47
47
1 . Run FPGA device plugin as administrator:
48
48
```
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
55
55
```
56
56
57
57
2 . Check if FPGA device plugin is registered on master:
58
58
```
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
62
62
```
63
63
64
64
#### Run FPGA device plugin in region mode
65
65
66
66
1 . Run FPGA device plugin as administrator:
67
67
```
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
74
74
```
75
75
76
76
2 . Check if FPGA device plugin is registered on master:
77
77
```
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
81
81
```
82
82
83
83
### Deploy FPGA device plugin as DaemonSet
84
84
85
85
1 . To deploy the plugin in a production cluster, create a service account
86
86
for the plugin:
87
87
```
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
92
92
```
93
93
94
94
2 . Create the DaemonSet:
95
95
```
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
98
98
```
99
99
100
100
3. Build an image from sources:
101
101
```
102
- $ make intel-fpga-plugin
102
+ $ make intel-fpga-plugin
103
103
```
104
104
This image launches `fpga_plugin` in `af` mode by default.
105
105
106
106
You can override the mode on a per-node basis using this annotation:
107
107
```
108
- $ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
108
+ $ kubectl annotate node mynode "fpga.intel.com/device-plugin-mode=region"
109
109
```
110
110
To use your own container image, modify the
111
111
`deployments/fpga_plugin/fpga_plugin.yaml` file.
0 commit comments