A container network management method and system for edge computing platforms

By creating user-defined resources and node network managers on the edge computing platform, the problems of poor network isolation and difficult policy implementation in the edge computing platform are solved, and efficient network resource management and stability assurance of key applications are achieved.

CN119697195BActive Publication Date: 2025-09-09SHANDONG FUTURE NETWORK RES INST (PURPLE MOUNTAIN LAB IND INTERNET INNOVATION APPL BASE)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411874214.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-09-09
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In existing edge computing platforms, problems such as network bandwidth, traffic delay and network congestion have become bottlenecks in application performance. Network isolation is poor and network policy implementation is difficult, making it difficult to meet the needs of scenarios with high network requirements.

Method used

By creating user-defined resources, including cluster node grouping, namespace grouping, workload grouping, and network interfaces, container traffic priority scheduling is performed based on the weight of the workload grouping. In combination with the node network manager for network configuration and management, a workload grouping gateway is set to control network traffic policies.

Benefits of technology

It significantly enhances the network flexibility and scalability of containers, enables refined network management, improves network resource utilization efficiency and service quality, and ensures network performance and system stability for critical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697195B_ABST
    Figure CN119697195B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of Internet of Things technology, and discloses a method and system for managing container networks on an edge computing platform. The method comprises: creating user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces, and subnets; sorting containers according to the weights of the workload groups, and prioritizing the container traffic in different workload groups based on the sorting results; deploying a node network manager based on the priority scheduling results, performing network configuration and management on the nodes in the cluster node groups, and configuring corresponding subnets for the containers according to the network interface types; configuring corresponding subnets for the containers, and setting workload grouping gateways to control network traffic policies. By connecting containers on an edge computing platform to multiple network interfaces, the present invention not only significantly enhances the network flexibility and scalability of the containers, but also provides a variety of network connection mode options.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a container network management method and system for an edge computing platform. Background Art

[0002] Edge computing, a result of network evolution and cloud computing technology development, provides computing, storage, and network infrastructure close to users, enabling applications to be deployed and run on this infrastructure, thereby providing users with low-latency edge cloud services. With growing market demand for edge computing and increasing data transmission volumes, network bandwidth and throughput are becoming key factors affecting application performance.

[0003] Building an edge computing platform involves multiple technical areas, including but not limited to computing resource management, data storage, network optimization, and security assurance. Kubernetes (K8S for short), as an open source container orchestration system, can automate the deployment, scaling, and management of containerized applications. Its role in edge computing architecture is particularly critical, helping administrators more efficiently manage and schedule computing resources distributed across various edge nodes. The application of K8S is not limited to the management of edge nodes, but also includes automatic scaling, high availability configuration, security policy implementation, and application control, thereby improving the overall efficiency, stability, and reliability of the edge computing platform.

[0004] For scenarios with limited resources or requiring unattended operation, such as remote locations or IoT devices, K3S offers a lightweight, easy-to-install, and highly scalable Kubernetes distribution. Designed specifically for these environments, it features a compact size, minimal dependencies, and support for heterogeneous resources, making it an ideal tool for building edge computing infrastructure.

[0005] CNI (Container Network Interface), as the standard API specification for container networks, plays a key role in extending network functionality in Kubernetes. Kubernetes uses a "one IP per pod" network model, where each pod is assigned a separate network card and IP address. For example, the flannel plugin uses overlay mode to create a virtual network overlaying the existing network, using tunneling technology to encapsulate raw data packets and enable communication between containers across hosts. While different network plugins have different implementations, most adhere to this basic network model.

[0006] However, in scenarios with high network requirements, such as when an application or service not only needs to provide external API calls but also needs to meet its own data synchronization needs stemming from its distributed nature, the performance of a single network card often fails to meet production-grade requirements. In such situations, issues such as network bandwidth, traffic latency, and network congestion can easily become bottlenecks for application performance. Furthermore, a single network plane within the platform has the following drawbacks:

[0007] 1. Poor network isolation and uncontrollable fault domains. All pods and services are on the same network plane, lacking network isolation. Traffic from one pod can interfere with the network traffic of other pods. Network misconfiguration can also disrupt network communication across the entire cluster, leading to collective application anomalies.

[0008] 2. Difficulty implementing network policies. A single network plane makes it difficult to implement complex, fine-grained network policies, making network isolation, traffic control, and service governance difficult. Layer 2 and Layer 3 networking functions cannot be implemented simultaneously in a single cluster. Different functions require specialized components.

[0009] Therefore, how to provide an edge computing platform container network management method and system is an urgent problem to be solved. Summary of the Invention

[0010] The embodiments of the present invention provide an edge computing platform container network management method and system to solve the above-mentioned technical problems existing in the prior art.

[0011] To provide a basic understanding of some aspects of the disclosed embodiments, the following is a brief summary. This summary is not intended to be a comprehensive review, identify key or essential elements, or delineate the scope of these embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the detailed description that follows.

[0012] According to a first aspect of an embodiment of the present invention, a method for managing a container network on an edge computing platform is provided.

[0013] In one embodiment, a method for managing an edge computing platform container network includes:

[0014] Creating user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces, and subnets;

[0015] Sort containers according to the weight of workload groups, and prioritize container traffic in different workload groups based on the sorting results.

[0016] Based on the priority scheduling results, deploy the node network manager to configure and manage the network of the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type;

[0017] Configure the corresponding subnet according to the container and set up the workload grouping gateway to control the network traffic policy.

[0018] In one embodiment, sorting the containers according to the weights of the workload groups and prioritizing the container traffic in different workload groups based on the sorting results includes:

[0019] Sort all containers to be scheduled according to the weight of the workload group, ensuring that the containers in the highest-weighted workload group are scheduled first. The corresponding containers are then scheduled to the nodes with the highest calculation scores until all containers are scheduled.

[0020] By calculating the global reference weight of each container and allocating logical virtual nodes to the containers on the virtual ring, the traffic priority of the containers in each workload group is dynamically adjusted by combining the time slice and pointer mechanism.

[0021] In one embodiment, sorting all containers to be scheduled according to the weights of the workload groups, ensuring that containers in the highest-weighted workload group receive priority scheduling, and scheduling the corresponding containers to the nodes with the highest calculated scores until all containers are scheduled includes:

[0022] S11. Assign a weight to each workload group, and sort the workload groups containing all containers to be created based on the weight to obtain a workload group queue.

[0023] S12. Select the workload group with the highest weight from the workload group queue. If the workload group with the highest weight is associated with a corresponding cluster node group, group the nodes in the corresponding cluster node group into a set, and list the containers to be created in the workload group with the highest weight to form a container list.

[0024] S13. Calculate the score of each node in the node composition set relative to the container list using a score calculation formula;

[0025] S14. Select a container from the container list and schedule the container in the workload group with the highest weight to the node with the highest score. Remove the pre-scheduled container from the container list.

[0026] S15. Repeat step S14 until the container in the workload group with the highest weight is scheduled.

[0027] S16. Repeat steps S12 to S15 until all containers in all workload groups are scheduled.

[0028] In one embodiment, the score calculation formula is:

[0029]

[0030] Where, Score(N i ) represents the score of the i-th node in the node set; N i Indicates the i-th node in the node set; w1 indicates the weight of the set CPU; CPU_REQ(P i ) represents the number of CPUs required by the i-th Pod; P i Indicates the current group G i The i-th Pod in CPU_TOTAL(N i ) represents the total CPU of the i-th node; CPU_AVG(N i ) represents the average CPU utilization of the i-th node in the reference time interval T; w2 represents the weight of the set memory; MEM_REQ(P i ) represents the memory size required by the i-th Pod; MEM_TOTAL(N i ) represents the total memory of the i-th node; MEM_AVG(N i ) represents the average memory occupancy of the i-th node in the reference time interval T; w3 represents the weight of the set network; n represents the number of network interfaces required for the i-th Pod to be scheduled; j represents the index value; NET_REQ(P i D j ) represents the bandwidth value required by the jth network interface of the i-th Pod; NET_TOTAL(N i D j ) represents the bandwidth value of the jth network interface of the i-th node; NET_AVG(N i D j ) represents the average bandwidth usage of the jth network interface of the i-th node in the reference time interval T; w4 represents the set storage weight;

[0031] STG_REQ(P i ) represents the storage disk size required by the i-th Pod; STG_TOTAL(N i ) represents the storage disk size of the i-th node; STG_AVG(N i ) represents the average storage disk occupancy of the i-th node in the reference time interval T.

[0032] In one embodiment, the method of dynamically adjusting the traffic priority of the containers in each workload group by calculating the global reference weight of each container, assigning a logical virtual node to the container on the virtual ring, and combining the time slice and pointer mechanism includes:

[0033] S21. Based on the workload grouping, set the workload group weight and the container weight, and calculate the global reference weight of each container based on the workload group weight and the container weight;

[0034] S22. Based on the global reference weight, set a logical virtual node for each container, and sort the logical virtual nodes of all containers according to the number of virtual nodes and place them on the virtual ring;

[0035] S23. Select a tuple from the workload group queue with the highest weight, and place the virtual nodes of the corresponding containers on the virtual ring at intervals according to the preset rules. If the target position is occupied, search for an empty position in a clockwise direction.

[0036] S24. Repeat step S23 until the virtual nodes of all containers are allocated to the virtual ring;

[0037] S25. Within a preset time period window, divide the time into several time slices, set a pointer to point to the virtual ring start node, and process the network data packet of the container pointed to by the pointer within each time slice;

[0038] S26. Set several pointers. When scheduling to the current cluster node group, repeat steps S21 to S25 to reconstruct the virtual ring to obtain priority scheduling of container traffic.

[0039] In one embodiment, the step of deploying a node network manager based on the priority scheduling result, performing network configuration and management on the nodes in the cluster node group, and configuring a corresponding subnet for the container according to the network interface type includes:

[0040] Deploy a node network manager in the cluster node group based on the priority scheduling result, wherein the container of the node network manager includes a container connector and a container manager;

[0041] The container connector in the node network manager communicates with the network controller, runs in network mode, and accesses the host namespace;

[0042] The network controller receives the container network interface creation request and notifies the node network manager of the corresponding node;

[0043] The node network manager converts the received network interface configuration information into network commands and configures the corresponding subnet for the container based on the network interface type.

[0044] In one embodiment, the network modes include: bridging mode, routing mode, virtual switch mode and transparent transmission mode.

[0045] In one embodiment, the node network manager converts the received network interface configuration information into a network command and configures a corresponding subnet for the container according to the network interface type, including:

[0046] The container connector in the node network manager receives the network interface configuration information and passes the network interface configuration information to the container manager, which converts the network interface configuration information into network commands;

[0047] Based on the network command, confirm the network type of the network interface, wherein the network type includes a default network and a subnet;

[0048] If the network type of the network interface is the default network, the container manager configures the network interface to obtain a network address from the address pool of the default network grouped by the cluster nodes;

[0049] If the network type of the network interface is subnet, the container manager determines the subnet name and subnet affiliation of the access network and configures the network interface to obtain a network address from the determined subnet.

[0050] In one embodiment, the workload group gateway is used to connect workload groups with cluster external services and control network traffic policies between groups.

[0051] According to a second aspect of an embodiment of the present invention, a container network management system for an edge computing platform is provided.

[0052] In one embodiment, the edge computing platform container network management system includes:

[0053] A user-defined resource creation module is used to create user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces and subnets;

[0054] A priority scheduling module is used to sort containers according to the weight of the workload group and prioritize the container traffic in different workload groups based on the sorting results;

[0055] The network configuration module is used to deploy the node network manager based on the priority scheduling results, perform network configuration and management on the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type;

[0056] The gateway setting module is used to configure the corresponding subnet according to the container and set the workload grouping gateway to control the network traffic policy.

[0057] According to a third aspect of an embodiment of the present invention, a computer device is provided.

[0058] In some embodiments, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0059] According to a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided.

[0060] In one embodiment, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0061] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0062] 1. By connecting containers on the edge computing platform to multiple network interfaces, the present invention not only significantly enhances the network flexibility and scalability of the container, but also provides a variety of network connection mode options; whether it is bridging, routing, virtual switch, or transparent transmission mode, users can flexibly choose according to the needs of specific application scenarios, thereby better meeting the network requirements in different business scenarios and improving the adaptability and performance of the overall system.

[0063] 2. By introducing node grouping and namespace grouping functions, the edge computing platform of the present invention realizes unified management of nodes and Pods under namespaces, significantly simplifies network configuration and maintenance work, and reduces management costs; at the same time, the introduction of workload grouping makes network management more refined, and can perform targeted network configuration according to the specific needs of each workload, thereby improving the utilization efficiency and service quality of network resources.

[0064] 3. The present invention determines traffic priority by setting weights for workload groups, ensuring that application services in high-priority groups can obtain better network services, effectively guaranteeing the network performance of key applications, and improving the stability and reliability of the overall system. It not only optimizes the allocation of network resources, but also provides strong support for the network management of the edge computing platform, ensuring the efficient operation and service quality of key businesses.

[0065] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0067] Figure 1This is a flowchart of a method for managing a container network on an edge computing platform according to an exemplary embodiment.

[0068] Figure 2 This is a principle block diagram of a container network management system for an edge computing platform according to an exemplary embodiment.

[0069] Figure 3 is a structural diagram of a computer device according to an exemplary embodiment;

[0070] Figure 4 This is an architectural diagram of a container network management method for an edge computing platform according to an exemplary embodiment. DETAILED DESCRIPTION

[0071] The following description and accompanying drawings sufficiently illustrate the specific embodiments herein to enable those skilled in the art to practice them. Portions and features of some embodiments may be included in or substituted for portions and features of other embodiments. The scope of the embodiments herein includes the entire scope of the claims, including all available equivalents thereof. Herein, the terms "first," "second," and the like are used solely to distinguish one element from another and do not require or imply any actual relationship or order between these elements. In practice, the first element can also be referred to as the second element, and vice versa. Furthermore, the terms "comprise," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a structure, device, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such structure, device, or apparatus. Without further limitation, an element defined by the phrase "comprising a..." does not preclude the presence of other identical elements in the structure, device, or apparatus comprising the element. The various embodiments herein are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Similar or identical parts between the various embodiments can be referenced to each other.

[0072] The terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like used herein to indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are intended only to facilitate the description of this document and simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the present invention. In the description herein, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, they can be mechanical or electrical connections, or they can be internal connections between two elements, they can be directly connected, or they can be indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to the specific circumstances.

[0073] As used herein, unless otherwise specified, the term "plurality" means two or more.

[0074] In this document, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0075] In this article, the term "and / or" is used to describe the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0076] It should be understood that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0077] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, or a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.

[0078] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0079] Figure 1An embodiment of a container network management method for an edge computing platform of the present invention is shown.

[0080] In this optional embodiment, the edge computing platform container network management method includes:

[0081] Create user-defined resources, including cluster node grouping, namespace grouping, workload grouping, network interface, and subnet.

[0082] It should be noted that user-defined resources are created, including cluster node groups, namespace groups, workload groups, network interfaces, and subnets as follows:

[0083] 1. Use "User-Defined Resource" (CRD) to define NodeGroup (cluster node grouping) resources, enabling cluster node grouping. Node grouping is a requirement for Pod scheduling. For example, nodes with 10G optical ports can be grouped together, nodes with 100G optical ports can be grouped together, and nodes with only 1G network ports can be grouped together.

[0084] Custom Resource Definitions (CRDs) are a way to extend the Kubernetes API, allowing users to define their own resource types. A CRD is a definition of a custom resource, and a CR (Custom Resource) is a running instance of a CRD.

[0085] 1) Define user-defined resource CRDs for cluster node groupings;

[0086] 2) Create a corresponding NodeGroupController controller and use an event-driven approach to monitor the creation, update, and deletion of NodeGroup resources;

[0087] 3) The NodeGroupController controller also monitors cluster node status changes and cluster node label modification events to update the affected NodeGroup instances.

[0088] 2. Use "User-defined Resource CRD" to define NsGroup (namespace grouping) resources, so that multiple namespaces are divided into different "namespace groups".

[0089] 1) Define the user-defined resource CRD for NsGroup, including the matching namespace, and support regular expression fuzzy matching;

[0090] 2) Implement the NsGroupController controller to monitor the creation, update, and deletion of NsGroup resources;

[0091] 3) The NsGroupController also monitors namespace changes and maps the corresponding changes to the NsGroup;

[0092] 4) The behavior of all Pods in a namespace is constrained and controlled by the namespace group. For example, if the namespace group ns-a is associated with a node group node-a, all Pods under ns-a will be scheduled only on the nodes in the node-a group.

[0093] 3. Use "User-Defined Resource CRD" to define WorkloadGroup (workload grouping, i.e. Pod grouping) resources so that the specified Pod is divided into the "workload group".

[0094] 1) Define a WorkloadGroup user-defined resource (CRD). You can assign pods to workload groups according to the following rules. The pod label selector specifies that pods matching the label rules will be added to the workload group; you can also directly specify a namespace or namespace group. When a WorkloadGroup resource specifies a namespace or namespace group, pods within that namespace or namespace group are automatically added to that workload group by default. You can also set the weights for workload groups and compute resources (CPU, memory, network, and storage).

[0095] 2) Implement the WorklaodGroupController controller to monitor the creation, update, and deletion of WorkloadGroup resources;

[0096] 3) The WorklaodGroupController controller monitors Pod creation, update, scheduling, and deletion events and synchronizes the change information to the workload group;

[0097] 4) The WorklaodGroupController controller listens to the creation, update, and deletion events of NsGroup resources and synchronizes the change information to the workload group;

[0098] 5) The WorklaodGroupController controller implements the Pod scheduler plug-in, integrates it into the cluster default scheduler, and extends the scheduling scoring rules, such as Pod priority scheduling.

[0099] 4. Use "User Defined Resource CRD" to define PodNIC (Pod Network Interface) resources. Each PodNIC instance is a network interface in the Pod.

[0100] 1) First, define the PodNIC (Pod Network Interface) user-defined resource, which mainly includes the following information: access network (default: the cluster's default container network can be set to bridge mode or route mode; subnet custom network), interface type (bridge, route, vSwitch, passthrough), interface name (nicName), MAC address (hwAddress), IP address and subnet mask list (ipv4s, ipv6s), whether it is the default interface (isDefault), gateway address (gateway), DNS address (dnsServer), maximum transmission unit (mtu), additional routes (routes), and other information.

[0101] 2) Implement the PodNICController corresponding to the PodNIC, monitor changes in the PodNIC resource instance, and create, update, and delete network interfaces for the Pod;

[0102] 3) When the NetManager component monitors Pod creation, update, and deletion events, it performs network operations on the corresponding nodes;

[0103] 4) Communicate with the cluster NetManagerController, such as obtaining the IP address.

[0104] 5. Use "User Defined Resource CRD" to define the subnet resource, assign an IP address to the non-default network interface of the container and connect it to the corresponding subnet.

[0105] 1) Define user-defined subnet resources. Subnet resources are divided into cluster-level subnets (clusterSubnet) and workload group-level subnets (workloadGroupSubnet). Cluster-level subnets manage unique IP segments, allowing all qualified pods in the cluster to access them. Workload group-level subnets manage unique IP segments, allowing only pods in the workload group to access them.

[0106] 2) Implement the subnetController controller to monitor the creation, modification, and deletion events of subnet resources;

[0107] 3) When subnetController receives a request to create or update a subnet instance, it verifies whether the subnet meets the creation conditions in 1).

[0108] In addition, K8S stands for Kubernetes (a container management engine); K3S stands for a simplified version of K8S that retains only core functions; Pod stands for the smallest unit of scheduling in k8s, which contains one or more containers; DaemonSet stands for a resource in k8s that controls the Pod that runs on each node in the cluster; Namespace stands for a mechanism for dividing resources in the cluster into isolated groups; CRD stands for a user-defined resource in K8S; CNI stands for the network API interface of the Container Network Interface container; veth pair stands for a virtual network device that connects two network namespaces; NodeGroup stands for cluster node grouping, which divides nodes with the same functions or similar resources into logical groups; NsGroup stands for namespace grouping, which divides multiple namespaces into the same group for unified management; WorkloadGroup stands for workload grouping, that is, Pod grouping, which divides the specified Pod into a logical group for unified management; NetManager stands for the node network manager, which is responsible for making corresponding settings for the node network according to the network interface information configured by the Pod; NetManagerController stands for the network centralized manager, which is responsible for container network IP allocation and storage network policy, etc.; PodNIC stands for the network interface resource of a custom Pod, which describes a network interface of a Pod.

[0109] Containers are sorted according to the weight of the workload grouping, and container traffic in different workload groups is prioritized based on the sorting results.

[0110] Based on the priority scheduling results, the node network manager is deployed to configure and manage the network of the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type.

[0111] Configure the corresponding subnet according to the container and set up the workload grouping gateway to control the network traffic policy.

[0112] In this optional embodiment, sorting the containers according to the weights of the workload groups and prioritizing the container traffic in different workload groups based on the sorting results includes:

[0113] Sort all containers to be scheduled according to the weight of the workload group, ensuring that the containers in the highest-weighted workload group are scheduled first. The corresponding containers are then scheduled to the nodes with the highest calculation scores until all containers are scheduled.

[0114] By calculating the global reference weight of each container and allocating logical virtual nodes to the containers on the virtual ring, the traffic priority of the containers in each workload group is dynamically adjusted by combining the time slice and pointer mechanism.

[0115] In this optional embodiment, the process of sorting all containers to be scheduled according to the weights of the workload groups, ensuring that the containers in the highest-weighted workload group are given priority scheduling rights, and scheduling the corresponding containers to the nodes with the highest calculated scores until all containers are scheduled includes:

[0116] S11. Assign a weight to each workload group, and sort the workload groups containing all containers to be created based on the weight to obtain a workload group queue.

[0117] S12. Select the workload group with the highest weight from the workload group queue. If the workload group with the highest weight is associated with a corresponding cluster node group, group the nodes in the corresponding cluster node group into a set, and list the containers to be created in the workload group with the highest weight to form a container list.

[0118] S13. Calculate the score of each node in the node composition set relative to the container list using a score calculation formula;

[0119] S14. Select a container from the container list and schedule the container in the workload group with the highest weight to the node with the highest score. Remove the pre-scheduled container from the container list.

[0120] S15. Repeat step S14 until the container in the workload group with the highest weight is scheduled.

[0121] S16. Repeat steps S12 to S15 until all containers in all workload groups are scheduled.

[0122] In this optional embodiment, the score calculation formula is:

[0123]

[0124] Where, Score(N i ) represents the score of the i-th node in the node set; N i Indicates the i-th node in the node set; w1 indicates the weight of the set CPU; CPU_REQ(P i ) represents the number of CPUs required by the i-th Pod; P i Indicates the current group G i The i-th Pod in CPU_TOTAL(N i) represents the total CPU of the i-th node; CPU_AVG(N i ) represents the average CPU utilization of the i-th node in the reference time interval T; w2 represents the weight of the set memory; MEM_REQ(P i ) represents the memory size required by the i-th Pod, in MB; MEM_TOTAL(N i ) represents the total memory of the i-th node, in MB;

[0125] MEM_AVG(N i ) represents the average memory occupancy of the i-th node in the reference time interval T; w3 represents the weight of the set network; n represents the number of network interfaces required for the i-th Pod to be scheduled; j represents the index value; NET_REQ(P i D j ) represents the bandwidth value required by the jth network interface of the i-th Pod, in Mbps; NET_TOTAL(N i D j ) represents the bandwidth value of the jth network interface of the i-th node, in Mbps; NET_AVG(N i D j ) represents the average bandwidth usage of the jth network interface of the i-th node in the reference time interval T; w4 represents the storage weight set; STG_REQ(P i ) represents the storage disk size required by the i-th Pod, in MB; STG_TOTAL(N i ) represents the storage disk size of the i-th node, in MB; STG_AVG(N i ) represents the average storage disk occupancy of the i-th node in the reference time interval T.

[0126] In this optional embodiment, the method of calculating the global reference weight of each container, assigning a logical virtual node to the container on the virtual ring, and dynamically adjusting the traffic priority of the containers in each workload group in combination with the time slice and pointer mechanism includes:

[0127] S21. Based on the workload grouping, set the workload group weight and the container weight, and calculate the global reference weight of each container based on the workload group weight and the container weight;

[0128] S22. Based on the global reference weight, set a logical virtual node for each container, and sort the logical virtual nodes of all containers according to the number of virtual nodes and place them on the virtual ring;

[0129] S23. Select a tuple from the workload group queue with the highest weight, and place the virtual nodes of the corresponding containers on the virtual ring at intervals according to the preset rules. If the target position is occupied, search for an empty position in a clockwise direction.

[0130] S24. Repeat step S23 until the virtual nodes of all containers are allocated to the virtual ring;

[0131] S25. Within a preset time period window, divide the time into several time slices, set a pointer to point to the virtual ring start node, and process the network data packet of the container pointed to by the pointer within each time slice;

[0132] S26. Set several pointers. When scheduling to the current cluster node group, repeat steps S21 to S25 to reconstruct the virtual ring to obtain priority scheduling of container traffic.

[0133] It should be noted that the "workload group" is set with a weight. The higher the weight, the higher the scheduling priority, higher network policy execution rights and higher network quality assurance for the Pods in the "workload group". In addition to setting the overall weight of the "workload group", you can also set the weights of computing resources (CPU, memory, network, storage) separately. For example, if group A has a high demand for CPU and a low demand for storage, you can set the CPU weight to 90 and the storage weight to 20. In this way, when scheduling the Pods in the group, the Pods in the group will be scheduled to nodes with high CPU idleness, even if the node has a low storage score. The same applies to resources such as memory.

[0134] In terms of Pod scheduling, follow the steps below to create Pods according to priority:

[0135] 1) Sort the WorkloadGroups containing the Pods to be created by weight to obtain the workload group queue Q. Pods in WorkloadGroups with higher weights are created first.

[0136] 2) Dequeue workload group G from queue Q i , start scheduling workload group G i In the Pod, if G i If NodeGroup is specified, the nodes in the node group NodeGroup in the cluster form a set N; the workload group G i The Pods to be created are listed as P1 to P n ;

[0137] 3) Compute the nodes N1 to N2 in the node set N n Relative to the Pod list P1~P n The score is calculated as follows:

[0138]

[0139] Where, Score(N i ) represents the score of the i-th node in the node set; N i Indicates the i-th node in the node set; w1 indicates the weight of the set CPU; CPU_REQ(P i ) represents the number of CPUs required by the i-th Pod; P i Indicates the current group G i The i-th Pod in CPU_TOTAL(N i ) represents the total CPU of the i-th node; CPU_AVG(N i ) represents the average CPU utilization of the i-th node in the reference time interval T; w2 represents the weight of the set memory; MEM_REQ(P i ) represents the memory size required by the i-th Pod, in MB; MEM_TOTAL(N i ) represents the total memory of the i-th node, in MB;

[0140] MEM_AVG(N i ) represents the average memory occupancy of the i-th node in the reference time interval T; w3 represents the weight of the set network; n represents the number of network interfaces required for the i-th Pod to be scheduled; j represents the index value; NET_REQ(P i D j ) represents the bandwidth value required by the jth network interface of the i-th Pod, in Mbps; NET_TOTAL(N i D j ) represents the bandwidth value of the jth network interface of the i-th node, in Mbps; NET_AVG(N i D j ) represents the average bandwidth usage of the jth network interface of the i-th node in the reference time interval T; w4 represents the storage weight set; STG_REQ(P i ) represents the storage disk size required by the i-th Pod, in MB; STG_TOTAL(N i ) represents the storage disk size of the i-th node, in MB; STG_AVG(N i ) represents the average storage disk occupancy of the i-th node in the reference time interval T.

[0141] 4) Remove PodP from the Pod list i , pre-schedule the Pod to Score(N i ) in the node with the highest score. Remove P from the Pod listi Repeat the steps in 3) to calculate the node set N for each node N1~N n Relative to the Pod list P i+1 ~P n score;

[0142] 5) Repeat step 4) until all Pods in the workload group are scheduled.

[0143] 6) Repeat steps 2)-5) until all Pods in the workload group are scheduled.

[0144] In terms of traffic priority control, the following method is used to prioritize the traffic of Pods in different workload groups:

[0145] 1) Assume that workload groups G1 to G n , the weights are W1~W n , workload group G i The weights of the Pods are WG i P j ;

[0146] 2) Calculate the global reference weight HG of each Pod i P j , that is, the weight of the workload group * the weight of the Pod in the workload group, HG i P j =W i *WG i P j ;

[0147] 3) Set up a logical virtual node for each Pod (a virtual node is equivalent to a reference or shortcut to an actual Pod, and accessing a virtual node means accessing its associated actual Pod). The number of virtual nodes for each Pod is δ*HG i P j ,δ is the adjustment factor to prevent the virtual node from being too large or too small;

[0148] 4) Set up a packet scheduling virtual ring with the virtual nodes described in 3) on it. The total number of virtual nodes is the number of logical virtual nodes of the pods of all workload groups, which is set to N.

[0149] 5) Let tuple (P i , VP), where P i is the actual Pod, VP is the list of virtual nodes corresponding to the Pod, sort the virtual nodes of each Pod from most to least, and put the tuple into queue Q;

[0150] 6) Dequeue tuple (P) from queue Q i, VP), starting from the starting node of the virtual ring, every N / CP i , place a P i If a virtual node already exists at the target location, it searches for an idle virtual node location in clockwise direction and inserts the virtual node into that location until all virtual nodes in the VP are allocated.

[0151] 7) Repeat step 6) until the queue is empty;

[0152] 8) Let pointer p point to the starting node of the virtual ring. Within the time window of period T, divide the time into time slices ΔT. The virtual node pointed to by pointer p will start processing the network data packets of the Pod pointed to by the virtual node until the time reaches ΔT. Pointer p moves clockwise to the next virtual node.

[0153] 9) Multiple pointers p can be set i ~p n , where the odd-numbered pointers rotate clockwise and the even-numbered pointers rotate counterclockwise to speed up the processing;

[0154] 10) When a new Pod is created or scheduled to the current cluster node, repeat steps 1) to 9) to reconstruct the virtual ring and implement traffic priority control.

[0155] In this optional embodiment, the node network manager is deployed based on the priority scheduling result, network configuration and management is performed on the nodes in the cluster node group, and corresponding subnets are configured for the containers according to the network interface type, including:

[0156] Deploy a node network manager in the cluster node group based on the priority scheduling result, wherein the container of the node network manager includes a container connector and a container manager;

[0157] The container connector in the node network manager communicates with the network controller, runs in network mode, and accesses the host namespace;

[0158] The network controller receives the container network interface creation request and notifies the node network manager of the corresponding node;

[0159] The node network manager converts the received network interface configuration information into network commands and configures the corresponding subnet for the container based on the network interface type.

[0160] In this optional embodiment, the network modes include: bridging mode, routing mode, virtual switch mode and transparent transmission mode.

[0161] It should be noted that the PodNIC is in bridge mode. When a Pod is associated with a PodNIC instance with the bridge resource type, a bridge-mode network interface is added to the Pod. The keeper container in the NetManager component establishes a virtual device pair (veth pair) on the node to which the Pod is scheduled. One end is added to the bridge specified in the PodNIC, and the other end is connected to the Pod's namespace. An IP address is configured based on the configured IP address. If no IP address is configured, an IP address is requested from the NetManagerController.

[0162] The PodNIC is in routing mode. When a Pod is associated with a PodNIC instance with the route resource type, a routing network interface is added to the Pod. The keeper container in the NetManager component establishes a virtual device pair (veth pair) on the node to which the Pod is scheduled. One end is connected to the Pod's namespace, but unlike in bridge mode, the other end is not connected to the bridge. The keeper container in the NetManager component adds one or more routing entries to the node based on the PodNIC configuration.

[0163] The PodNIC is in virtual switch mode. When a Pod is associated with an instance of a PodNIC resource type of vSwitch, a network interface in virtual switch mode is added to the Pod. The premise for the Pod to add a network interface in vSwitch mode is that the Pod is in a "workload group". When NetManager detects the event of adding a vSwitch network interface, it monitors whether the group has created the virtual switch container specified in the PodNIC. If not, it creates the virtual switch and then establishes a virtual device pair veth pair, with one end connected to the namespace where the Pod is located and the other end connected to the virtual switch. If the virtual switch has been created, a virtual device pair veth pair is directly established, with one end connected to the namespace where the Pod is located and the other end connected to the virtual switch. The configuration in the PodNIC can also configure whether the network interface of the node host is added to the virtual switch.

[0164] The PodNIC is in passthrough mode. When a Pod is associated with an instance of a PodNIC resource type of passthrough, a network interface in passthrough mode is added to the Pod. This is usually used when the application interacts directly with the NIC hardware, and the operating system kernel no longer processes data packets on the interface. At the same time, a user-space driver is used to manage the network interface instead of a traditional kernel driver. The application has complete exclusive use of the interface. Therefore, in passthrough mode, the keeper container in the NetManager component is responsible for binding the interface to the user-space driver supported by the application, such as vfio-pci or uio_pci_generic, on the node host. Based on the configuration in the PodNIC, the keeper container in the NetManager component will decide whether to fully pass the physical interface to the Pod, or to first virtualize the physical interface on the node into multiple virtual interfaces through SRIOV technology, and then pass the virtual interface to the Pod.

[0165] In one embodiment, the node network manager converts the received network interface configuration information into a network command and configures a corresponding subnet for the container according to the network interface type, including:

[0166] The container connector in the node network manager receives the network interface configuration information and passes the network interface configuration information to the container manager, which converts the network interface configuration information into network commands;

[0167] Based on the network command, confirm the network type of the network interface, wherein the network type includes a default network and a subnet;

[0168] If the network type of the network interface is the default network, the container manager configures the network interface to obtain a network address from the address pool of the default network grouped by the cluster nodes;

[0169] If the network type of the network interface is subnet, the container manager determines the subnet name and subnet affiliation of the access network and configures the network interface to obtain a network address from the determined subnet.

[0170] In this optional embodiment, the workload group gateway is used to connect the workload group and cluster external services and control network traffic policies between the groups.

[0171] It should be noted that the NetManager (Node Network Manager) component runs in the cluster. This is a DaemonSet resource that is responsible for network settings and management of the nodes in the cluster, including creating bridges, establishing virtual device pairs, adding / deleting / modifying routes, setting up host network interface SRIOV virtualization, setting up iptables rules, setting up NAT, setting up DNS, etc. The Pod of the NetManager component contains two containers. The container connector is responsible for obtaining the creation information of the Pod, communicating with the NetManagerController (network controller), and obtaining the network interface configuration information of the workload Pod. The other container, the keeper, runs in privileged mode and uses the --pid=host parameter to use the host namespace, mount the host's / proc directory to the / proc directory in the container to obtain the host's process information and implement the host's network settings. When the NetManagerController receives a Pod network interface creation request or a Pod network interface modification request, it sends a notification to the NetManager of the node where the Pod is located. The connector container receives the notification and converts the Pod's network configuration or change information into Linux commands, which are then completed by the keeper:

[0172] The basic template command is nsenter-a -t1bash-c "${command}"

[0173] Create a bridge: nsenter -a -t1 bash -c "brctladdbr ${brName}"

[0174] Create a virtual device pair:

[0175] nsenter-a-t1bash-c "iplinkadd${vth}typevethpeername${eth}", where vth is the name of the virtual device pair on the host side, and eth is the name of the virtual device pair inside the Pod container.

[0176] Add, delete, and modify routes: nsenter-a-t1bash-c "iprouteadd / del${dst}via${viaIp}", where dst is the destination network and viaIp is the destination address.

[0177] Set up network interface SRIOV virtualization: First, check whether the host machine supports SRIOV virtualization. The command is "lspci-Dvmm|grepEthernet". If SRI-OV appears, it means that SRI-OV virtualization is supported. Then set up the virtual interface. The command is:

[0178] “echo${vfNum}> / sys / bus / pci / devices / ${pciNum} / sriov_numvfs

[0179] ", vfNum is the number of virtualized interfaces, pciNum is the PCI device number of the physical interface, and the other network operations are implemented in the same logic.

[0180] In addition, the PodNIC resource can be configured to automatically obtain an IP address, a fixed IP address, or allocate an IP from a specified IP pool. When the access network of the PodNIC is set to default, the interface will obtain an IP from the IPAM of the cluster's default network. It can also be set to a fixed IP (segment). The set IP (segment) address range should be within the cluster's default network IP range. When the access network of the PodNIC is subnet, it is necessary to specify the name of the access network and the subnet affiliation (cluster-level subnet clusterSubnet, workload-level subnet workloadGroupSubnet). The PodNIC will obtain an IP address from the subnet's IPAM. It can also be set to a fixed IP (segment). The set IP (segment) address range should be within the IP range of the subnet. When connected to a cluster-level subnet, the PodNIC's IP cannot be repeated. When connected to a workload group-level group subnet, the addresses of the PodNICs under different workload groups can be the same.

[0181] Pods in a workload group do not need to have a network interface connected to the cluster's default network. For example, if a pod only provides DNS services to pods in the workload group and does not provide services to pods outside the workload group, there is no need to add a network interface connected to the cluster's default network to the pod.

[0182] Workload grouping can set up a "workload grouping" gateway to connect different workload groups, cluster external services, other clusters, etc. It can also control network traffic policies between groups, set NAT rules, set routing information, etc.

[0183] like Figure 4As shown, it provides support for multiple network cards for Pods in the edge computing platform. According to the configuration, 0, 1 or more network cards can be flexibly inserted for different workload Pods, and the address of each network card can be configured. These network cards can work in four modes: bridging, routing, virtual switch, and transparent transmission. In addition, "node grouping" is defined to group a series of nodes with similar functional characteristics or special purposes. "Namespace grouping" is defined so that the workload Pods in this series of namespaces have similar network configurations. "Workload grouping" is defined to divide a group of Pods into a group, and access rules within and between groups can be configured for the Pods to control the network policies between applications.

[0184] Figure 2 An embodiment of an edge computing platform container network management system of the present invention is shown.

[0185] In this optional embodiment, the edge computing platform container network management system includes:

[0186] A user-defined resource creation module 201 is used to create user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces, and subnets;

[0187] Priority scheduling module 203, used to sort containers according to the weight of workload groups, and perform priority scheduling on container traffic in different workload groups based on the sorting results;

[0188] The network configuration module 205 is used to deploy a node network manager based on the priority scheduling result, perform network configuration and management on the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type;

[0189] The gateway setting module 207 is used to configure the corresponding subnet according to the container and set the workload grouping gateway to control the network traffic strategy.

[0190] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment are implemented.

[0191] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0192] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.

[0193] In addition, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0194] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0195] The present invention is not limited to the structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A container network management method for an edge computing platform, characterized in that: The method includes: Creating user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces, and subnets; Sort containers according to the weight of workload groups, and prioritize container traffic in different workload groups based on the sorting results. Based on the priority scheduling results, deploy the node network manager to configure and manage the network of the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type; Configure the corresponding subnet according to the container and set the workload grouping gateway to control the network traffic policy; Sorting the containers according to the weights of the workload groups and prioritizing the container traffic in different workload groups based on the sorting results includes: All containers to be scheduled are sorted according to the weight of the workload group, ensuring that containers in the highest-weighted workload group receive priority scheduling. The corresponding containers are then scheduled to the nodes with the highest calculation scores until all containers are scheduled. The global reference weight of each container is calculated, and logical virtual nodes are assigned to the containers on the virtual ring. The traffic priority of the containers in each workload group is dynamically adjusted by combining time slices and pointer mechanisms. The process of sorting all containers to be scheduled according to the weights of the workload groups, ensuring that the containers in the highest-weighted workload group are scheduled first, and scheduling the corresponding containers to the nodes with the highest calculation scores until all containers are scheduled includes: S11. Assign a weight to each workload group, and sort the workload groups containing all the containers to be created based on the weights to obtain a workload group queue; S12. Select the workload group with the highest weight from the workload group queue. If the workload group with the highest weight is associated with the corresponding cluster node group, group the nodes in the corresponding cluster node group into a set, and list the containers to be created in the workload group with the highest weight to form a container list; S13. Use the score calculation formula to calculate the score of each node in the node group set relative to the container list; S14. Select a container from the container list, and schedule the container in the workload group with the highest weight to the node with the highest score, and remove the pre-scheduled container from the container list; S15. Repeat step S14 until the container in the workload group with the highest weight is scheduled; S16. Repeat steps S12 to S15 until all containers in all workload groups are scheduled.

2. The edge computing platform container network management method according to claim 1, characterized in that: The score calculation formula is: ; Where, Score ( N i ) represents the first i The score of each node; N i Represents the node set i nodes; w 1 means the setting CPU The weight of CPU_REQ ( P i ) indicates the i indivual Pod Required CPU quantity; P i Indicates the current group G i The i indivual Pod ; CPU_TOTAL ( N i ) indicates the i Nodes CPU Total amount; CPU_AVG ( N i ) indicates the i nodes in the reference time interval T within CPU average utilization rate; w 2 indicates the weight of the memory set; MEM_REQ ( P i ) indicates the i indivual Pod The required memory size; MEM_TOTAL ( N i ) indicates the i The total amount of memory per node; MEM_AVG ( N i ) indicates the i nodes in the reference time interval T Average memory usage within w 3 represents the weight of the set network; n Indicates the first i indivual Pod The number of network interfaces required; j Represents the index value; NET_REQ ( P i D j ) indicates the i indivual Pod No. j The bandwidth value required by each network interface; NET_TOTAL ( N i D j ) indicates the i The node j The bandwidth value of each network interface; NET_AVG ( N i D j ) indicates the i Node j network interfaces in the reference time interval T Average bandwidth usage within w 4 represents the weight of the storage setting; STG_REQ ( P i ) indicates the i indivual Pod Required storage disk size; STG_TOTAL ( N i ) indicates the i The storage disk size of each node; STG_AVG ( N i ) indicates the i nodes in the reference time interval T The average storage disk usage within the system.

3. The edge computing platform container network management method according to claim 2, characterized in that: The method of calculating the global reference weight of each container, assigning a logical virtual node to the container on the virtual ring, and dynamically adjusting the traffic priority of the containers in each workload group by combining the time slice and pointer mechanism includes: S21. Based on the workload grouping, set the workload group weight and the container weight, and calculate the global reference weight of each container based on the workload group weight and the container weight; S22. Based on the global reference weight, set a logical virtual node for each container, and sort the logical virtual nodes of all containers according to the number of virtual nodes and place them on the virtual ring; S23. Select a tuple from the workload group queue with the highest weight, and place the virtual nodes of the corresponding containers on the virtual ring at intervals according to the preset rules. If the target position is occupied, search for an empty position in a clockwise direction. S24. Repeat step S23 until the virtual nodes of all containers are allocated to the virtual ring; S25. Within a preset time period window, divide the time into several time slices, set a pointer to point to the virtual ring start node, and process the network data packet of the container pointed to by the pointer within each time slice; S26. Set several pointers. When scheduling to the current cluster node group, repeat steps S21 to S25 to reconstruct the virtual ring to obtain priority scheduling of container traffic.

4. The edge computing platform container network management method according to claim 1, characterized in that: The process of deploying a node network manager based on the priority scheduling result, performing network configuration and management on the nodes in the cluster node group, and configuring the corresponding subnet for the container according to the network interface type includes: Deploy a node network manager in the cluster node group based on the priority scheduling result, wherein the container of the node network manager includes a container connector and a container manager; The container connector in the node network manager communicates with the network controller, runs in network mode, and accesses the host namespace; The network controller receives the container network interface creation request and notifies the node network manager of the corresponding node; The node network manager converts the received network interface configuration information into network commands and configures the corresponding subnet for the container based on the network interface type.

5. The edge computing platform container network management method according to claim 4, characterized in that: The network modes include: bridging mode, routing mode, virtual switch mode and transparent transmission mode.

6. The edge computing platform container network management method according to claim 5, characterized in that: The node network manager converts the received network interface configuration information into network commands and configures the corresponding subnet for the container according to the network interface type, including: The container connector in the node network manager receives the network interface configuration information and passes the network interface configuration information to the container manager, which converts the network interface configuration information into network commands; Based on the network command, confirm the network type of the network interface, wherein the network type includes a default network and a subnet; If the network type of the network interface is the default network, the container manager configures the network interface to obtain a network address from the address pool of the default network grouped by the cluster nodes; If the network type of the network interface is subnet, the container manager determines the subnet name and subnet affiliation of the access network and configures the network interface to obtain a network address from the determined subnet.

7. The edge computing platform container network management method according to claim 6, characterized in that: The workload group gateway is used to connect workload groups and cluster external services and control network traffic policies between groups.

8. An edge computing platform container network management system, characterized in that: The system includes: A user-defined resource creation module is used to create user-defined resources, wherein the user-defined resources include cluster node groups, namespace groups, workload groups, network interfaces and subnets; A priority scheduling module is used to sort containers according to the weight of the workload group and prioritize the container traffic in different workload groups based on the sorting results; The network configuration module is used to deploy the node network manager based on the priority scheduling results, perform network configuration and management on the nodes in the cluster node group, and configure the corresponding subnet for the container according to the network interface type; The gateway setting module is used to configure the corresponding subnet according to the container and set the workload grouping gateway to control the network traffic strategy; The priority scheduling module includes: All containers to be scheduled are sorted according to the weight of the workload group, ensuring that containers in the highest-weighted workload group receive priority scheduling. The corresponding containers are then scheduled to the nodes with the highest calculation scores until all containers are scheduled. The global reference weight of each container is calculated, and logical virtual nodes are assigned to the containers on the virtual ring. The traffic priority of the containers in each workload group is dynamically adjusted by combining time slices and pointer mechanisms. The process of sorting all containers to be scheduled according to the weights of the workload groups, ensuring that the containers in the highest-weighted workload group are given priority scheduling rights, and scheduling the corresponding containers to the nodes with the highest calculation scores until all containers are scheduled includes the following steps: Step 1: Assign a weight to each workload group, and sort the workload groups containing all the containers to be created based on the weights to obtain a workload group queue; Step 2: Select the workload group with the highest weight from the workload group queue. If the workload group with the highest weight is associated with the corresponding cluster node group, the nodes in the corresponding cluster node group are grouped together, and the containers to be created in the workload group with the highest weight are listed to form a container list; Step 3: Use the score calculation formula to calculate the score of each node in the node group relative to the container list; Step 4: Select a container from the container list, and schedule the container in the workload group with the highest weight to the node with the highest score, and remove the pre-scheduled container from the container list; Step 5: Repeat step 4 until the container in the workload group with the highest weight is scheduled; Step 6: Repeat steps 2 to 5 until all containers in all workload groups are scheduled.

Citation Information

Patent Citations

  • Self-adaptive anti-risk Kubernetes cluster scheduling method based on penalty factor

    CN115981806A