Flat network construction method and device, electronic equipment and storage medium
By adding the storage address of the virtual network interface component to the configuration file of the container group, a flat network is built, which solves the problem of direct communication between container clouds, realizes direct communication and network management between the container group and the outside world, and improves network performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA LIFE INSURANCE CO LTD
- Filing Date
- 2022-03-31
- Publication Date
- 2026-06-23
Smart Images

Figure CN114942822B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network configuration technology, and in particular to a method, apparatus, electronic device and storage medium for constructing a flat network. Background Technology
[0002] Traditional application deployment methods are achieved through scripts, plugins, or virtual machines. With the continuous development of cloud technology, existing application deployment methods can be achieved by deploying container clouds. Each container cloud is isolated from each other, each container cloud has its own file system, processes in container clouds do not affect each other, and computing resources can be distinguished.
[0003] Typically, container clouds only support communication through the existing virtualization network of the scheduling framework. That is, through the existing Internet Protocol addresses of the container cloud, communication can only occur within the same host. When an external request from the host communicates with the container cloud, the external request can only be forwarded through the physical network card of the host where the container cloud is located, and cannot communicate directly with the container cloud. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a flat network construction method, apparatus, electronic device and storage medium to solve or partially solve the above-mentioned technical problems.
[0005] To achieve the above objectives, the first aspect of this application provides a method for constructing a flat network, the method being applied in a container management system, the container management system comprising: a container control module and a container construction module;
[0006] The method includes:
[0007] The virtual network interface card component is obtained through the container control module;
[0008] The container control module is used to confirm the storage address of the virtual network interface component;
[0009] Container groups are constructed using the container building module, and the network interface of the flat network corresponding to the container group is confirmed.
[0010] The container building module uses the network interface to add the storage address to the configuration file of the container group, thus completing the construction of the flat network.
[0011] A second aspect of this application proposes a flat network construction apparatus, comprising:
[0012] The acquisition module is configured to acquire the virtual network interface card component through the container control module;
[0013] The confirmation module is configured to use the container control module to confirm the storage address of the virtual network interface component;
[0014] The build module is configured to build a container group through the container build module and identify the network interface of the flat network corresponding to the container group;
[0015] The module is configured to use the container building module to add the storage address to the configuration file of the container group through the network interface, thereby completing the construction of the flat network.
[0016] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0017] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the first aspect.
[0018] As can be seen from the above, the flat network construction method, apparatus, electronic device and storage medium provided in this application complete the construction of a flat network for a container group without deleting the original network card of the container group by adding the storage address corresponding to the virtual network card component in the configuration file of the container group. This enables the container group to achieve direct interconnection of the network in the scheduling framework through the network interface of the flat network. Moreover, the flat network constructed through the network interface of the container group facilitates the management of the container group network and improves the performance of the container group network. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the flat network construction method according to an embodiment of this application;
[0021] Figure 2 This is a step-by-step diagram of step 104;
[0022] Figure 3 This is a step-by-step diagram of step 1043;
[0023] Figure 4 This is a schematic diagram of the structure of the flat network construction device according to an embodiment of this application;
[0024] Figure 5This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0026] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] As described in the background section, in a private cloud scheduling environment, Kubernetes (an open-source container scheduling framework) container cloud only supports the original virtualization network. This means that Pods (container groups) within a Kubernetes container cloud are not in a directly connectable, flat network space. If Pod1 and Pod2 are on the same host, Pod1 can reach Pod2 directly via Pod2's IP address. However, if Pod1 and Pod2 are not on the same host, Pod1 cannot reach Pod2 directly via Pod2's IP address. Furthermore, when a Pod is migrated to another node, its IP address will change. Flat network technology is typically used to provide additional high-performance network capabilities for Pods in the cluster, enabling direct communication between Pods.
[0028] MACVLAN (an open-source network virtualization solution) is one of the network virtualization solutions provided by the Linux (an open-source operating system) kernel; more accurately, it's a network interface card (NIC) virtualization solution. It allows multiple physical NIC addresses to be configured for a single physical NIC, essentially making the physical NIC perform multiple functions in a single virtual environment, while requiring the physical NIC to be in promiscuous mode. An IP address can be assigned to each physical NIC address, changing the communication method from connecting a single physical NIC to a switch to connecting through multiple virtual NICs.
[0029] macvlan doesn't create a network; it merely virtualizes the network interface card (NIC) and shares the external network connected to the physical NIC. Its effect is the same as bridged mode. The purpose of network virtualization in multi-tenant scenarios is to create a separate virtual network for each tenant on top of a unified lower-level network, thereby achieving isolation.
[0030] Macvlan can achieve traffic isolation through different sub-interfaces. Macvlan determines which virtual network interface (NIC) a packet should be handed over to based on the destination physical NIC address of the received packet. The virtual NIC then hands the packet over to the upper-layer protocol stack for processing.
[0031] Flat networking is implemented based on Kubernetes multi-network services, providing Pods in the cluster with a solution to utilize additional high-performance networking capabilities. When flat networking is enabled, Kubernetes' network management functions are not affected. It also allows user business traffic to communicate within isolated macvlan networks and provides features such as subnet isolation, static IP addresses, and physical network interface card (NIC) address resource management.
[0032] Embodiments of this application provide a method for constructing a flat network, which can be executed on a container management system consisting of a container control module and a container construction module. Specifically, the container control module obtains the configuration information of the flat network, and the container construction module adds this configuration information to the configuration file of the container group during the construction of the container group, thereby completing the network configuration process in the container group.
[0033] like Figure 1 As shown, the method in this embodiment includes:
[0034] Step 101: Obtain the virtual network interface card component through the container control module.
[0035] In this step, the container control module refers to the module that manages the network resources of the container group. In this embodiment, the preferred container control module can be the network controller in Kubernetes. The virtual network interface card (NIC) component refers to the network virtualization scheme. In this embodiment, the preferred virtual NIC component can be macvlan in the Linux operating system. In this way, the virtual NIC component can provide an information carrier for the subsequent configuration of the flat network.
[0036] Step 102: Use the container control module to confirm the storage address of the virtual network interface card component.
[0037] In this step, the storage address refers to the calling address of the virtual network interface component within the scheduling framework. In this embodiment, the preferred storage address can be a file path in IncoCloud, a self-developed container cloud platform. For example, the storage address could be ` / var / lib / clcos etcd management-state multus-flannel-macvlan.yaml`. This storage address can then provide the virtual network interface configuration file for the subsequent container building module to construct the container group.
[0038] Step 103: Build a container group using the container building module and confirm the network interface of the flat network corresponding to the container group.
[0039] In this step, the container building module refers to the module in the container management platform that deploys container groups and edits container group configuration files. Deploying container groups may include creating containerized services and creating namespaces, while editing container group configuration files may include editing container group network configurations and editing container group security verification configurations. In this embodiment, the preferred container building module may be multus-cni (open source multi-network model service).
[0040] For example, a namespace and its corresponding workload can be built using Inke Cloud. The container group is the smallest unit of the namespace. The network interface card 1 of the container group is configured by calling flannel-cni (Inke Cloud's built-in network configuration interface) through multus-cni. The network interface corresponding to the flat network of the container group is confirmed by calling the virtual network interface through multus-cni, and the network interface card 2 of the container group is configured based on the virtual network interface card. Here, network interface card 1 is the network interface card in the container group that communicates with the outside world through the host's physical network interface card, and network interface card 2 is the network interface card in the container group that communicates directly with the outside world through the virtual network interface card.
[0041] In this embodiment, the preferred container group can be a Pod in a container management system based on the Kubernetes software framework. Container groups can be used to manage containers, and each container group can contain one or more closely related containers, and each container group can have a different independent Internet Protocol address.
[0042] The network interface refers to the interface selected by the container building module within the container group for inheriting the flat network. In this embodiment, the preferred network interface can be specified via `multus-cni` calling `flannel-cni`. For example, calling `flannel-cni` selects the network interface as `eth0`.
[0043] This provides an interface foundation for subsequent container building modules to complete the construction of a flat network for the container group without deleting the original network interface card of the container group.
[0044] Step 104: Using the container building module, add the storage address to the configuration file of the container group through the network interface to complete the construction of the flat network.
[0045] In this step, the configuration file refers to the storage method of the container group after the container building module has built the container group. In this embodiment, the preferred configuration file can be a container group configuration file presented in YAML (YAML General Data Serialization) language.
[0046] The container group building module adds the storage address of the virtual network interface component to the container group's configuration file. In this way, the container group built by the container group building module can call the virtual network interface component through the storage address in the configuration file, thereby adding a virtual network interface generated by the virtual network interface component to the container group, completing the construction of a flat network. This enables the container group to communicate directly with external requests through the virtual network interface, which realizes direct interconnection of the network in the scheduling framework. Moreover, building a flat network through the container group's network interface facilitates the management of the container group network and improves the performance of the container group network.
[0047] The above approach, by adding the storage address corresponding to the virtual network interface component to the container group's configuration file, completes the construction of a flat network for the container group without deleting the original network interface of the container group. This enables the container group to achieve direct interconnection of networks in the scheduling framework through the network interface of the flat network. Furthermore, building a flat network through the network interface of the container group facilitates the management of the container group network and improves the performance of the container group network.
[0048] In some embodiments, prior to step 104, the method further includes:
[0049] The container building module is controlled to obtain the configuration information of the flat network;
[0050] The configuration information is added to the virtual network interface component via the container building module.
[0051] In the above scheme, configuration information refers to the parameter information for communication between the container group and the external network. In this preferred embodiment, the configuration information can be obtained through the virtual network interface in the container building module. For example, the configuration information of the flat network can be obtained by calling the virtual network interface via multus-cni.
[0052] The above approach adds the configuration information of the flat network to the virtual network interface component, providing flat network information for subsequent construction of the flat network through the configuration file in the container group.
[0053] In some embodiments, the storage address corresponds one-to-one with the virtual network interface card component.
[0054] In the above scheme, after obtaining the virtual network interface card (NIC) component, the storage address is used as the sole method for constructing a flat network using the virtual NIC component. For example, the storage address / var / lib / clcos etcd management-statemultus-flannel-macvlan.yaml can correspond to one virtual NIC component.
[0055] The above approach provides a calling method for the subsequent container building module to complete the construction of the container group's flat network without deleting the original network interface card of the container group.
[0056] In some embodiments, such as Figure 2 As shown, step 104 specifically includes:
[0057] Step 1041: The container building module determines the virtual network interface component corresponding to the storage address based on the storage address.
[0058] Step 1042: The container building module obtains the configuration information from the virtual network interface component corresponding to the storage address, which provides a communication interface between the container group and the external network.
[0059] Step 1043: Use the container building module to add the configuration information to the configuration file of the container group through the network interface.
[0060] In the above scheme, multus-cni calls flannel-cni to determine the virtual network interface card (NIC) component corresponding to the storage address, and obtains the configuration information of the flat network from the NIC component. The preferred method for obtaining the flat network configuration information in this embodiment is CRD (Custom Resource Definition). For example, the flat network configuration can be declared using a CRD as follows: apiVersion:macvlan.cluster.cattle.io / v1; kind:MacvlanSubnet; metadata:master:eth0 mode:bridge; spec; Start:172.16.0.20; End:172.16.255.254; Gateway:172.16.0.1; Subnet:172.16.0.0 / 16; NodeSelector; Host:network1; status; state:Valid.
[0061] Through the above scheme, the container group built by the container group building module can call the virtual network interface component through the storage address in the configuration file, which provides a calling basis for adding virtual network interfaces generated by the virtual network interface component to the container group in the future.
[0062] In some embodiments, such as Figure 3 As shown, step 1043 specifically includes:
[0063] Step 10431: Use the container building module to build the network configuration file corresponding to the configuration information.
[0064] Step 10432: Add the network configuration file to the configuration file of the container group through the network interface.
[0065] In the above scheme, a network configuration file for a flat network is constructed using the virtual network interface card (NIC) in the container component module. This NIC is then added to the container group's configuration file via `multus-cni` invoking `flannel-cni`. Based on the container group's configuration file, NICs for communication with the external network are generated within the container group. For example, by using `multus-cni` to call the virtual NIC interface and adding the flat network configuration file to the container group's configuration file, NICs 1 and 2 with different NIC interfaces are generated within the container group. NIC 1 has an eth0 interface and communicates with the outside world via the host's physical NIC. NIC 2 has an eth1 interface and communicates directly with the outside world via a virtual NIC.
[0066] Through the above scheme, the container group building module completes the construction of a flat network by adding the pre-built network configuration file to the container group's configuration file. This enables the container group to communicate directly with external requests through virtual network cards, thus realizing direct network interconnection in the scheduling framework. Moreover, building a flat network through the container group's network interface facilitates the management of the container group network and improves the performance of the container group network.
[0067] In some embodiments, the network profile includes at least one of the following: a flat network enable identifier, a flat network Internet Protocol address, and a flat network physical address.
[0068] In the above scheme, the flat network enable identifier refers to the on / off identifier of the flat network in the Daoke Cloud visualization window. The flat network Internet Protocol address refers to the Internet Protocol address used by the flat network to communicate with external systems. The flat network Internet Protocol address also refers to the physical address of the network interface card (NIC) used by the flat network to communicate with external systems. In this embodiment, the preferred flat network enable identifier can be a variable in k8s.v1.cni.cncf.io / networks, and the mapping relationship between the variable and the Daoke Cloud visualization window completes the process of transmitting flat network enable information. In this embodiment, the preferred flat network Internet Protocol address and physical address can be automatically assigned.
[0069] The above solution provides parameters for virtual network interface cards (NICs) to facilitate communication between container groups and external networks, enabling flat networks to complete communication with the outside world based on these virtual NIC parameters.
[0070] In some embodiments, the configuration information includes at least one of the following: flat network name, flat network mode, and flat network gateway information.
[0071] In the above scheme, the configuration information of the flat network can be obtained through the Daoke Cloud visualization window.
[0072] The above scheme provides parameters for flat network communication between container groups and external networks, enabling container groups to achieve direct interconnection of networks in the scheduling framework through flat network. Moreover, building a flat network through the network interface of container groups facilitates the management of container group networks and improves the performance of container group networks.
[0073] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.
[0074] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0075] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a flat network construction apparatus.
[0076] refer to Figure 4 The flat network construction apparatus includes:
[0077] The acquisition module 201 is configured to acquire the virtual network interface card component through the container control module;
[0078] The confirmation module 202 is configured to use the container control module to confirm the storage address of the virtual network interface component;
[0079] Build module 203 is configured to build a container group through the container build module and identify the network interface of the flat network corresponding to the container group;
[0080] Add module 204 is configured to use the container building module to add the storage address to the configuration file of the container group through the network interface, thereby completing the construction of the flat network.
[0081] In some embodiments, between the building module 203 and the adding module 204, the apparatus further includes:
[0082] The configuration acquisition module is configured to control the container building module to acquire the configuration information of the flat network;
[0083] The configuration addition module is configured to add the configuration information to the virtual network interface component through the container building module.
[0084] In some embodiments, the storage address in the confirmation module 202 corresponds one-to-one with the virtual network card component.
[0085] In some embodiments, the adding module 204 is specifically configured as follows:
[0086] The determining unit is configured to determine, through the container building module, the virtual network interface component corresponding to the storage address based on the storage address;
[0087] The information acquisition unit is configured to use the container building module to acquire the configuration information that provides a communication interface between the container group and the host network from the virtual network interface component corresponding to the storage address;
[0088] The information adding unit is configured to use the container building module to add the configuration information to the configuration file of the container group through the network interface.
[0089] In some embodiments, the information adding unit is specifically configured as follows:
[0090] The network configuration file corresponding to the configuration information is constructed using the container building module.
[0091] The network configuration file is added to the configuration file of the container group via the network interface.
[0092] In some embodiments, the network configuration file in the information adding unit includes at least one of the following: flat network enable identifier, flat network Internet Protocol address, and flat network physical address.
[0093] In some embodiments, the configuration information in the configuration acquisition module includes at least one of the following: flat network name, flat network mode, and flat network gateway information.
[0094] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.
[0095] The apparatus described above is used to implement the corresponding flat network construction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0096] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the flat network configuration method described in any of the above embodiments.
[0097] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0098] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0099] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0100] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0101] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0102] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0103] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0104] The electronic devices described above are used to implement the corresponding flat network configuration methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0105] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the flat network configuration method as described in any of the above embodiments.
[0106] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0107] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the flat network configuration as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0108] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0109] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0110] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0111] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
Claims
1. A method for constructing a flat network, characterized in that, The method is applied in a container management system, which includes a container control module and a container building module. The method includes: The virtual network interface card (NIC) component is obtained through the container control module; the virtual NIC component refers to a network virtualization scheme. The container control module is used to confirm the storage address of the virtual network interface card (NIC) component; the storage address refers to the calling address of the virtual NIC component in the scheduling framework; the storage address corresponds one-to-one with the virtual NIC component. Container groups are constructed using the container building module, and the network interface of the flat network corresponding to the container group is confirmed. The container building module adds the storage address to the configuration file of the container group through the network interface to complete the construction of the flat network; wherein, the container group completes the construction of the container group flat network without deleting the original network interface card of the container group.
2. The method according to claim 1, characterized in that, Before adding the storage address to the configuration file of the container group via the network interface using the container building module, the following steps are also included: The container building module is controlled to obtain the configuration information of the flat network; The configuration information is added to the virtual network interface component via the container building module.
3. The method according to claim 2, characterized in that, The step of adding the storage address to the configuration file of the container group via the network interface using the container building module includes: The container construction module determines the virtual network interface component corresponding to the storage address based on the storage address. The container building module uses the configuration information to provide a communication interface between the container group and the external network from the virtual network interface component corresponding to the storage address. The configuration information is added to the configuration file of the container group via the network interface using the container building module.
4. The method according to claim 3, characterized in that, The step of adding the configuration information to the configuration file of the container group via the network interface using the container building module includes: The network configuration file corresponding to the configuration information is constructed using the container building module. The network configuration file is added to the configuration file of the container group via the network interface.
5. The method according to claim 4, characterized in that, The network configuration file includes at least one of the following: flat network enable identifier, flat network Internet Protocol address, and flat network physical address.
6. The method according to claim 2, characterized in that, The configuration information includes at least one of the following: flat network name, flat network mode, and flat network gateway information.
7. A flat network construction device, characterized in that, include: The acquisition module is configured to acquire a virtual network interface card (NIC) component through the container control module; the virtual NIC component refers to a network virtualization scheme. The confirmation module is configured to use the container control module to confirm the storage address of the virtual network interface card (NIC) component; the storage address refers to the calling address of the virtual NIC component in the scheduling framework; the storage address corresponds one-to-one with the virtual NIC component. The second confirmation module is configured to build a container group through the container building module and confirm the network interface of the flat network corresponding to the container group. The addition module is configured to use the container building module to add the storage address to the configuration file of the container group through the network interface, thereby completing the construction of the flat network; wherein, the container group completes the construction of the container group flat network without deleting the original network interface card of the container group.
8. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing the computer to perform the method of any one of claims 1 to 6.