github.com/imran-kn/cilium-fork@v1.6.9/Documentation/gettingstarted/cni-chaining-generic-veth.rst (about) 1 .. only:: not (epub or latex or html) 2 3 WARNING: You are looking at unreleased Cilium documentation. 4 Please use the official rendered version released here: 5 http://docs.cilium.io 6 7 ********************* 8 Generic Veth Chaining 9 ********************* 10 11 The generic veth chaining plugin enables CNI chaining on top of any CNI plugin 12 that is using a veth device model. The majority of CNI plugins use such a 13 model. 14 15 Validate that the current CNI plugin is using veth 16 ================================================== 17 18 1. Log into one of the worker nodes using SSH 19 2. Run ``ip -d link`` to list all network devices on the node. You should be 20 able spot network devices representing the pods running on that node. 21 3. A network device might look something like this: 22 23 .. code:: bash 24 25 103: lxcb3901b7f9c02@if102: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 26 link/ether 3a:39:92:17:75:6f brd ff:ff:ff:ff:ff:ff link-netnsid 18 promiscuity 0 27 veth addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 28 4. The ``veth`` keyword on line 3 indicates that the network device type is virtual ethernet. 29 30 If the CNI plugin you are chaining with is currently not using veth then the 31 ``generic-veth`` plugin is not suitable. In that case, a full CNI chaining 32 plugin is required which understands the device model of the underlying plugin. 33 Writing such a plugin is trivial, contact us on :ref:`slack` for more details. 34 35 Create a CNI configuration to define your chaining configuration 36 ================================================================ 37 38 Create a ``chaining.yaml`` file based on the following template to specify the 39 desired CNI chaining configuration: 40 41 42 .. code:: yaml 43 44 apiVersion: v1 45 kind: ConfigMap 46 metadata: 47 name: cni-configuration 48 namespace: kube-system 49 data: 50 cni-config: |- 51 { 52 "name": "generic-veth", 53 "cniVersion": "0.3.1", 54 "plugins": [ 55 { 56 "type": "XXX", 57 [...] 58 }, 59 { 60 "type": "cilium-cni" 61 } 62 ] 63 } 64 65 Deploy the `ConfigMap`: 66 67 .. code:: bash 68 69 kubectl apply -f chaining.yaml 70 71 Deploy Cilium with the portmap plugin enabled 72 ============================================= 73 74 .. include:: k8s-install-download-release.rst 75 76 Generate the required YAML file and deploy it: 77 78 .. code:: bash 79 80 helm template cilium \ 81 --namespace=kube-system \ 82 --set global.cni.chainingMode=generic-veth \ 83 --set global.cni.customConf=true \ 84 --set global.cni.configMap=cni-configuration \ 85 --set global.tunnel=disabled \ 86 --set global.masquerade=false \ 87 > cilium.yaml 88 kubectl create -f cilium.yaml