2 # This yaml file contains necessary configuration to setup
3 # a demo environment for Multus + SR-IOV, the config includes
4 # the following pieces:
6 # 2. Network Plumbing Working Group Spec Version 1 CustomerResourceDefinition
7 # 3. Multus ClusterRole & ClusterRoleBinding
8 # 4. Multus & SR-IOV Device Plugin ServiceAccounts
9 # 5. Multus & SR-IOV Device Plugin & SR-IOV CNI DaemonSets
11 # Note: This yaml file will not create customer SR-IOV CRD
12 # which will be specified in Pod spec annotation. Below is
13 # an example of SR-IOV CRD:
15 # apiVersion: "k8s.cni.cncf.io/v1"
16 # kind: NetworkAttachmentDefinition
20 # k8s.v1.cni.cncf.io/resourceName: intel.com/sriov
24 # "name": "sriov-network",
26 # "type": "host-local",
27 # "subnet": "10.56.217.0/24",
31 # "gateway": "10.56.217.1"
35 # An example of Pod spec using above SR-IOV CRD:
44 # k8s.v1.cni.cncf.io/networks: sriov-net1
49 # imagePullPolicy: IfNotPresent
50 # command: [ "/bin/bash", "-c", "--" ]
51 # args: [ "while true; do sleep 300000; done;" ]
54 # intel.com/sriov: '1'
56 # intel.com/sriov: '1'
59 # --------------------------------------------------------------------
63 # This configMap assumes that:
64 # - Kubeconfig file is located at "/etc/kubernetes/admin.conf" on host
65 # - Default master plugin for Multus is set to flannel
67 # Note: If either of above is not True in your environment
68 # make sure they are properly set to the corrent values.
73 name: multus-cni-config
74 namespace: kube-system
81 "name": "multus-cni-network",
88 "cniVersion": "0.3.1",
89 "name": "default-cni-network",
95 "isDefaultGateway": true,
108 "kubeconfig": "/etc/kubernetes/admin.conf"
112 # 2. NPWG spec v1 Network Attachment Definition
114 apiVersion: apiextensions.k8s.io/v1beta1
115 kind: CustomResourceDefinition
117 name: network-attachment-definitions.k8s.cni.cncf.io
119 group: k8s.cni.cncf.io
123 plural: network-attachment-definitions
124 singular: network-attachment-definition
125 kind: NetworkAttachmentDefinition
137 # 3.1 Multus Cluster Role
140 apiVersion: rbac.authorization.k8s.io/v1beta1
144 - apiGroups: ["k8s.cni.cncf.io"]
158 # 3.2 Multus Cluster Role Binding
160 kind: ClusterRoleBinding
161 apiVersion: rbac.authorization.k8s.io/v1beta1
165 apiGroup: rbac.authorization.k8s.io
169 - kind: ServiceAccount
171 namespace: kube-system
173 # 4.1 SR-IOV Device Plugin ServiceAccount
178 name: sriov-device-plugin
179 namespace: kube-system
181 # 4.2 Multus ServiceAccount
187 namespace: kube-system
189 # 5.1 SR-IOV Device Plugin DaemonSet
191 apiVersion: extensions/v1beta1
194 name: kube-sriov-device-plugin-amd64
195 namespace: kube-system
209 beta.kubernetes.io/arch: amd64
211 #- key: node-role.kubernetes.io/master
216 serviceAccountName: sriov-device-plugin
219 image: nfvpe/sriov-device-plugin
220 imagePullPolicy: IfNotPresent
224 - --resource-prefix=arm.com
229 mountPath: /var/lib/kubelet/
233 - name: config-volume
234 mountPath: /etc/pcidp
238 path: /var/lib/kubelet/
242 - name: config-volume
249 apiVersion: extensions/v1beta1
252 name: kube-sriov-device-plugin-arm64
253 namespace: kube-system
267 beta.kubernetes.io/arch: arm64
269 #- key: node-role.kubernetes.io/master
274 serviceAccountName: sriov-device-plugin
277 #image: nfvpe/sriov-device-plugin
278 image: iecedge/sriov-device-plugin-arm64
279 imagePullPolicy: IfNotPresent
280 #imagePullPolicy: Never
284 - --resource-prefix=arm.com
289 mountPath: /var/lib/kubelet/
293 - name: config-volume
294 mountPath: /etc/pcidp
298 path: /var/lib/kubelet/
302 - name: config-volume
309 # 5.2 SR-IOV CNI DaemonSet
311 apiVersion: extensions/v1beta1
314 name: kube-sriov-cni-ds-amd64
315 namespace: kube-system
328 beta.kubernetes.io/arch: amd64
330 - key: node-role.kubernetes.io/master
334 - name: kube-sriov-cni
335 image: nfvpe/sriov-cni:latest
336 imagePullPolicy: IfNotPresent
348 mountPath: /host/opt/cni/bin
354 apiVersion: extensions/v1beta1
357 name: kube-sriov-cni-ds-arm64
358 namespace: kube-system
371 beta.kubernetes.io/arch: arm64
373 #- key: node-role.kubernetes.io/master
379 - name: kube-sriov-cni
380 #image: nfvpe/sriov-cni-arm64:latest
381 image: iecedge/sriov-cni-arm64:latest
382 imagePullPolicy: IfNotPresent
394 mountPath: /host/opt/cni/bin
400 # 5.3 Multus DaemonSet
405 name: kube-multus-ds-amd64
406 namespace: kube-system
426 beta.kubernetes.io/arch: amd64
430 serviceAccountName: multus
433 #image: nfvpe/multus:v3.3
434 #- "--multus-conf-file=auto"
435 #- "--cni-version=0.3.1"
436 #image: nfvpe/multus:v3.4
437 image: iecedge/multus-amd64:v3.4
438 imagePullPolicy: IfNotPresent
439 command: ["/entrypoint.sh"]
441 - "--multus-conf-file=/tmp/multus-conf/70-multus.conf"
453 mountPath: /host/etc/cni/net.d
455 mountPath: /host/opt/cni/bin
457 mountPath: /tmp/multus-conf
458 - name: kubernetes-cfg-dir
459 mountPath: /etc/kubernetes
469 name: multus-cni-config
473 - name: kubernetes-cfg-dir
475 path: /etc/kubernetes
480 name: kube-multus-ds-arm64
481 namespace: kube-system
501 beta.kubernetes.io/arch: arm64
505 serviceAccountName: multus
508 #image: nfvpe/multus:v3.3
509 #image: iecedge/multus-arm64:latest
510 #- "--multus-conf-file=auto"
511 #- "--cni-version=0.3.1"
512 image: iecedge/multus-arm64:v3.4
513 imagePullPolicy: IfNotPresent
514 command: ["/entrypoint.sh"]
516 - "--multus-conf-file=/tmp/multus-conf/70-multus.conf"
528 mountPath: /host/etc/cni/net.d
530 mountPath: /host/opt/cni/bin
532 mountPath: /tmp/multus-conf
533 - name: kubernetes-cfg-dir
534 mountPath: /etc/kubernetes
544 name: multus-cni-config
548 - name: kubernetes-cfg-dir
550 path: /etc/kubernetes