-
Notifications
You must be signed in to change notification settings - Fork 589
README_draft_1811
- Multus is a latin word for "Multi"
- As the name suggests, it acts as a Multi plugin in Kubernetes and provides the multiple network interface support in a pod
- This project is a reference implementation for Kubernetes Network Custom Resource Definition De-facto Standard. For more information refer Network Plumbing Working Group Agenda
- Reference implementation support following modes as "section 3.2 Network Object Definition" in the spec
- CNI config JSON in network object
- Not using CNI config (“thick” plugin usecase)
- CNI configuration stored in on-disk file
refer the section 3.2 Network Object Definition for more details in Kubernetes Network Custom Resource Definition De-facto Standard
- Multus supports all reference plugins (eg. Flannel, DHCP, Macvlan) that implement the CNI specification and all 3rd party plugins (eg. Calico, Weave, Cilium, Contiv). In addition to it, Multus supports SRIOV, SRIOV-DPDK, OVS-DPDK & VPP workloads in Kubernetes with both cloud native and NFV based applications in Kubernetes
- The default network gets "eth0" and additional network Pod interface name as “net0”, “net1”,… “netX and so on. Multus also support interface names from the user.
- Multus is one of the projects in the Baremetal Container Experience kit.
This is the example pod with multus. The pod has three interface: eth0, net0 and net1. eth0 connects kubernetes cluster network to connect with kubernetes server/services (e.g. kubernetes api-server, kubelets and so on). net0 and net1 are network attachment and connect to other networks with other CNI networks (e.g. vlan/vxlan/ptp).
Current version of multus-cni is '3.1'. v3.0 and above are not compatible with v1.0 and v2.0 version Network Object CRD.
See QUICKSTART.md <-TBD
- Get binaries from release page
- Get docker image from Docker Hub
- Build from source
This plugin requires Go 1.8 (or later) to build.
##./build
-
(Prerequisite)
-
(Install multus)
- copy multus binary
- use daemonset
-
add/modify conf file in /etc/cni/net.d/ (XXX: need to add about delegate/defaultnet/clusternet)
-
Setup CRDs (daemonset automatically does
- NetworkAttachmentDefinition
- ClusterRole
- ClusterRoleBinding
-
Create network attachment definition
- net-attach-def with config
- net-attach-def with config file name in /etc/cni/multus.d
- thick plugin case (need to write now?)
-
Run pod with network annotation
- text annotation
- text annotation with additional info (ifname)
- json annotation
- json annotation with additional info (ifname)
-
Verifying pod network
-
Run
ifconfig
command in Pod:
# kubectl exec -it multus-multi-net-poc -- ifconfig
eth0 Link encap:Ethernet HWaddr C6:43:7C:09:B4:9C
inet addr:10.128.0.4 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:648 (648.0 B) TX bytes:42 (42.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
net0 Link encap:Ethernet HWaddr 06:21:91:2D:74:B9
inet addr:192.168.42.3 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::421:91ff:fe2d:74b9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
net1 Link encap:Ethernet HWaddr D2:94:98:82:00:00
inet addr:10.56.217.171 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::d094:98ff:fe82:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120 (120.0 B) TX bytes:648 (648.0 B)
north Link encap:Ethernet HWaddr BE:F2:48:42:83:12
inet6 addr: fe80::bcf2:48ff:fe42:8312/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1420 errors:0 dropped:0 overruns:0 frame:0
TX packets:1276 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95956 (93.7 KiB) TX bytes:82200 (80.2 KiB)
Interface name | Description |
---|---|
lo | loopback |
eth0 | weave network interface |
net0 | Flannel network tap interface |
net1 | VF0 of NIC 1 assigned to the container by Intel - SR-IOV CNI plugin |
north | VF0 of NIC 2 assigned with VLAN ID 210 to the container by SR-IOV CNI plugin |
You may wish to enable some enhanced logging for Multus, especially during the process where you're configuring Multus and need to understand what is or isn't working with your particular configuration.
Multus will always log via STDERR
, which is the standard method by which CNI plugins communicate errors, and these errors are logged by the Kubelet. This method is always enabled.
Optionally, you may have Multus log to a file on the filesystem. This file will be written locally on each node where Multus is executed. You may configure this via the LogFile
option in the CNI configuration. By default this additional logging to a flat file is disabled.
For example in your CNI configuration, you may set:
"LogFile": "/var/log/multus.log",
The default logging level is set as panic
-- this will log only the most critical errors, and is the least verbose logging level.
The available logging level values, in decreasing order of verbosity are:
debug
error
panic
You may configure the logging level by using the LogLevel
option in your CNI configuration. For example:
"LogLevel": "debug",
See 'doc/development_info.md' for the development information <-
- Read Containers Experience Kits
- Try our container exp kit demo - KubeCon workshop on Enabling NFV Features in Kubernetes
- Join us on #intel-sddsg-slack slack channel and ask question in #general-discussion
- You can also email us
- Feel free to submit an issue
Please fill in the Questions/feedback - google-form!
For any questions about Multus CNI, please reach out on github issue or feel free to contact the developer @kural in our Intel-Corp Slack