Skip to content

Virtual Machine Networking

This article will introduce how to configure network information when creating virtual machines.

In virtual machines, network management is a crucial part that allows us to manage and configure network connections for virtual machines in a Kubernetes environment. It can be configured according to different needs and scenarios, achieving a more flexible and diverse network architecture.

  1. Single NIC Scenario: For simple applications that only require basic network connectivity or when there are resource constraints, using a single NIC can save network resources and prevent waste of resources.
  2. Multiple NIC Scenario: When security isolation between different network environments needs to be achieved, multiple NICs can be used to divide different network areas. It also allows for control and management of traffic.

Network Configuration

  1. Network configuration can be combined according to the table information.

    Network Mode CNI Spiderpool Installed NIC Mode Fixed IP Live Migration
    Masquerade (NAT) Calico Single NIC
    Cilium Single NIC
    Flannel Single NIC
    Passt (Direct) macvlan Single NIC
    ipvlan Multiple NIC
    Bridge OVS Multiple NIC

    Network Configuration

  2. Network Mode: There are three modes - Masquerade (NAT), Passt (Direct), and Bridge. The latter two modes require the installation of the spiderpool component to use.

    1. The default selection is Masquerade (NAT) network mode using the eth0 default NIC.

    2. If the cluster has the spiderpool component installed, then Passt (Direct) / Bridge modes can be selected. The Bridge mode supports multiple NICs.

      Network Mode

  3. Adding NICs

    1. Passt (Direct) / Bridge modes support manually adding NICs. Click on Add NIC to configure the NIC IP pool. Choose a Multus CR that matches the network mode, if not available, it needs to be created manually.

    2. If the Use Default IP Pool switch is turned on, it will use the default IP pool in the multus CR configuration. If turned off, manually select the IP pool.

      Add NIC

Comments