Configuring Network
By default, the NodePools for the KubeVirt platform generate VMs which are attached to the default pod network. It is possible to attach additional networks to the NodePools VMs as well though.
Attaching Additional Networks to KubeVirt VMs
Attaching additional networks to a KubeVirt NodePool is accomplished through the usage of multus and NetworkAttachmentDefinitions. More information about how to configure NetworkAttachementDefinitions can be found here. Below is an example of adding multiple additional networks to a guest cluster at creation time using the hcp command line tool with the --additional-network argument.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
In this example, the KubeVirt VMs will have interfaces attached to the networks for the NetworkAttachmentDefinitions network1 and network2 which reside in namespace my-namespace.