Online / 5 & 6 February 2022


Network interface hotplug for Kubernetes

Design and implementation of dynamic network attachment for Kubernetes pods and KubeVirt VMs.

Immutable infrastructure is the law of the land in the cloud native landscape, promising benefits to software architectures run in Kubernetes. … except sometimes the rules must be broken to achieve certain use cases; take for instance the dynamic attachment of L2 networks to a running VM: to hotplug an interface into the VM running in a pod, you first need to hotplug that interface into the pod.

This feature is particularly of interest (required, actually) to enable scenarios where the workload (VM) cannot tolerate a restart, or when the workload is created prior to the network.

When thinking about strategies for tackling this problem, we faced a recurring question when trying to come up with a modular design to provide this functionality: "should the changes be located in KubeVirt, and thus solve this issue for Virtual Machines, or should we take the longer path and address this issue also for pods ?" We chose the latter, which unlocks dynamic network attachment for pods, thus also benefiting the Kubernetes community.

This talk will provide the audience with a basic understanding of KubeVirt, CNI, and Multus, and then propose a design to add (or remove) network interfaces from running pods (and virtual machines), along with the changes required in Multus and KubeVirt to make it happen.

It will also factor in a community perspective, explaining how we pitched and got both the Multus and KubeVirt communities involved in a working arrangement to deliver this functionality.


Photo of Miguel Barroso Miguel Barroso