multus-cni

module
v4.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: Apache-2.0

README

Multus-CNI

multus-cni Logo

BuildTestGo Report CardCoverage Status

Multus CNI enables attaching multiple network interfaces to pods in Kubernetes.

How it works

Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods. Typically, in Kubernetes each pod only has one network interface (apart from a loopback) -- with Multus you can create a multi-homed pod that has multiple interfaces. This is accomplished by Multus acting as a "meta-plugin", a CNI plugin that can call multiple other CNI plugins.

Multus CNI follows the Kubernetes Network Custom Resource Definition De-facto Standard to provide a standardized method by which to specify the configurations for additional network interfaces. This standard is put forward by the Kubernetes Network Plumbing Working Group.

Multus is one of the projects in the Baremetal Container Experience kit

Multi-Homed pod

Here's an illustration of the network interfaces attached to a pod, as provisioned by Multus CNI. The diagram shows the pod with three interfaces: eth0, net0 and net1. eth0 connects kubernetes cluster network to connect with kubernetes server/services (e.g. kubernetes api-server, kubelet and so on). net0 and net1 are additional network attachments and connect to other networks by using other CNI plugins (e.g. vlan/vxlan/ptp).

multus-pod-image

Quickstart Installation Guide

The quickstart installation method for Multus requires that you have first installed a Kubernetes CNI plugin to serve as your pod-to-pod network, which we refer to as your "default network" (a network interface that every pod will be created with). Each network attachment created by Multus will be in addition to this default network interface. For more detail on installing a default network CNI plugin, refer to our quick-start guide.

Clone this GitHub repository, and apply a daemonset which installs Multus using kubectl. From the root directory of the clone, apply the daemonset YAML file:

cat ./deployments/multus-daemonset-thick.yml | kubectl apply -f -

This will configure your systems to be ready to use Multus CNI, but, to get started with adding additional interfaces to your pods, refer to our complete quick-start guide

Thin Plugin v.s Thick Plugin

With the multus 4.0 release, we introduce a new client/server-style plugin deployment. This new deployment is called 'thick plugin', in contrast to deployments in previous versions, which is now called a 'thin plugin'. The new thick plugin consists of two binaries, multus-daemon and multus-shim CNI plugin. The 'multus-daemon' will be deployed to all nodes as a local agent and supports additional features, such as metrics, which were not available with the 'thin plugin' deployment before. Due to these additional features, the 'thick plugin' comes with the trade-off of consuming more resources than the 'thin plugin'.

We recommend using the thick plugin in most environments, but if you wish to run the thin plugin, or are in a resource-constrained environment, you may do so with:

cat ./deployments/multus-daemonset.yml | kubectl apply -f -

Additional Installation Options

In addition to the quick-start guide, you may:

Comprehensive Documentation

Contact Us

For any questions about Multus CNI, open up a GitHub issue or feel free to ask a question in #general in the NPWG Slack.

To be invited, use this slack invite link.

Directories

Path Synopsis
cmd
install_multus
This is a install tool for multus plugins
This is a install tool for multus plugins
multus
This is a "Multi-plugin".The delegate concept referred from CNI project It reads other plugin netconf, and then invoke them, e.g.
This is a "Multi-plugin".The delegate concept referred from CNI project It reads other plugin netconf, and then invoke them, e.g.
multus-daemon
This binary works as a server that receives requests from multus-shim CNI plugin and creates network interface for kubernets pods.
This binary works as a server that receives requests from multus-shim CNI plugin and creates network interface for kubernets pods.
multus-shim
This is a "Multi-plugin".The delegate concept referred from CNI project It reads other plugin netconf, and then invoke them, e.g.
This is a "Multi-plugin".The delegate concept referred from CNI project It reads other plugin netconf, and then invoke them, e.g.
thin_entrypoint
This is a entrypoint for thin (stand-alone) images.
This is a entrypoint for thin (stand-alone) images.
pkg
checkpoint
Package checkpoint is the package that contains the libraries that manipulates kubelet's checkpoint API
Package checkpoint is the package that contains the libraries that manipulates kubelet's checkpoint API
cmdutils
Package cmdutils is the package that contains utilities for multus command
Package cmdutils is the package that contains utilities for multus command
k8sclient
Package k8sclient is the package that contains the Kubernetes client libraries.
Package k8sclient is the package that contains the Kubernetes client libraries.
kubeletclient
Package kubeletclient is the package that contains the kubelet's libraries that controls podresource API in kubelet
Package kubeletclient is the package that contains the kubelet's libraries that controls podresource API in kubelet
logging
Package logging is the package that contains logging library.
Package logging is the package that contains logging library.
multus
Package multus is the package that contains main multus function, which manipulates CNI request for delegate plugins.
Package multus is the package that contains main multus function, which manipulates CNI request for delegate plugins.
netutils
Package netutils is the package that contains network related utilities.
Package netutils is the package that contains network related utilities.
server
Package server is the package that contains thick pluigin's server libraries.
Package server is the package that contains thick pluigin's server libraries.
server/api
Package api is the package that contains thick pluigin's server apis.
Package api is the package that contains thick pluigin's server apis.
server/config
Package config is the package that contains the libraries that operates CNI config files
Package config is the package that contains the libraries that operates CNI config files
testing
Package testing is the package that contains unit-test libraries.
Package testing is the package that contains unit-test libraries.
types
Package types contains common types in the multus.
Package types contains common types in the multus.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL