A unified network resource management method and system based on a cloud platform

By configuring container network feature details resources and establishing network domains in Kubernetes, unified management of IP resources for different container network solutions is achieved, solving the problems of IP resource management non-sharing and configuration overriding, and improving resource utilization efficiency and security.

CN115914229BActive Publication Date: 2025-11-14HANGZHOU HARMONYCLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211539142.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2025-11-14
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

In existing technologies, container networking solutions in Kubernetes cannot achieve unified management, resulting in a lack of shared IP resource management and configuration information overwriting, which leads to the inability to properly reclaim some network resources.

Method used

By configuring container network feature details resources, network domains and address pools are established, and IP resource allocation and reclamation are completed using a chained call method, including the management of fixed and non-fixed IP pools. Combined with container network plugins, service discovery and resource reclamation under multiple network interfaces are realized.

Benefits of technology

It enables unified resource management of different container network solutions on the cloud platform, improves the efficiency and security of IP resource utilization, and avoids resource waste and configuration overlay issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914229B_ABST
    Figure CN115914229B_ABST
Patent Text Reader

Abstract

This invention discloses a unified network resource management method and system based on a cloud platform. The method includes configuring container network feature details resources; the cloud platform reads all existing container network schemes within the cluster through these resources; configuring a corresponding master list of container network resources based on these resources; establishing network domains based on the master list, where IP resources from container network schemes can be allocated; establishing address pools based on the IP resources in the network domains; deploying cloud-native applications, configuring container network templates, and specifying the address pools, allocating IP resources through chained calls; deleting the cloud-native applications and deleting the IP resources called by the container network templates. This invention extracts the commonalities of different container network schemes to define resource configurations, providing a foundation for unified network resources, enabling the cloud platform to utilize this unified network resource to manage resources for different container network schemes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of resource management technology, and in particular to a unified network resource management method and system based on a cloud platform. Background Technology

[0002] With the development of container clouds, Kubernetes (K8s) has become the de facto standard in the field of container orchestration. As business scenarios expand, reducing network resource costs and ensuring communication security have become indispensable tasks. Currently, the main solution involves using multiple network interfaces, customizing required network attributes and resources, and accessing dedicated business resources through dedicated network interfaces.

[0003] Multus is an open-source container networking solution with multiple network interfaces for Kubernetes. Typically, in Kubernetes, each container has only one network interface, but Multus, as a meta-plugin, calls multiple other container network interface plugins, allowing multiple network interfaces to be connected to the container.

[0004] However, the ability to call multiple other container network interface plugins using Multus as a meta-plugin only solves the problem of generating multiple network interfaces within a container. Since IP resource management is not currently shared across different container network solutions, cloud platforms cannot provide unified management of network resources. Furthermore, when calling multiple identical container network interface plugins, configuration information can be overwritten, resulting in some network resources not being properly reclaimed. Summary of the Invention

[0005] To address the shortcomings mentioned above, this invention provides a unified network resource management method and system based on a cloud platform.

[0006] To achieve the above objectives, the present invention provides a unified network resource management method based on a cloud platform, comprising:

[0007] Configure container network feature details resource; the cloud platform reads all container network schemes existing in the cluster through the container network feature details resource.

[0008] Based on the container network feature details resource, configure a master list of container network resources that corresponds one-to-one with the container network feature details resource;

[0009] A network domain is established based on the overall list of container network resources, and the IP resources in the container network scheme can be planned into the network domain;

[0010] An address pool is established based on the IP resources in the network domain;

[0011] Deploy cloud-native applications, configure container network templates and specify the address pool, and complete the allocation of IP resources through chained calls;

[0012] Delete the cloud-native application and delete the IP resource invoked by the container network template.

[0013] Preferably, establishing an address pool based on IP resources in the network domain includes:

[0014] Establish a fixed IP pool and a non-fixed IP pool;

[0015] The non-fixed IP pool corresponds to the IP address pool of the third-party container network solution;

[0016] The fixed IP pool creates a single IP address pool for multiple third-party container networking solutions.

[0017] Preferably, the fixed IP pool is located in the container network resource address pool, and the non-fixed IP pool is located in the container network resource block and the container service network resource address pool.

[0018] Preferably, deploying cloud-native applications, configuring container network templates, specifying the address pool, and allocating IP resources through chained calls includes:

[0019] To deploy the cloud-native application, select the required container network template and specify the address pool in the Annotation of the configuration template.

[0020] Invoke the container network environment pre-configuration container network plugin and update the field specifying the IP address pool in the third-party container network solution in the Annotation field;

[0021] Based on the IP address pool, the third-party container networking plugin for assigning IPs is invoked to obtain the Pod IP;

[0022] Based on the Pod IP and name, create or update the container network allocation details resource, call the container network environment preservation container network plugin, preserve the corresponding network card and combine the configuration state of the container network environment preservation container network plugin into the container network allocation details resource, and create a Veth virtual network device for service discovery under multiple network cards.

[0023] Preferably, deleting the cloud-native application and deleting the IP resources called by the container network template include:

[0024] Delete the cloud-native application and delete the IP resources that are called in a chain according to the container network template;

[0025] Invoke the container network environment pre-configured container network plugin to restore the configuration state retained by the corresponding network interface card from the network allocation details resource within the container;

[0026] Invoke the third-party container networking plugin that allocated the IP address to reclaim the Pod IP.

[0027] The container network environment retains the on-site container network plugin, releases the information corresponding to the IP in the container network resource address pool, the container network resource block, and the container service network resource address pool, and deletes the container network allocation details resource.

[0028] The present invention also includes a unified network resource management system based on a cloud platform, comprising:

[0029] The first configuration module is used to configure container network feature details resources. The cloud platform reads all container network schemes existing in the cluster through the container network feature details resources.

[0030] The second configuration module is used to configure a master list of container network resources that corresponds one-to-one with the container network feature detail resources based on the container network feature detail resources;

[0031] The network domain module is used to establish network domains based on the overall list of container network resources, and the IP resources in the container network scheme can be planned to be allocated to the network domains;

[0032] Establishment module, used to establish an address pool based on IP resources in the network domain;

[0033] The management module is used to deploy cloud-native applications, configure container network templates and specify the address pool, and complete the allocation of IP resources through chained calls; delete the cloud-native application and delete the IP resources called by the container network template.

[0034] Preferably, establishing an address pool based on IP resources in the network domain includes:

[0035] Establish a fixed IP pool and a non-fixed IP pool;

[0036] The non-fixed IP pool corresponds to the IP address pool of the third-party container network solution;

[0037] The fixed IP pool creates a single IP address pool for multiple third-party container networking solutions.

[0038] Preferably, the fixed IP pool is located in the container network resource address pool, and the non-fixed IP pool is located in the container network resource block and the container service network resource address pool.

[0039] Preferably, deploying cloud-native applications, configuring container network templates, specifying the address pool, and allocating IP resources through chained calls includes:

[0040] To deploy the cloud-native application, select the required container network template and specify the address pool in the Annotation of the configuration template.

[0041] Invoke the container network environment pre-configuration container network plugin and update the field specifying the IP address pool in the third-party container network solution in the Annotation field;

[0042] Based on the IP address pool, the third-party container networking plugin for assigning IPs is invoked to obtain the Pod IP;

[0043] Based on the Pod IP and name, create or update the container network allocation details resource, call the container network environment preservation container network plugin, preserve the corresponding network card and combine the configuration state of the container network environment preservation container network plugin into the container network allocation details resource, and create a Veth virtual network device for service discovery under multiple network cards.

[0044] Preferably, deleting the cloud-native application and deleting the IP resources called by the container network template include:

[0045] Delete the cloud-native application and delete the IP resources that are called in a chain according to the container network template;

[0046] Invoke the container network environment pre-configured container network plugin to restore the configuration state retained by the corresponding network interface card from the network allocation details resource within the container;

[0047] Invoke the third-party container networking plugin that allocated the IP address to reclaim the Pod IP.

[0048] The container network environment retains the on-site container network plugin, releases the information corresponding to the IP in the container network resource address pool, the container network resource block, and the container service network resource address pool, and deletes the container network allocation details resource.

[0049] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0050] This invention extracts the commonalities of different container network solutions to define resource configuration, providing a foundation for unified network resources. By allocating detailed resources within the container network, the abstract layer resources become aware of IP resource usage. This enables cloud platforms to utilize this unified network resource to manage resources across different container network solutions. Attached Figure Description

[0051] Figure 1 This is a flowchart of the unified network resource management method based on a cloud platform according to the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0053] The definitions of terms used in this application are as follows:

[0054] NetworkDetail provides details about the container's network characteristics.

[0055] NetworkResource is a comprehensive list of container network resources;

[0056] HDArea is a network domain;

[0057] HDPool is a container network resource address pool;

[0058] HDBlock is used for container network resource segmentation;

[0059] HDSVC is a container service network resource address pool;

[0060] The Annotation field is for annotations;

[0061] The Hdsetup container networking plugin pre-configures container networking plugins for container networking environments.

[0062] HDPod provides details on network allocation within the container;

[0063] The Hdclose container networking plugin preserves the context of container networking environments.

[0064] Reference Figure 1 This invention provides a unified network resource management method based on a cloud platform, comprising:

[0065] Configure the NetworkDetail resource, and the cloud platform will read all container network schemes existing in the cluster through the NetworkDetail resource;

[0066] Specifically, configuring the NetworkDetail resource requires determining the characteristics of the container network scheme to be added, such as the network name, whether it supports IPv4 / IPv6 dual stack, and whether it supports cluster service discovery capabilities. The cloud platform can use this resource to read all container network schemes existing in the cluster.

[0067] Based on the NetworkDetail resource, configure a NetworkResource resource that corresponds one-to-one with the NetworkDetail resource;

[0068] Specifically, a NetworkResource resource is configured, which has a one-to-one relationship with a NetworkDetail resource of the same name. Cloud platform users and network administrators plan the IP resources belonging to each container network solution, and can also view the usage of these IP resources on the cloud platform.

[0069] Network domains are established based on NetworkResource resources, and IP resources in container networking solutions can be planned into network domains;

[0070] Specifically, an HDArea resource is created based on NetworkResource, which represents a network domain and can allocate a portion of the IP resources from all container networking schemes to this domain.

[0071] Establish an address pool based on IP resources in the network domain;

[0072] Specifically, selecting IP resources in HDArea to create address pools can be divided into two cases: fixed IP pools and non-fixed IP pools. Fixed IP pools and non-fixed IP pools are created. Non-fixed IP pools correspond to the IP address pools of third-party container network solutions. Fixed IP pools create single IP address pools for multiple third-party container network solutions. Therefore, IP address pool resources for third-party container network solutions in the network template are created simultaneously. Fixed IP pools are located in HDPool resources, and non-fixed IP pools are located in HDBlock resources and HDSVC resources.

[0073] Deploy cloud-native applications, configure container network templates and specify address pools, and allocate IP resources through chained calls;

[0074] Specifically, when deploying cloud-native applications, select the required container network template and specify the address pool in the Annotation of the configuration template. Kubernetes completes the allocation of IP resources through chained calls.

[0075] Invoke the hdsetup container networking plugin to update the field specifying the IP address pool in the third-party container networking scheme in the Annotation field;

[0076] Based on the IP address pool, the third-party container network plugin for IP allocation is invoked to obtain the Pod IP, that is, the IP resource allocation and management are carried out through the IP address management of the third-party plugin;

[0077] Based on the Pod IP and name, HDPod resources are created or updated. The hdclose container network plugin is invoked to preserve the configuration state of the corresponding network interface and the hdclose container network plugin in the HDPod resource, and a Veth virtual network device is created for service discovery under multiple network interfaces.

[0078] Remove the cloud-native application and the IP resources called by the container network template.

[0079] Specifically, delete cloud-native applications and delete IP resources that are chained together based on container network templates;

[0080] Call the hdsetup container network plugin to restore the configuration state of the corresponding network interface from the HDPod resources;

[0081] Call the third-party container networking plugin that assigned the IP address to reclaim the Pod's IP address;

[0082] Call the hdclose container network plugin to release the IP information in HDPool, HDBlock, and HDSVC resources, and delete the HDPod resource.

[0083] Example 1

[0084] A resource management method and system that separates control and business networks.

[0085] This example deploys three container networking plugins: Multus, Calico, and macvlan. Calico is a pure Layer 3 container networking solution, and in this example, Calico IPIP mode (tunneling) is selected for managing container communication. macvlan is a high-performance container networking solution based on kernel modules, and in this example, it is used for business container communication.

[0086] Configure the Calico network template and the macvlan network template. At this point, the total network resource configuration corresponding to the network characteristics will appear on the cloud platform. The platform network administrator can use this configuration to input all planned network resources (such as Calico 192.168.0.0 / 24, macvlan 10.0.0.0 / 24) into the cloud platform.

[0087] The resource administrator created an HDArea for Department X and allocated network resources to Department X: Calico 192.168.0.0 / 26, macvlan 10.0.0.0 / 26

[0088] Department administrators can create Calico address pool A (192.169.0.0 / 28) and macvlan address pool B (10.0.0.0 / 28) based on the remaining network resources in their department.

[0089] If the container in this department is a management container, then specify Calico address pool A; if the container is a business container, then specify macvlan address pool B.

[0090] Example 2

[0091] A method and system for managing macvlan network resources based on multiple network interface cards (NICs)

[0092] In this example, deploying Multus and macvlan container network plugins requires accessing specific business resources (such as databases) through a dedicated network device.

[0093] Configure the macvlan network template. At this point, the total network resource configuration corresponding to the network characteristics will appear on the cloud platform. The platform network administrator can use this configuration to input all planned network resources (such as macvlan10.0.0.0 / 24, 20.0.0.0 / 24) into the cloud platform.

[0094] The resource administrator created an HDArea for Department Y and allocated network resources to Department Y: macvlan 10.0.0.0 / 26, 20.0.0.0 / 26

[0095] Department administrators can create macvlan address pool C (10.0.0.0 / 28) and macvlan address pool D (20.0.0.0 / 28) based on the remaining network resources in their department.

[0096] Since accessing a certain database requires the 20.0.0.0 / 24 network segment, if containers in this department want to access this database, they need two network device interfaces. This is achieved by adding a network template to the Annotation field, and the address pool D of the second network device interface also needs to be specified. This can greatly improve communication security and increase communication bandwidth.

[0097] This application enables management containers to use tunneled container network communication while business containers use high-performance container network communication, saving high-performance network IP resources; and it does not require code-level modifications to the container network solution to achieve dedicated communication. That is, under the same container network solution, a separate network device interface can be added to complete access to specific services.

[0098] The present invention also includes a unified network resource management system based on a cloud platform, comprising:

[0099] The first configuration module is used to configure NetworkDetail (resources). The cloud platform reads all container network schemes existing in the cluster through NetworkDetail resources.

[0100] Specifically, configuring the NetworkDetail resource requires determining the characteristics of the container network scheme to be added, such as the network name, whether it supports IPv4 / IPv6 dual stack, and whether it supports cluster service discovery capabilities. The cloud platform can use this resource to read all container network schemes existing in the cluster.

[0101] The second configuration module is used to configure NetworkResource resources that correspond one-to-one with NetworkDetail resources based on NetworkDetail resources.

[0102] Specifically, a NetworkResource resource is configured, which has a one-to-one relationship with a NetworkDetail resource of the same name. Cloud platform users and network administrators plan the IP resources belonging to each container network solution, and can also view the usage of these IP resources on the cloud platform.

[0103] The network domain module is used to establish network domains based on NetworkResource, and IP resources in container networking solutions can be planned into network domains;

[0104] Specifically, an HDArea resource is created based on NetworkResource, which represents a network domain and can allocate a portion of the IP resources from all container networking schemes to this domain.

[0105] A module is established to create an address pool based on IP resources in a network domain.

[0106] Specifically, selecting IP resources in HDArea to create address pools can be divided into two cases: fixed IP pools and non-fixed IP pools. Fixed IP pools and non-fixed IP pools are created. Non-fixed IP pools correspond to the IP address pools of third-party container network solutions. Fixed IP pools create single IP address pools for multiple third-party container network solutions. Therefore, IP address pool resources for third-party container network solutions in the network template are created simultaneously. Fixed IP pools are located in HDPool resources, and non-fixed IP pools are located in HDBlock resources and HDSVC resources.

[0107] The management module is used to deploy cloud-native applications, configure container network templates and specify address pools, and complete the allocation of IP resources through chained calls; delete cloud-native applications and delete the IP resources called by the container network template.

[0108] Specifically, deploying cloud-native applications, configuring container network templates and specifying address pools, and allocating IP resources through chained calls include:

[0109] To deploy cloud-native applications, select the required container network template and specify the address pool in the Annotation of the configuration template.

[0110] Invoke the hdsetup container networking plugin to update the field specifying the IP address pool in the third-party container networking scheme in the Annotation field;

[0111] Based on the IP address pool, the third-party container networking plugin that allocates IPs is invoked to obtain the Pod IP;

[0112] Based on the Pod IP and name, create or update HDPod resources, call the hdclose container network plugin, retain the configuration state of the corresponding network interface card and the hdclose container network plugin in the HDPod resource, and create a Veth virtual network device for service discovery under multiple network interfaces.

[0113] Furthermore, removing cloud-native applications and deleting IP resources invoked by container network templates includes:

[0114] Remove cloud-native applications and delete IP resources that are chained together based on container network templates;

[0115] Call the hdsetup container network plugin to restore the configuration state of the corresponding network interface from the HDPod resources;

[0116] Call the third-party container networking plugin that assigned the IP address to reclaim the Pod's IP address;

[0117] Call the hdclose container network plugin to release the IP information in HDPool, HDBlock, and HDSVC resources, and delete the HDPod resource.

[0118] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A unified network resource management method based on a cloud platform, characterized in that, include: Configure container network feature details resource; the cloud platform reads all container network schemes existing in the cluster through the container network feature details resource. Based on the container network feature details resource, configure a master list of container network resources that corresponds one-to-one with the container network feature details resource; A network domain is established based on the overall list of container network resources, and the IP resources in the container network scheme can be planned into the network domain; An address pool is established based on the IP resources in the network domain; Deploy cloud-native applications, configure container network templates and specify the address pool, and complete the allocation of IP resources through chained calls; Delete the cloud-native application and delete the IP resource called by the container network template; Deploying cloud-native applications, configuring container network templates, specifying the address pool, and allocating IP resources through chained calls include: To deploy the cloud-native application, select the required container network template and specify the address pool in the Annotation of the configuration template. Invoke the container network environment pre-configuration container network plugin and update the field specifying the IP address pool in the third-party container network solution in the Annotation field; Based on the IP address pool, the third-party container networking plugin for assigning IPs is invoked to obtain the Pod IP; Based on the Pod IP and name, create or update the container network allocation details resource, call the container network environment preservation container network plugin, preserve the corresponding network card and combine the configuration state of the container network environment preservation container network plugin into the container network allocation details resource, and create a Veth virtual network device for service discovery under multiple network cards.

2. The unified network resource management method based on a cloud platform according to claim 1, characterized in that, Establishing an address pool based on IP resources in the network domain includes: Establish a fixed IP pool and a non-fixed IP pool; The non-fixed IP pool corresponds to the IP address pool of the third-party container network solution; The fixed IP pool creates a single IP address pool for multiple third-party container networking solutions.

3. The unified network resource management method based on a cloud platform according to claim 2, characterized in that, The fixed IP pool is located in the container network resource address pool, and the non-fixed IP pool is located in the container network resource block and the container service network resource address pool.

4. The unified network resource management method based on a cloud platform according to claim 3, characterized in that, Deleting the cloud-native application and deleting the IP resources invoked by the container network template include: Delete the cloud-native application and delete the IP resources that are called in a chain according to the container network template; Invoke the container network environment pre-configured container network plugin to restore the configuration state retained by the corresponding network card from the network allocation details resource within the container; Invoke the third-party container networking plugin that allocated the IP address to reclaim the PodIP; The container network environment retains the on-site container network plugin, releases the information corresponding to the IP in the container network resource address pool, the container network resource block, and the container service network resource address pool, and deletes the container network allocation details resource.

5. A unified network resource management system based on a cloud platform, characterized in that, include: The first configuration module is used to configure container network feature details resources. The cloud platform reads all container network schemes existing in the cluster through the container network feature details resources. The second configuration module is used to configure a master list of container network resources that corresponds one-to-one with the container network feature detail resources based on the container network feature detail resources; The network domain module is used to establish network domains based on the overall list of container network resources, and the IP resources in the container network scheme can be planned to be allocated to the network domains; Establishment module, used to establish an address pool based on IP resources in the network domain; The management module is used to deploy cloud-native applications, configure container network templates and specify the address pool, and complete the allocation of IP resources through chained calls; delete the cloud-native application and delete the IP resources called by the container network template; The process of deploying cloud-native applications, configuring container network templates, specifying the address pool, and allocating IP resources through chained calls includes: To deploy the cloud-native application, select the required container network template and specify the address pool in the Annotation of the configuration template. Invoke the container network environment pre-configuration container network plugin and update the field specifying the IP address pool in the third-party container network solution in the Annotation field; Based on the IP address pool, the third-party container networking plugin for assigning IPs is invoked to obtain the Pod IP; Based on the Pod IP and name, create or update the container network allocation details resource, call the container network environment preservation container network plugin, preserve the corresponding network card and combine the configuration state of the container network environment preservation container network plugin into the container network allocation details resource, and create a Veth virtual network device for service discovery under multiple network cards.

6. The unified network resource management system based on a cloud platform according to claim 5, characterized in that, Establishing an address pool based on IP resources in the network domain includes: Establish a fixed IP pool and a non-fixed IP pool; The non-fixed IP pool corresponds to the IP address pool of the third-party container network solution; The fixed IP pool creates a single IP address pool for multiple third-party container networking solutions.

7. The unified network resource management system based on a cloud platform according to claim 6, characterized in that, The fixed IP pool is located in the container network resource address pool, and the non-fixed IP pool is located in the container network resource block and the container service network resource address pool.

8. The unified network resource management system based on a cloud platform according to claim 7, characterized in that, Deleting the cloud-native application and deleting the IP resources invoked by the container network template include: Delete the cloud-native application and delete the IP resources that are called in a chain according to the container network template; Invoke the container network environment pre-configured container network plugin to restore the configuration state retained by the corresponding network card from the network allocation details resource within the container; Invoke the third-party container networking plugin that allocated the IP address to reclaim the PodIP; The container network environment retains the on-site container network plugin, releases the information corresponding to the IP in the container network resource address pool, the container network resource block, and the container service network resource address pool, and deletes the container network allocation details resource.

Citation Information

Patent Citations

  • Method for setting multiple IPs in Pod in Kubernetes

    CN111371627A

  • Container network management system

    CN114237812A

  • Fixed IP application publishing method based on container cloud platform

    CN114500523A