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.

Prerequisites

  1. When selecting the Bridge network mode, some information needs to be configured in advance:

    Network Configuration

  2. 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
    Bridge OVS Multiple NIC

    Network Config

  3. Network Mode: There are two modes - Masquerade (NAT) and Bridge. Bridge mode requires the installation of the spiderpool component.

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

    2. If the cluster has the spiderpool component installed, then Bridge mode can be selected. The Bridge mode supports multiple NICs.

      Network Mode

      • Ensure all prerequisites are met before selecting the Bridge mode.
  4. Adding NICs

    1. Bridge modes support manually adding NICs. Click 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