A brief instruction on howto use Multus on Talos Linux
thick
DaemonSet
with kubectl
.
DaemonSet
and a CRD: NetworkAttachmentDefinition
.
This can be used to specify your network configuration.
DaemonSet
DaemonSet
.
Instead of of mounting the volume called host-run-netns
on /run/netns
it has to be mounted on /var/run/netns
.
Edit the DaemonSet
and change the volume host-run-netns
from /run/netns
to /var/run/netns
.
install-multus-binary
container that can be lead to race problems after a node reboot.
To prevent this issue, it is necessary to patch this container.
Set the following command to the install-multus-binary
container.
NetworkAttachmentDefinition
NetworkAttachmentDefinition
configuration is used to define your bridge where your second pod interface needs to be attached to.
macvlan
is used as a bridge type.
There are 3 types of bridges: bridge
, macvlan
and ipvlan
:
bridge
is a way to connect two Ethernet segments together in a protocol-independent way.
Packets are forwarded based on Ethernet address, rather than IP address (like a router).
Since forwarding is done at Layer 2, all protocols can go transparently through a bridge.
In terms of containers or virtual machines, a bridge can also be used to connect the virtual interfaces of each container/VM to the host network, allowing them to communicate.
macvlan
is a driver that makes it possible to create virtual network interfaces that appear as distinct physical devices each with unique MAC addresses.
The underlying interface can route traffic to each of these virtual interfaces separately, as if they were separate physical devices.
This means that each macvlan interface can have its own IP subnet and routing.
Macvlan interfaces are ideal for situations where containers or virtual machines require the same network access as the host system.
ipvlan
is similar to macvlan
, with the key difference being that ipvlan shares the parent’s MAC address, which requires less configuration from the networking equipment.
This makes deployments simpler in certain situations where MAC address control or limits are in place.
It offers two operational modes: L2 mode (the default) where it behaves similarly to a MACVLAN, and L3 mode for routing based traffic isolation (rather than bridged).
bridge
interface you must also configure a bridge on your Talos nodes.
That can be done by updating Talos Linux machine configuration:
NetworkAttachmentDefinition
to your Pod
or Deployment
NetworkAttachmentDefinition
is configured, you can attach that interface to your your Deployment
or Pod
.
In this example we use a pod:
bridge
instead of macvlan
or ipvlan
, because that doesn’t work, according to the KubeVirt Documentation.
Invalid CNIs for secondary networks The following list of CNIs is known not to work for bridge interfaces - which are most common for secondary interfaces.The reason is similar: the bridge interface type moves the pod interface MAC address to the VM, leaving the pod interface with a different address. The aforementioned CNIs require the pod interface to have the original MAC address.
- macvlan
- ipvlan
cni.exclusive=false
.
For more information, refer to the Cilium documentation.