Method and apparatus for updating routing entries

By using management devices to convert network forwarding policies into routing entries in container cluster networks, the problem of low routing entry update efficiency in existing technologies is solved, enabling efficient routing entry configuration with online updates and uninterrupted service.

WO2026031784A1PCT designated stage Publication Date: 2026-02-12HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/101634
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-09
Filing Date
2025-06-18
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

In existing technologies, updating routing entries in container cluster networks is inefficient, requiring the deletion and rebuilding of pods, which leads to business interruptions and inefficiency.

Method used

By managing devices and obtaining network forwarding policies through a human-machine interface, these policies are converted into routing entries for communication objects in the container cluster network. This replaces the CNI plugin update method, enabling online updates of routing entries and avoiding the need to delete and rebuild pods.

Benefits of technology

It improves the efficiency of routing entry updates, ensures uninterrupted service, and enhances the efficiency of multi-network plane configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025101634_12022026_PF_FP_ABST
    Figure CN2025101634_12022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for updating routing entries, which are used for improving the efficiency of updating routing entries of containers. The method is applied to a management device, the management device is used to configure a container cluster network, and the method comprises: acquiring network forwarding policies of configuration objects from a human-computer interaction interface; converting each network forwarding policy into a routing entry of a communication object associated with a configuration object in the container cluster network during transmission of service traffic; and respectively updating the routing entry of each communication object to each communication object. A network forwarding policy of a first configuration object is used for indicating a network interface used by an end device of the first configuration object on a transmission link in a first direction during communication. A routing entry of a first communication object is used for indicating a container deployed in the first communication object, and address information of a next hop during communication in the first direction.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for updating routing entry

[0001] The present application claims priority to the Chinese patent application No. 202411098067.3, filed on August 9, 2024, and entitled "Method and device for updating routing entry", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the field of computer and, in particular, to a method and device for updating routing entry. BACKGROUND

[0003] In the development of virtualization technology, container virtualization technology has attracted more and more attention and application due to its lightweight, fast and efficient characteristics. Container virtualization is to package an application and all its runtime environments into an independent container, realizing the isolation of the application and the consistency of the environment. Each container runs on a shared operating system kernel, but has an independent file system, network and process space.

[0004] Communication between containers and the external network of the cluster network where the containers are located, and communication between containers is essential. However, the closed nature of container isolation makes it impossible for containers to communicate directly with each other and with the external network. Generally, routing entries are used to guide the communication of containers, and routing entries indicate the address information of the next hop to the destination device when the containers communicate. In the container cluster network, there are many situations that trigger changes to the routing entries of the containers. For example, the architecture of the cluster network where the containers are located changes (a new network interface is added), or a new network interface is added to the pod (the smallest unit of network resource scheduling where the containers are located) in order to implement the function of multiple network planes, or others.

[0005] Currently, the updating of routing entries in the container cluster network is usually implemented by a network interface (container network interface, CNI) plugin. However, the protocol followed by the CNI plugin results in the process of updating the routing entries requiring the deletion of the original pod and the reconstruction, which makes the updating of the routing entries inefficient. SUMMARY

[0006] The present application provides a method and device for updating routing entries to improve the updating efficiency of the routing entries of containers.

[0007] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0008] In a first aspect, a method for updating a routing entry is provided. The method can be applied to a management device, which can be used to configure a container cluster network. The method comprises: obtaining, from a human-computer interaction interface, a network forwarding policy of a configuration object; converting the network forwarding policy into a routing entry of a communication object associated with the configuration object when the configuration object transmits traffic in the container cluster network; and updating the routing entry of each communication object. The network forwarding policy of the first configuration object is used to indicate a network interface used by an end device on a transmission path of the first configuration object in a first direction when the end device communicates. The routing entry of the first communication object is used to indicate a container deployed in the first communication object and address information of a next hop when the first communication object communicates in the first direction.

[0009] In the scenario where the container cluster network changes and the routing entry needs to be updated, the method provided in the present application can issue the network forwarding policy of the configuration object under the human-computer interaction interface, and the management device can convert the network forwarding policy into the routing entry of the communication object (the communication object is associated with the configuration object when the configuration object transmits traffic) and update the routing entry. Instead of updating the routing entry by the CNI plug-in, the method does not need to be limited by the CNI protocol, does not need to delete and rebuild the pod, and does not interrupt the operation of the business, thereby realizing online updating of the routing entry without interrupting the operation of the business and improving the updating efficiency of the routing entry. Further, if the network forwarding policy is used to implement the configuration of multiple network planes, the pod does not need to be deleted and rebuilt, and the pod that is rebuilt does not need to be additionally provided with a network device (i.e., a network interface), thereby improving the configuration efficiency of the multiple network planes.

[0010] In a possible implementation, the communication object can be a node or a pod.

[0011] In another possible implementation, converting the network forwarding policy into the routing entry of the communication object associated with the configuration object when the configuration object transmits traffic in the container cluster network can be specifically implemented as follows: according to the network interface indicated by the network forwarding policy and the address information corresponding to the configuration object, a path between the end device and the communication object is determined according to a routing protocol, and the routing entry of the end device and the communication object is generated according to the path. The network forwarding policy is converted into the routing entry. Since the network forwarding policy indicates the latest configuration of the network by the user, the routing entry generated according to the network forwarding policy can guide the container to accurately transmit traffic under the latest network architecture.

[0012] In another possible implementation, the configuration object is a network plane, and a network plane is a path and components on the path in a cluster network for transmitting a type of service traffic, and the components include nodes. The communication object associated with the first network plane when the first network plane transmits the service traffic in the container cluster network includes the nodes included in the first network plane. The network forwarding policy of the first network plane includes an identifier of the first network plane, a first direction, and an identifier of a first network interface. The network forwarding policy of the first network plane is used to instruct the first network plane to use the first network interface on an end device in the communication in the first direction to transmit the service traffic. The first network plane is any network plane in the container cluster network. The above conversion of the network forwarding policy of the first network plane into the routing entry of the communication object associated with the first network plane when the first network plane transmits the service traffic in the container cluster network can be implemented as follows: the nodes included in the first network plane are determined according to the identifier of the first network plane. The node where the first network interface is located is taken as the end device of the first network plane, and the path between the end device and other nodes in the first network plane through the first network interface is determined according to a routing protocol; and the routing entry of the nodes included in the first network plane is generated according to the path. In this implementation, the content of the network plane is configured through the network forwarding policy, which realizes online and efficient configuration of the network plane, and the routing entry is updated based on the network plane, which realizes efficient updating of the routing entry. Moreover, the network forwarding policy of different network planes is converted into the routing entry of the corresponding nodes, so that in different network planes, the operation of the management device on a single network plane does not affect the operation of other network planes and the service traffic forwarding of other network planes.

[0013] In another possible implementation, the management device records the range of network segment information corresponding to the identifier of the network plane, and the nodes included in the first network plane are determined according to the identifier of the first network plane, which can be implemented as follows: the range of network segment information corresponding to the identifier of the first network plane is determined. The nodes whose address information is in the range of network segment information are taken as the nodes in the first network plane.

[0014] In another possible implementation, the management device records the correspondence between the identifier of the network plane and the nodes included in the network plane, and the nodes included in the first network plane are determined according to the identifier of the first network plane, which can be implemented as follows: the node corresponding to the identifier of the first network plane in the correspondence is determined as the node in the first network plane according to the identifier of the first network plane.

[0015] In another possible implementation, the configuration object is a pod. The network forwarding policy of a first pod includes a first pod identifier, a first direction, and an identifier of a second network interface, and is used to instruct the first pod to transmit service traffic in the first direction using the second network interface on a node where the first pod is located. The first pod is any pod in a container cluster network. The communication object associated with the first pod when the first pod transmits service traffic in the container cluster network includes a pod other than the first pod in the container cluster network. The network forwarding policy of the first pod is converted into a routing entry of the communication object associated with the first pod when the first pod transmits service traffic in the container cluster network, and the conversion can be implemented as follows: the node where the second network interface is located is taken as an end device, and the end device is the node where the first pod is located. According to a routing protocol, a path between the first pod and other pods in the cluster network via the second network interface of the end device is determined, and routing entries of the pods in the cluster network are generated according to the path. In this implementation, the content of the pod is configured through the network forwarding policy, and the pod is configured online and efficiently, and the routing entries are updated efficiently based on the pod.

[0016] In another possible implementation, the configuration object is a pod. The network forwarding policy of a second pod includes a second pod identifier, a first direction, and an identifier of a third network interface, and is used to instruct the second pod to transmit service traffic in the first direction using the third network interface on a node where the second pod is located. The second pod is any pod in a container cluster network. The communication object associated with the second pod when the second pod transmits service traffic in the container cluster network includes a node other than the node where the second pod is located in the container cluster network. The network forwarding policy of the second pod is converted into a routing entry of the communication object associated with the second pod when the second pod transmits service traffic in the container cluster network, and the conversion can be implemented as follows: the node where the third network interface is located is taken as an end device, a path between the end device and other nodes in the cluster network via the third network interface is determined according to a routing protocol, and routing entries of the nodes in the cluster network are generated according to the path. In this implementation, the content of the pod is configured through the network forwarding policy, and the pod is configured online and efficiently, and the routing entries are updated efficiently based on the nodes other than the node where the pod is located in the container cluster network, and the routing entries are updated efficiently.

[0017] In another possible implementation, the method for updating routing entries further includes: outputting a prompt message in a human-computer interaction interface if the routing entries are successfully updated for each communication object. The prompt message is used to indicate that the routing entries are successfully updated. When the routing entries of the communication objects are successfully updated, the prompt message in the human-computer interaction interface is used to timely inform the user, and the user experience is improved.

[0018] In another possible implementation, the communication object is a node, and the routing entry in the node is stored in the node and outside the pod. By storing the generated routing entry at the node level in the node and outside the pod, the traditional routing entry update following the CNI specification is broken, so that when the routing entry is adjusted, the pod does not need to be restarted, and the forwarding and transmission of service traffic are not interrupted, and the update efficiency of the routing entry is improved.

[0019] In another possible implementation, the communication object is a pod, and the routing entry in the pod is stored in the pod and outside the container. By storing the generated routing entry at the pod level in the pod and outside the container, the traditional routing entry update following the CNI specification is broken, so that when the routing entry is adjusted, the pod does not need to be restarted, and the forwarding and transmission of service traffic are not interrupted, and the update efficiency of the routing entry is improved.

[0020] In another possible implementation, the human-computer interaction interface can be in the form of a browser. By providing the human-computer interaction interface in the form of a browser, the operation requirements of the user in the process of updating the routing entry are reduced.

[0021] In another possible implementation, the routing protocol includes a routing information protocol (RIP) or an open shortest path first (OSPF).

[0022] In a second aspect, an apparatus for updating a routing entry is provided. The apparatus can be applied to a management device configured to configure a container cluster network. The apparatus for updating the routing entry includes an obtaining module, a conversion module, and an updating module. Wherein:

[0023] The obtaining module is configured to obtain, from a human-computer interaction interface, a network forwarding policy of a configuration object. The network forwarding policy of the first configuration object is used to indicate a network interface used by an end device on a transmission path in a first direction when communicating.

[0024] The conversion module is configured to convert the network forwarding policy into a routing entry of a communication object associated with the configuration object when transmitting service traffic in the container cluster network. The routing entry of the first communication object is used to indicate address information of a next hop of a container deployed in the first communication object when communicating in the first direction.

[0025] The updating module is configured to update the routing entry of each communication object to each communication object, respectively.

[0026] In a possible implementation, the communication object can be a node or a pod.

[0027] In a possible implementation, the conversion module is specifically configured to: according to the address information corresponding to the network forwarding policy indicated by the network interface and the configuration object, generate a routing entry between the communication object associated with the configuration object when the end device and the container cluster network transmit the service traffic according to a routing protocol.

[0028] In another possible implementation, the configuration object is a network plane, and one network plane is a path and components on the path for transmitting a type of service traffic in the cluster network, and the components include nodes. The communication object associated with the first network plane when the first network plane transmits the service traffic in the container cluster network includes: the nodes included in the first network plane. The network forwarding policy of the first network plane includes: an identifier of the first network plane, a first direction, and an identifier of the first network interface. The conversion module is specifically configured to: determine the nodes included in the first network plane according to the identifier of the first network plane. Take the node where the first network interface is located as the end device of the first network plane. Determine the path between the end device and other nodes in the first network plane through the first network interface according to a routing protocol, and generate the routing entry of the nodes included in the first network plane according to the path.

[0029] In another possible implementation, the management device records the network segment information range corresponding to the identifier of the network plane, and the conversion module is further configured to determine the network segment information range corresponding to the identifier of the first network plane. Take the nodes whose address information is in the network segment information range as the nodes in the first network plane.

[0030] In another possible implementation, the management device records the correspondence between the identifier of the network plane and the nodes included in the network plane, and the conversion module is further configured to: according to the identifier of the first network plane, determine the node corresponding to the identifier of the first network plane in the correspondence as the node in the first network plane.

[0031] In another possible implementation, the configuration object is a pod. The network forwarding policy of the first pod includes: an identifier of the first pod, a first direction, and an identifier of a second network interface. The network forwarding policy of the first pod is used to indicate that the first pod transmits the service traffic in the first direction by using the second network interface on the node where the first pod is located. The first pod is any pod in the container cluster network. The communication object associated with the first pod when the first pod transmits the service traffic in the container cluster network includes: the pods other than the first pod in the container cluster network. The conversion module is specifically configured to: take the node where the second network interface is located as the end device. The end device is the node where the first pod is located. Determine the path between the first pod and other pods in the cluster network through the second network interface according to a routing protocol, and generate the routing entry of each pod in the cluster network according to the path.

[0032] In another possible implementation, the configuration object is a pod. The network forwarding policy of the second pod includes: a second pod identifier, a first direction, and an identifier of a third network interface. The network forwarding policy of the second pod is used to instruct the second pod to transmit traffic in the first direction using the third network interface on a node where the second pod is located. The second pod is any pod in a container cluster network. When the second pod transmits traffic in the container cluster network, a communication object associated with the second pod includes: a node in the container cluster network other than the node where the second pod is located. The conversion module is specifically configured to: take the node where the third network interface is located as an end device, determine a path between the end device and other nodes in the cluster network through the third network interface according to a routing protocol, and generate routing entries of each node in the cluster network according to the path.

[0033] In another possible implementation, the device for updating the routing entry further includes an output module configured to output a prompt message on a human-computer interaction interface if the routing entry is successfully updated for each communication object. The prompt message is used to indicate that the routing entry is successfully updated.

[0034] In another possible implementation, the communication object is a node, and the routing entry in the node can be stored in the node and outside a pod. The communication object is a pod, and the routing entry in the pod can be stored in the pod and outside a container.

[0035] In another possible implementation, the human-computer interaction interface can be in the form of a browser.

[0036] In another possible implementation, the routing protocol can include: a RIP protocol, or an OSPF protocol.

[0037] In a third aspect, a computing device is provided, which can include: a processor and an interface circuit. The interface circuit is configured to receive computer execution instructions and transmit the computer execution instructions to the processor. The processor is configured to execute the computer execution instructions to enable the management device to perform the method described in the first aspect or any possible implementation of the first aspect.

[0038] In a fourth aspect, a computer readable storage medium is provided, which stores instructions. When the instructions are executed on a computer, the computer is enabled to perform the method in the first aspect or any possible implementation of the first aspect.

[0039] In a fifth aspect, a computer program product is provided, which stores instructions. When the instructions are executed on a computer, the computer is enabled to perform the method in the first aspect or any possible implementation of the first aspect.

[0040] In a sixth aspect, a chip is provided, which can include a memory and a processor, the memory is configured to store a program, when the program is executed on the processor, the processor is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0041] In a seventh aspect, a device for updating a routing entry is provided, which includes a processor and an interface circuit. The interface circuit is configured to receive computer-executed instructions and transmit the computer-executed instructions to the processor. The processor is configured to execute the computer-executed instructions to cause the device for updating a routing entry to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0042] In an eighth aspect, a system for updating a routing entry is provided, which includes a plurality of servers, and each server includes a processor and a memory. The processor is configured to execute instructions stored in the memory to cause the server to execute the method in the first aspect or any possible implementation manner of the first aspect.

[0043] It should be noted that the various possible implementation manners of any one of the above aspects can be combined as long as the schemes are not contradictory. BRIEF DESCRIPTION OF DRAWINGS

[0044] FIG. 1 is a schematic diagram of a communication process between a container and an external network and between a container and an internal network in a container cluster;

[0045] FIG. 2 is a schematic diagram of a process in which a CNI plug-in creates a pod network interface;

[0046] FIG. 3 is a schematic diagram of a process in which a pod network interface is deleted;

[0047] FIG. 4 is a schematic diagram of a process in which a pod network interface is modified;

[0048] FIG. 5 is a schematic diagram of a method for adjusting a network configuration and a routing entry according to the prior art;

[0049] FIG. 6 is a schematic diagram of a container cluster network according to an embodiment of the present application;

[0050] FIG. 7 is a schematic diagram of a method for updating a routing entry according to an embodiment of the present application;

[0051] FIG. 8 is a schematic diagram of a human-computer interaction interface according to an embodiment of the present application;

[0052] FIG. 9 is a schematic diagram of another method for updating a routing entry according to an embodiment of the present application;

[0053] FIG. 10 is a schematic diagram of still another method for updating a routing entry according to an embodiment of the present application;

[0054] FIG. 11 is a schematic diagram of still another method for updating a routing entry according to an embodiment of the present application;

[0055] FIG. 12 is a flowchart of a method for updating a routing entry according to an embodiment of the present application;

[0056] FIG. 13 is a schematic diagram of a Kubernetes system architecture according to an embodiment of the present application;

[0057] FIG. 14 is a schematic diagram of a process for updating a routing entry by a device according to an embodiment of the present application;

[0058] FIG. 15 is a flowchart of a method for updating a routing entry according to an embodiment of the present application;

[0059] FIG. 16 is a schematic diagram of a service traffic transmission behavior according to an embodiment of the present application;

[0060] FIG. 17 is a schematic diagram of a device for updating a routing entry according to an embodiment of the present application;

[0061] FIG. 18 is a schematic diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0062] The terms “first,” “second,” and the like in the description and in the claims of the present application and in the above description of the drawings are used for distinguishing between similar objects and are not necessarily used to describe a sequence or an order. It is understood that the data used with “first,” “second,” etc. can be interchangeable such that the embodiments described herein can operate in other sequences than depicted or described herein. In addition, the terms “first,” “second,” etc. are used herein solely to describe the naming of the elements and do not foreclose different numbering of the elements from that depicted or described herein. In other words, a “second” element in one embodiment can become a “first” element in another embodiment. The terms “first,” “second,” etc. are used to identify and distinguish elements in the drawing figures and are not necessarily used to describe a sequence or an order.

[0063] In this application specification and claims, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The naming or numbering of steps in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The division of units in this application is a logical division; in practical applications, other division methods may be used. For example, multiple units may be combined or integrated into another system, or some features may be omitted or not performed. Furthermore, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interface, and the indirect coupling or communication connection between units may be electrical or other similar forms, none of which are limited in this application. Furthermore, the unit or sub-unit described as a separate component may or may not be physically separated, may or may not be a physical unit, or may be distributed among multiple circuit units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this application.

[0064] It should be understood that the terminology used in the description of the various examples described in this application and the claims is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0065] It should also be understood that the term "and / or" as used in this specification and claims refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes a relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0066] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0067] It should also be understood that the terms "comprises", "comprising", "includes", "including", "comprise", "comprising", "includes" and / or "comprising" when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0068] It should also be understood that the term "if" can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the stated condition or event]" or "in response to detecting [the stated condition or event]", depending on the context.

[0069] It should be understood that all references made throughout this specification to "one embodiment", "an embodiment", "one possible implementation" mean that a particular feature, structure, or characteristic being described is included in at least one embodiment of the application. Therefore, appearances of "in one embodiment" or "in an embodiment" or "one possible implementation" at various places throughout the specification are not necessarily referring to the same embodiment or implementations. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0070] For the convenience of understanding, the terms involved in the present application are explained first.

[0071] Container cluster (container cluster network): refers to a group of instances of container runtime, which can be deployed on the same physical machine or virtual machine, or distributed on multiple physical machines and virtual machines, forming a cluster, and providing a running environment for containerized applications through the cooperative work of containers within the cluster.

[0072] Figure 1 describes a schematic diagram of the communication process of containers within a container cluster with external networks, containers with internal networks. As shown in Figure 1, the container cluster includes access zone node 3, node 1 and node 2. The access zone node 3 is deployed with a load balancer and multiple network interfaces (ethernet, eth), including eth0, eth1, eth2, eth3 and other network interfaces. Node 1 and node 2 are deployed with eth0 and eth1. The IP addresses of each network interface are different from each other. Pod 1 and pod 2 run on node 1, and pod 3 and pod 4 run on node 2 (the IP addresses of pods are different from each other). In the container cluster shown in Figure 1, the network located outside the container cluster and isolated from the internal network is referred to as the external network of the container cluster, including external network 1 and external network 2. The network that is interconnected within the container cluster is the internal network of the container cluster. The internal network can include, but is not limited to, container networks and host networks.

[0073] The container network is used to provide a communication network including pods with containers in nodes other than the node where the pod is located, pods with containers in other pods in the node where the pod is located, and pods with containers inside the pod. The host network refers to the way in which each node within the container cluster communicates and connects with each other.

[0074] Among them, the pod is the smallest scheduling unit in the container cluster, mainly used for resource allocation. The pod can be regarded as a container group, that is, multiple containers are scheduled (such as deployment, expansion or management) as a whole. The containers within the pod share the network, storage resources and operating system level namespace of the pod.

[0075] For the communication between the containers deployed in the container cluster shown in Figure 1, the containers share the network namespace of the host (i.e. node). That is, the communication between the pods within the node in the container cluster, the communication between the containers within the pod, and the communication between the pod and the node where the pod is located are all local communication, while the communication between different nodes directly uses the address information (such as IP address) of each node. In this way, the routing entry used to guide the communication between the containers can include the address information of the pod where the container is located, the address information of the node where the pod where the container is located is running, the address information of the destination node, and the address information of the pod in the destination node.

[0076] For the container deployed in the container cluster shown in Fig. 1, the communication with the external network of the container cluster is generally based on a load balancer. The load balancer is generally arranged in an access area node. The node where the container is located is connected to the load balancer through the network interface of the access area node, and the load balancer is connected to the external network from other network interfaces of the access area node. Therefore, the routing item used to guide the communication between the container and the external network indicates the address information of the next hop of the container to the external network, which includes the address information of the pod where the container is located, the address information of the node where the pod runs, and the address information of the access area node.

[0077] Before the communication process between the container and the container or between the container and the external network, the control plane performs network connectivity on the network on the path involved in the communication between the container and the container or between the container and the external network, which is performed by the CNI plug-in. The network connectivity process includes creating a network interface for the pod, generating corresponding routing items based on the architecture of the container network, and guiding the forwarding of business traffic (including the communication between the containers and the communication between the container and the external network).

[0078] During the construction of the container cluster, based on the business requirements, the management component of the container cluster can be requested to create a pod. The management component can be Kubernetes. The following describes the process of network connectivity in the container cluster by taking Kubernetes as an example.

[0079] When the Kubernetes receives the pod creation request, the Kubelet (a component in the Kubernetes as a management role) in the Kubernetes is responsible for creating the pod. During the creation of the pod, the Kubelet obtains the network configuration information of the pod from the API server, the network configuration information including the name and related parameters of the network plug-in, and the Kubelet calls the corresponding CNI plug-in to create the network interface of the pod according to the network configuration information.

[0080] As shown in Fig. 2, the process of creating the network interface of the pod by the CNI plug-in includes S201-S205.

[0081] S201, the Kubelet obtains the pod creation request from the API server, and the Kubelet creates the pod according to the pod creation request. The scheduler schedules the pod to a node.

[0082] S202, the Kubelet calls the Multus CNI cmdAdd interface.

[0083] S203, the Multus CNI calls the Dturbo CNI cmdAdd interface.

[0084] S204, Dturbo CNI generates the pod network namespace in the cmdAdd interface and records it in the pod configuration.

[0085] S205, Operator monitors the addition of the pod network namespace record in the pod configuration, and creates the corresponding network interface according to the obtained pod network interface definition.

[0086] After creating the network interface of the pod, the relevant routing entries are generated according to the routing protocol to guide the forwarding of business traffic. The path indicated by the routing entry for container communication to the destination device (node or pod or container) passes through the aforementioned created pod network interface.

[0087] In the running process of the container network, there are some scenarios (such as network communication problems of the pod) that require the network interface of the pod to be deleted or modified.

[0088] As shown in FIG. 3, the process of deleting the pod network interface includes S301-S305.

[0089] S301, Kubelet obtains a pod deletion request from APIserver, and Kubelet deletes the pod from the node according to the pod deletion request.

[0090] S302, Kubelet calls the Multus CN interface.

[0091] S303, Multus CNI calls the Dturbo CNI cmdDel interface.

[0092] S304, Dturbo CNI performs parameter verification in the cmdDel interface.

[0093] S305, Dturbo CNI deletes the pod network namespace record from the pod configuration in the cmdDel interface.

[0094] S306, Operator monitors that the network namespace record in the pod configuration is deleted from APIserver.

[0095] S307, Operator obtains the list of pod network interfaces.

[0096] S308, Operator deletes the corresponding network interface according to the list of pod network interfaces.

[0097] S309, Operator deletes the list of pod network interfaces from the pod configuration.

[0098] As shown in FIG. 4, the process of modifying the pod network interface includes:

[0099] S401. The Operator monitors that the network interface information in the pod configuration is modified according to the list-watch mechanism.

[0100] S402. The Operator deletes the pod network interface corresponding to the network interface information before modification.

[0101] S403. The Operator obtains the modified network interface information and creates a corresponding network interface according to the modified network interface information.

[0102] After deleting a certain pod and its network interface, the transmission path of the original network interface through the pod needs to be adjusted to use other network interfaces (original or reconstructed) of the pod to achieve the original transmission purpose. At this time, the routing entry needs to be updated so that the forwarding process of the business traffic guided by the routing entry does not pass through the deleted pod network interface, but passes through other pod network interfaces to achieve the original transmission purpose.

[0103] In the above container cluster, there are many operations to adjust the container cluster network, which will cause the scenario of routing entry change. For example, adjusting the container cluster network can be: adjusting the external network and / or internal network, such as in the single network port bandwidth traffic insufficient, isolating large data and business traffic business scenarios, and adding network interfaces of nodes. Adjusting the container cluster network can also be: generating multiple network interfaces for a pod by using a CNI plug-in to implement multiple network planes. These adjustment operations will make part of the business traffic transmission path pass through the added network interface of the node or the multiple network interfaces of the generated pod, causing the routing entry guiding the business traffic transmission to change. The change and adjustment of the routing entry are implemented according to the CNI plug-in, which is due to the function of the CNI plug-in itself to generate the routing entry. Moreover, the CNI plug-in complies with the CNI protocol, resulting in the process of updating the routing entry needing to be deleted and reconstructed after the original pod, so that the updating efficiency of the routing entry is not high.

[0104] Among them, a network plane is a path and component on the path in the container cluster network for transmitting a type of business traffic (implementing a business function), and the component includes a node. Illustratively, the network plane can be used to divide a network segment for use by a containerized application to carry the business of the containerized application. Illustratively, the network plane is mainly divided into a control plane and a data plane. The control plane is the part of the network that controls how data is forwarded, i.e., how data is sent from one place to another. The data plane is the process of actually forwarding data, also known as the forwarding plane. The two planes work together to enable the network to effectively transmit data.

[0105] In a more specific scenario, such as in Kubernetes, the network plane refers to the network components and mechanisms responsible for inter-container communication and accessing external networks in a cloud-native cluster. It is responsible for connecting containers and assigning IP addresses to them, enabling inter-container communication. The control plane is responsible for handling control information of the cluster, mainly including scheduling, managing, and expanding resources of the cluster. It is composed of a series of control nodes. Components on the control plane include API server, etcd, controller manager, and scheduler, etc. The data plane mainly processes data in the cluster, including containers, networks, storage, etc. It is composed of a series of worker nodes responsible for running containers. The worker nodes of the data plane run the container orchestration engine of Kubernetes, such as Kubelet, kube-proxy, etc.

[0106] In many scenarios of adjusting the container cluster network, the routing item used to guide the forwarding of business traffic will change accordingly because the business traffic passes through the adjusted container cluster network during forwarding. Whether in terms of adjusting the container cluster network (such as creating a network interface of a pod) or generating a routing item, a CNI plugin needs to be used. The CNI plugin complies with the CNI protocol, which stipulates that the two aspects mentioned above need to delete the original pod and rebuild the pod, resulting in low efficiency of updating the routing item.

[0107] For example, in a scenario where a single network interface bandwidth is not enough, a new node network interface is added, and multiple network planes are implemented, as shown in FIG. 5, an administrator manually adds eth1 to node 501 and issues a network change plan to an application interface server. The network change plan indicates the use of different CNI plugins (such as CNI plugin 1 and CNI plugin 2) for establishing different network planes (such as network plane A and network plane B). The application interface server forwards the network change plan to the node agent (Kubelet), which invokes CNI plugin 1 and CNI plugin 2 according to the network change plan. CNI plugin 1 generates eth0 for pod 1 in node 501, and CNI plugin 2 generates eth1 for pod 1 in node 501 (which belongs to the operation of the control plane identified by the dashed line in FIG. 5). Correspondingly, business traffic from network plane A is transmitted to node 502 through eth0 of pod 1, eth0 of node 501, and eth0 of node 502, and business traffic from network plane B is transmitted to node 502 through eth1 of pod 1, eth1 of node 501, and eth1 of node 502 (which belongs to the operation of the data plane identified by the solid line in FIG. 5). The establishment of the network interface of pod 2 in node 501 (operation of the control plane) and the transmission process of traffic of different network planes (operation of the data plane) refer to the previous description of pod 1, which will not be repeated here.

[0108] Based on this, the application provides a method for updating a routing entry. In a scenario where a container cluster network changes and the routing entry needs to be updated, a network forwarding policy related to a configuration object can be issued under a man-machine interactive interface, and the management device converts the network forwarding policy into a routing entry of a communication object (the communication object is associated with the configuration object when transmitting business traffic) and updates the routing entry. Instead of the updating method of updating the routing entry by the CNI plug-in, the method does not need to be limited by the CNI protocol, and thus the pod does not need to be deleted and reconstructed, and the business operation is not interrupted, so that the online updating of the routing entry without interrupting the business operation is realized, and the updating efficiency of the routing entry is improved. Further, if the network forwarding policy is used to implement the configuration of multiple network planes, the pod does not need to be deleted and reconstructed, and the network device (i.e., the network interface) needs to be added to the reconstructed pod, and thus the efficiency of the configuration of the multiple network planes is improved.

[0109] The method for updating the routing entry provided by the application can be applied to the container cluster network shown in FIG. 6. As shown in FIG. 6, the container cluster network includes an access zone node 601, a node 602, a node 603, and a management device 604. The network interface eth is deployed on the access zone node 601, the node 602, and the node 603. The pod is deployed in the node 602 and the node 603, and the container is deployed in the pod (not shown in FIG. 6). The container cluster network schedules in the granularity of the pod.

[0110] The management device 604 is configured to configure the container cluster network. The node 602 and the node 603 are connected to the external network of the container cluster network through the access zone node 601. The container in the container cluster network can directly use the address information of the pod where the container is located, the node where the container is located, and other nodes to directly communicate with the pod where the container is located, the node where the container is located, and other nodes.

[0111] It should be noted that the number of nodes included in the container cluster, the number of network interfaces arranged on each node, the number of pods included in each node, and the number of containers in each pod can be configured according to actual needs. FIG. 6 is only an example and is not a limitation on the size of the container cluster network.

[0112] The application embodiment provides a method for updating a routing entry, which can be applied to a management device configured to configure a container cluster network. For example, the management device can be the management device 604 shown in FIG. 6.

[0113] For example, the management device can be a component with core management authority in a Kubernetes (K8S system for short).

[0114] As described above, when an operation of adjusting the container cluster network needs to be performed, the routing entry needs to be changed accordingly to adapt to the network architecture. The method for updating the routing entry provided by the embodiments of the present application is applied to the updating process of the routing entry. The operation of adjusting the container cluster network includes but is not limited to the following processes: in a single network interface bandwidth traffic insufficient, isolation of large data and business traffic business scenarios, a node network interface needs to be added, or a plurality of network interfaces are generated for a pod by using a CNI plug-in to implement a multi-network plane.

[0115] Specifically, the operation of the container cluster network is mainly the operation of the configuration object (for example, a network plane or a pod). For the operation of different configuration objects, the process of updating the routing entry is the same. The embodiments of the present application take the operation process of a configuration object by a management device as an example to describe the updating process of the routing entry provided by the present application, and other descriptions are omitted.

[0116] As shown in FIG. 7, the method for updating the routing entry provided by the embodiments of the present application can include:

[0117] S701, the management device obtains the network forwarding policy of the configuration object from the human-computer interaction interface.

[0118] The configuration object is a component in the container cluster network that supports the configured network forwarding policy. For example, the configuration object can be a network plane, or a pod, or the like. Of course, the content of the configuration object can also be defined according to actual needs, which is not limited in the embodiments of the present application.

[0119] For example, the network forwarding policy of the first configuration object is used to indicate the network interface used by the end device on the transmission path in the first direction when communicating. The first configuration object is any configuration object in the container cluster network.

[0120] The end device is a node at both ends of a transmission path, including a source node or a destination node.

[0121] The first direction includes a sending direction or a receiving direction. The sending direction refers to that the first configuration object is sent as a source, and the receiving direction refers to that the first configuration object is received as a destination. For example, the first direction is identified as a source or a destination in the network forwarding policy of the first configuration object. The source indicates that the first direction is the direction of the business traffic flowing out of the first configuration object, which can also be regarded as the direction from the source node (i.e., the sending direction). The destination indicates that the first direction is the final direction of the business traffic flowing into the configuration object, which can also be regarded as the direction to the destination node (i.e., the receiving direction).

[0122] Exemplarily, the network forwarding policy of the first configuration object can include: an identification of the first configuration object, a first direction, an identification of the first network interface. The network forwarding policy is used to indicate that the first configuration object uses the first network interface to transmit traffic on a transmission path in the first direction.

[0123] The configuration object identification is used to uniquely indicate the configuration object, and the content and form of the identification can be configured according to actual needs, which is not limited in the present application. The network interface identification is used to uniquely indicate the network interface, and the content and form of the identification can be configured according to actual needs, which is not limited in the present application.

[0124] Exemplarily, the configuration object is a default-plane network plane, and the network forwarding policy thereof can be "from "default-plane" by "eth1". The network forwarding policy is used to indicate that the default-plane network plane is a source node on a transmission path in a sending direction, and eth1 is used in communication.

[0125] Further, the network forwarding policy can further include other content. For example, the network forwarding policy includes a product identification to which the configuration object belongs and the configuration object.

[0126] Further, the network forwarding policy further includes an effective state. The effective state is used to indicate whether the network forwarding policy is effective. Exemplarily, the effective state can include enabling or disabling, and enabling indicates that the network forwarding policy is effective. Disabling indicates that the network forwarding policy is invalid.

[0127] In a possible implementation, the man-machine interaction interface can be in the form of a browser, and the user can input the network forwarding policy on the man-machine interaction interface.

[0128] Exemplarily, the man-machine interaction interface is provided by the management device, or the man-machine interaction interface can be provided by a system in which the management device is located.

[0129] Exemplarily, FIG. 8 is a man-machine interaction interface provided by an embodiment of the present application. As shown in FIG. 8, the man-machine interaction interface includes a product name column (such as the first column in FIG. 8, including nce, manager), a configuration object identification column (such as the second column in FIG. 8, including a default-plane network plane, pod1, etc.), a traffic direction identification column (such as the third column in FIG. 8, including source or destination), a network interface identification column (such as the fourth column in FIG. 8, including eth0 or eth1), and an effective state column (such as the fifth column in FIG. 8, including enabling or disabling). One row in the interface shown in FIG. 8 is a network forwarding policy, and the user can operate the "edit" and / or "delete" button corresponding to the network forwarding policy to operate the network forwarding policy.

[0130] For example, in the first row of the network forwarding policy set by the nce product in FIG. 8, the network forwarding policy is in an enabled state, the "default-plane" is a network plane identifier, the "from" indicates that the traffic direction is the source, and the "by eth1" indicates that eth1 is used. According to the "from" and the "by eth1", it can be known that the source node on the transmission path in the sending direction of the default-plane network plane uses eth1 in communication. For the fourth row of the network forwarding policy set by the nce product in Table 1, it is indicated that the network forwarding policy is in an enabled state, the configured configuration object identifier is "pod1", the traffic flows out of "pod1", and is transmitted through eth1 of the source node (i.e., the node where pod1 is located).

[0131] S702, the management device converts the network forwarding policy into a routing item of a communication object associated with the configuration object in the container cluster network when the configuration object transmits traffic.

[0132] The communication object associated with the configuration object in the container cluster network when the configuration object transmits traffic refers to an object through which traffic is transmitted by the current configuration object. The granularity of the object can be the granularity of the configuration routing item.

[0133] For example, the communication object can be a node or a pod.

[0134] The routing item of the first communication object is used to indicate the address information of the next hop in the first direction communication of the container deployed in the first communication object.

[0135] For example, when the communication object is a node, the communication object associated with the first network plane in the container cluster network when the first network plane transmits traffic includes the node in the first network plane.

[0136] For example, when the communication object is a pod, the communication object associated with the first pod in the container cluster network when the first pod transmits traffic includes the pods other than the first pod in the container cluster network.

[0137] In a possible implementation, the management device converts the network forwarding policy into a routing item of a communication object associated with the configuration object in the container cluster network when the configuration object transmits traffic, including: the management device determines a path between the end device and the communication object associated with the configuration object in the container cluster network when the configuration object transmits traffic according to the network interface indicated by the network forwarding policy and the address information corresponding to the configuration object according to the routing protocol. Then, the routing item of the end device and the communication object is generated according to the path.

[0138] The routing protocol is used to determine the transmission path of the service traffic in the plurality of networks, and different routing protocols set different reference indexes to determine the transmission path of the service traffic. The reference indexes can include hop count, latency, quality of service, and the like.

[0139] The routing protocol described in the present application can be selected according to actual needs, and the embodiments of the present application are not limited thereto. For example, the routing protocol can include a RIP protocol or an OSPF protocol, or the like.

[0140] Optionally, the type of the configuration object is different, and the process of determining the path in S702 is also different. Specifically, the process can include, but is not limited to, the following cases:

[0141] Case 1: The configuration object is a network plane, and the communication object is a node or a pod.

[0142] The management device determines the end node (node or pod) of the network plane according to the routing protocol based on the communication objects (nodes or pods) included in the network plane, and the paths between the communication objects (nodes or pods) in the network plane. For details, refer to the process shown in FIG. 9 below, which will not be described here.

[0143] Case 2: The configuration object is a pod, and the communication object is a node.

[0144] The management device determines all nodes included in the container cluster network, and determines the node where the configuration object is located as the end device according to the routing protocol, and the paths between the nodes (excluding the node where the configuration object is located) in the network in the container cluster. For details, refer to the process shown in FIG. 10 below, which will not be described here.

[0145] Case 3: The configuration object is a pod, and the communication object is a pod.

[0146] The management device determines all pods included in the container cluster network, and determines the configuration object as the end device according to the routing protocol, and the paths between the pods (excluding the configuration object) in the network in the container cluster. For details, refer to the process shown in FIG. 11 below, which will not be described here.

[0147] Further, after obtaining the paths between the end device and the communication objects associated with the configuration object transmitting the service traffic in the container cluster network, the routing entries of the end device and the routing entries of the communication objects are obtained by splitting. The routing entry of a device (end device or communication object) is used to indicate the next hop address information of the device transmitting the traffic, and the routing entries of all devices on a path constitute the entire path.

[0148] S703, the management device updates the routing entries of the communication objects respectively.

[0149] In S702, the management device obtains the routing entry of the communication object, and in S703, the management device sends the obtained routing entry to the communication object to which the routing entry belongs.

[0150] In a possible implementation, the management device actively sends the routing entry of each communication object.

[0151] In another possible implementation, the communication object can periodically monitor whether the routing entry of the communication object is updated, and after determining that the routing entry of the communication object is changed, read the routing entry of the communication object from the management device and store the routing entry.

[0152] In a possible implementation, the communication object is a node, and the routing entry in the node can be stored in the node and outside the pod. The communication object is a pod, and the routing entry in the pod can be stored in the pod and outside the container.

[0153] Further, in the process of updating the routing entry in a communication object, the routing entry of the communication object generated in S702 can be stored in the communication object, and the routing entry stored in the communication object that conflicts with the newly stored routing entry can be deleted.

[0154] The scheme provided in the present application can send the network forwarding policy related to the configuration object under the man-machine interaction interface, and the management device can convert the network forwarding policy into the routing entry of the communication object (the communication object is associated with the configuration object when transmitting the business traffic) and update the routing entry. Instead of updating the routing entry by the CNI plug-in, the scheme does not need to be limited by the CNI protocol, and thus the pod does not need to be deleted and reconstructed, and the business operation is not interrupted, so that the online updating of the routing entry without interrupting the business operation is realized, and the updating efficiency of the routing entry is improved. Further, if the network forwarding policy is used to implement the configuration of multiple network planes, the pod does not need to be deleted and reconstructed, and the network device (i.e., the network interface) needs to be added to the reconstructed pod, and thus the efficiency of the configuration of the multiple network planes is improved.

[0155] In S702, the process of converting the network forwarding policy into the routing entry of the communication object associated with the configuration object when transmitting the business traffic in the container cluster network can be described as any one of FIGS. 9 to 11.

[0156] Corresponding to the case 1 in S702, the configuration object is a network plane, and the communication object associated with the first network plane when transmitting the business traffic in the container cluster network includes the node included in the first network plane. As shown in FIG. 9, the process of converting the network forwarding policy into the routing entry can include the processes of S7021 to S7023.

[0157] S7021, the management device determines the nodes included in the first network plane according to the identifier of the first network plane.

[0158] In a possible implementation, the management device records the network segment information range corresponding to the identifier of the network plane, and S7021 can include: determining the network segment information range corresponding to the identifier of the first network plane. The nodes with address information in the network segment information range are determined as the nodes in the first network plane.

[0159] In another possible implementation, the management device records the correspondence between the identifier of the network plane and the nodes included in the network plane, and S7021 can include: determining the nodes corresponding to the identifier of the first network plane in the correspondence as the nodes in the first network plane according to the identifier of the first network plane.

[0160] S7022, the management device determines the nodes included in the first network plane according to the identifier of the first network plane.

[0161] S7023, the management device generates the routing entries of the nodes included in the first network plane according to the path between the end device and the other nodes in the first network plane via the first network interface according to the routing protocol.

[0162] In S7023, the management device needs to determine the address information of the other nodes in the first network plane.

[0163] In a possible implementation, in S7023, the management device generates the optimal path between the end device and the other nodes in the first network plane according to the routing protocol.

[0164] The optimal path includes the optimal paths of different reference indexes obtained according to different routing protocols. For example, the reference indexes can include hop count, waiting time, quality of service, and the optimal path can include multiple paths with the least hop count, the least waiting time, and the best quality of service.

[0165] In another possible implementation, in S7023, the management device selects one optimal path from the optimal paths corresponding to different reference indexes, generates the routing entries of the nodes included in the first network plane according to the routing entries between the end device and the other nodes in the first network plane via the first network interface. The routing entries are used to indicate the address information of the next hop when the container deployed in the first network plane communicates in the direction of sending as a source or receiving as a destination.

[0166] For example, the network forwarding policy is from "default-plane" by "eth1", the communication object is node, and the container cluster network shown in FIG. 6 is described. It is assumed that the node 602 in FIG. 6 is the source node of the network plane default-plane, and the traffic of the node 602 about the default-plane flows out through the eth1 of the node 602. The communication object associated with the network plane default-plane when transmitting the traffic is the node 603. It is assumed that the destination device of the traffic of the default-plane is the node 603, and the traffic flows into the node 603 through the eth0 of the node 603 (the routing mechanism can be configured according to actual needs, and the content of the routing mechanism is not limited by the embodiments of the application). The management device generates the path of the node 602 to the node 603, and the routing entry of the node 602 obtained by splitting based on this is shown in Table 1, and the routing entry of the node 603 is shown in Table 2.

[0167] Table 1

[0168] Table 2

[0169] For the case where the configuration object is a network plane and the communication object is a pod, the difference between generating the routing entry of each pod and generating the path of each node for the case where the configuration object is a network plane and the communication object is a node is that: the former pod needs to connect the network interface of the node where the pod is located from the network interface of the pod itself, or connect the network interface of the pod in the node from the network interface of the node, and the rest of the process is the same as the latter, thereby realizing the communication between different pods. The content of generating the path of each pod for the case where the configuration object is a network plane and the communication object is a pod will not be described here.

[0170] Corresponding to the case 2 in S702, the configuration object is a pod, and the network forwarding policy of the first pod includes: the first pod identifier, the first direction, and the identifier of the second network interface. The communication object associated with the first pod when transmitting the traffic in the container cluster network includes: the pod other than the first pod in the container cluster network. As shown in FIG. 10, the process of converting the network forwarding policy into the routing entry can include S7021' to S7022'.

[0171] S7021', the management device takes the node where the second network interface is located as the end device.

[0172] The node where the second network interface is located is the node where the first pod runs.

[0173] S7022', the management device generates, according to a routing protocol, a path between the first pod and other pods in the container cluster network, and generates a routing entry of each pod in the container cluster network according to the path.

[0174] In S7022', the management device needs to determine address information of other pods in the container cluster network in advance.

[0175] For example, in Kubernetes, the address of all pods in the container cluster network can be obtained by using the command kubectl get pods--all-namespaces or kubectl get pods-o wide.

[0176] For example, the management device can record the correspondence between the identity and address information of all pods in the container cluster network, and in S7021', the address information corresponding to the identity of the first pod in the correspondence is determined as the address information of the first pod.

[0177] It should be noted that the process of S7022' in which the management device generates a path between the first pod and other pods in the container cluster network according to a routing protocol can refer to the way of generating a path between nodes in S7023, which will not be described here.

[0178] For example, the network forwarding policy is from "pod=pod2" by "eth1", the communication object is a pod, and the container cluster network shown in FIG. 6 is combined for illustration. Assuming that pod2 in node 602 in FIG. 6 is the source pod, and the traffic flows out through eth0 of pod2 and eth1 of node 602. The communication object associated with pod2 when transmitting traffic is pod3 in node 603. Assuming that the destination device of the traffic is pod3 in node 603, the traffic flows into pod3 through eth0 of node 603 and eth0 of pod3 (the routing mechanism can be configured according to actual needs, and the embodiments of the present application are not limited), the management device generates a path from pod2 to pod3, and the routing entry of pod2 obtained based on this is shown in Table 3, and the routing entry of pod3 is shown in Table 4.

[0179] Table 3

[0180] Table 4

[0181] Corresponding to case 3 in S702, the configuration object is a pod, and the network forwarding policy of the second pod includes: the second pod identifier, the first direction, and the identifier of the third network interface. The communication object associated with the second pod when transmitting the business traffic in the container cluster network includes: a node in the container cluster network other than the node where the second pod is located. As shown in FIG. 11, the process of converting the network forwarding policy into a routing entry can include:

[0182] S7021” the management device takes the node where the third network interface is located as an end device.

[0183] For example, in Kubernetes, the kubectl get nodes command can be used to query the information of all nodes in the container cluster network, which includes the identifier of the network interface deployed on the node. Based on this, the node where the third network interface is located can be determined.

[0184] S7022” the management device generates, according to a routing protocol, a path between the end device and other nodes in the cluster network through the third network interface, to obtain the routing entry of each node in the cluster network.

[0185] In S7022”, the management device needs to determine the address information of the other nodes in the container cluster network.

[0186] It should be noted that the process of generating the path between the end device and other nodes by the management device according to the routing protocol in S7022” can refer to the way of generating the path between nodes in S7023, which will not be described here.

[0187] For example, the network forwarding policy is from “pod=pod2” by “eth1”, and the communication object is a node, and in combination with the container cluster network shown in FIG. 6. Assuming that pod2 in node 602 in FIG. 6 is the source pod, and the traffic flows out through eth0 of pod2 and eth1 of node 602 (i.e., the source node). The communication object associated with pod2 when transmitting the business traffic is node 603. Assuming that the destination device of the business traffic is node 603, the traffic flows into node 603 through eth0 of node 603 (the routing mechanism can be configured according to actual needs, and the embodiments of the present application are not limited), and the management device generates a path from node 602 to node 603. Based on this, the routing entry of node 602 is as shown in Table 5, and the routing entry of node 603 is as shown in Table 6.

[0188] Table 5

[0189] Table 6

[0190] It should be noted that the above Table 1 to Table 6 only illustrate the routing item by way of example, and are not specific limitations on the content and form of the routing item.

[0191] Further, in order to timely inform the user about the result of whether the routing item of the communication object is successfully updated, and improve the user experience, FIG. 12 provides another method for updating the routing item. As shown in FIG. 12, after S703, the method further includes:

[0192] S704, if the routing item is successfully updated to each communication object, the management device outputs a first reminder message on the man-machine interaction interface.

[0193] The first reminder message is used to indicate that the routing item is successfully updated. The content and form of the first reminder message can be configured according to actual needs, and the embodiments of the present application are not limited.

[0194] For example, the first reminder message can be in the form of a pop-up window, and the content of the first reminder message can be: the configuration of the network forwarding policy has been completed.

[0195] Specifically, the management device can determine whether the routing item is successfully updated according to the specific way in which it transmits the routing item to the communication object.

[0196] In one possible implementation, in the scenario where the management device actively issues the routing item, whether the routing item is successfully updated can be determined by whether the communication object feeds back a response message.

[0197] For example, if a response message indicating that the routing item is successfully updated is received from a certain communication object within a first preset time period, it is determined that the routing item is successfully updated to the communication object. If no response message is received from a certain communication object within the first preset time period, it is determined that the routing item is not successfully updated to the communication object.

[0198] In another possible implementation, in the scenario where the communication object actively reads the routing item, whether the routing item is successfully updated can be determined by whether the communication object reads the routing item.

[0199] For example, if it is monitored that a certain communication object reads the routing item within a second preset time period, it is determined that the routing item is successfully updated to the communication object. If it is not monitored that a certain communication object reads the routing item within the second preset time period, it is determined that the routing item is not successfully updated to the communication object.

[0200] The first preset time period and the second preset time period can be configured according to actual needs. The first preset time period can be counted from the time when the routing item is issued, and the second preset time period can be counted from the time when the routing item is generated.

[0201] Of course, the specific implementation of whether the configuration management device determines whether the routing item is successfully updated to the communication object can be determined according to actual needs, and the embodiments of the present application are not limited thereto.

[0202] Further, if the management device determines that the routing item fails to be updated to any communication object, the management device can repeatedly perform the operation of S703 until the routing item is successfully updated.

[0203] Further, if the number of times of repeatedly performing S703 reaches a threshold value, or if there is still a case that the routing item fails to be updated to any communication object after a third preset time period, the management device can output a second reminder message on the human-computer interaction interface. The second reminder message is used to indicate that the routing item update fails.

[0204] Exemplarily, the technical solution of the present application can be applied to the Kubernetes system shown in FIG. 13, which includes a management device, a human-computer interaction interface, and a plurality of components. Among them, the management device can be a controller (Operator) in the Kubernetes system, and the plurality of components include but are not limited to: an application program interface server (API server), a storage module, and a sidecar component.

[0205] Among them, the application program interface server is a communication component of the Kubernetes system, which is used to receive the network forwarding policy issued by the user.

[0206] The storage module is used to store the routing item generated by the management device according to the network forwarding policy.

[0207] The sidecar component can be deployed in each communication object (that is, the communication object is a node, and the sidecar component is deployed in the node; the communication object is a pod, and the sidecar component is deployed in the pod), and the sidecar component acquires the notification issued by the system in real time based on the list-watch mechanism. When the routing item of a certain node in the storage module changes, the Kubernetes system automatically sends a change notification to the sidecar component in the node, and the sidecar component determines that the routing item of the node changes after receiving the change notification.

[0208] The method for updating the routing item provided by the present application will be described in detail below in combination with FIG. 13.

[0209] Suppose that the single network interface bandwidth traffic of the container cluster network is not enough, and the user expects to expand the host resources by increasing the network interface of the node. The user generates the routing item with the node as the granularity by configuring the network forwarding policy of the network plane. The Kubernetes system provides a human-computer interaction interface in the form of a browser. As shown in FIG. 14, another method for updating the routing item provided by the present application can include:

[0210] S1401, the user adds eth 1 for the end node of the default-plane network plane through manual operation.

[0211] S1402, the user sets the network forwarding policy of the default-plane network plane on the browser.

[0212] For example, the network forwarding policy can be: from "default-plane" by "eth1", which is used to describe the source node of the default-plane network plane on the transmission path in the sending direction, and eth1 is used in communication.

[0213] S1403, the browser receives the network forwarding policy and forwards it to the API Server.

[0214] S1404, the API Server detects whether the network forwarding policy has changed.

[0215] The API Server compares the current received network forwarding policy with the previously received network forwarding policy to determine whether the network forwarding policy has changed.

[0216] If the API Server determines that the current received network forwarding policy has changed, it sends a change notification to the Operator to make the Operator perform S1405.

[0217] If the API Server determines that the network forwarding policy has not changed, the process ends.

[0218] S1405, the Operator obtains the network forwarding policy.

[0219] Specifically, the Operator obtains the current network forwarding policy from the API Server based on the list-watch mechanism after receiving the change notification.

[0220] S1406, the Operator determines the network segment information range of the default-plane network plane according to the identifier of the network plane, and regards the nodes with address information within the network segment information range as nodes in the default-plane network plane.

[0221] S1407, the Operator regards the node where eth1 is located in the network forwarding policy as the source node of the default-plane network plane.

[0222] S1408, the Operator determines the address information of the other nodes in the default-plane network plane except the source node.

[0223] S1409、Operator determines, based on the address information of the other nodes, a path between the source node and the other nodes in the default-plane network plane via eth1 according to a routing protocol, generates routing entries of the nodes included in the default-plane network plane according to the path, and stores the routing entries of the nodes in the storage module.

[0224] S1410、Operator issues a change notification to the sidecar component in the node.

[0225] In an example, the node that needs to update the routing entry can be a node whose routing entry has changed, or a node whose update of the routing entry has failed.

[0226] In an example, the node that needs to update the routing entry can be a node whose routing entry has changed, or a node whose update of the routing entry has failed.

[0227] In an example, the node that needs to update the routing entry can be a node whose routing entry has changed, or a node whose update of the routing entry has failed.

[0228] S1411、The sidecar component in the node receives the change notification and obtains the routing entry of the node from the storage module.

[0229] In an example, the sidecar component can obtain the routing entry of the node by calling an interface provided by the storage module.

[0230] S1412、The sidecar component writes the obtained routing entry into a routing table of the node.

[0231] S1413、Operator determines whether the update of the routing entry of each node is successful.

[0232] In an example, the process of determining whether the update of the routing entry is successful can refer to the process of S704, which will not be described herein.

[0233] If Operator determines that the update of the routing entry of each node is successful, S1414 is performed. If Operator determines that the update of the routing entry of any node has failed, Operator issues a change notification to the sidecar component in the node whose update of the routing entry has failed.

[0234] S1414、Operator sends an indication to the APIServer.

[0235] The indication is used to indicate that the update of the routing entry is successful.

[0236] S1415、The APIServer displays a prompt message through a browser.

[0237] The reminder message is used to indicate that the routing item update is successful.

[0238] Further, if the routing item update of any node still fails after the preset time period, the Operator sends a failure indication to the API Server, so that the API Server displays an alarm message through the browser, and the alarm message is used to remind that the routing item update fails this time.

[0239] Exemplarily, in the scenario of adding a network interface of a node while the bandwidth of a single network interface is not enough, and realizing multiple network planes, as shown in FIG. 15, in the present application, a user adds eth1 to node 501 through manual operation, and issues a network forwarding policy through a man-machine interface. An application program interface server receives the network forwarding policy and detects it. On the basis of finding that the network forwarding policy changes, the controller stores the routing item converted by the network forwarding policy to the storage module. Further, the sidecar component in the node acquires the routing item of the node in the storage module, and writes it into the routing table of the node. In this way, the business traffic from pod1 in node 501 is connected to eth0 of the node, eth0 of node 502 is connected to node 502 according to the corresponding routing item in the routing table, the business traffic from pod2 in node 501 is connected to eth1 of the node, eth1 of node 502 is connected to node 502 according to the corresponding routing item in the routing table. Compared with the scheme shown in FIG. 5, the CNI plug-in is used to generate multiple network interfaces for the pod to realize multiple network planes. The scheme shown in FIG. 15 of the present application does not need to create multiple network interfaces for the pod, but only uses one network interface of the pod and the routing item in the routing table to connect to different network planes. Moreover, by converting the network forwarding policy into the routing item, the routing item is used to guide the transmission of the business traffic, without deleting and rebuilding the pod as in the scheme shown in FIG. 5, which is limited by the CNI protocol, thereby improving the update efficiency of the routing item.

[0240] Similarly, it is assumed that the management device acquires multiple network forwarding policies, including the following two network forwarding policies:

[0241] Network forwarding policy a: from "default-plane" by "eth1".

[0242] Network forwarding policy b: from "bigdata-plane" by "eth0".

[0243] The management device performs the method for updating the routing entry provided in the embodiments of the present application, converts the network forwarding policy a and the network forwarding policy b into the routing entry of each node in the network plane default-plane and the network plane bigdata-plane respectively, and then updates to the routing table of the node. The process of converting the network forwarding policy into the routing entry and updating can refer to the description of the foregoing method embodiments, and will not be described here.

[0244] For example, assuming that a certain node belongs to the network plane default-plane and the network plane bigdata-plane, the traffic transmission scenario of the node is shown in FIG. 16. The routing entry of the node converted from the network forwarding policy a and the network forwarding policy b is stored in the routing table. As shown in FIG. 16, pod1 and pod2 are deployed in the node. The IP address of pod1 is 172.18.1.101, and pod1 is used to implement the network plane default-plane; the IP address of pod2 is 172.19.1.101, and pod2 is used to implement the network plane bigdata-plane.

[0245] After the network forwarding policy a and the network forwarding policy b are converted into the routing entry and updated to the node, the traffic transmission behavior can be viewed through the ip tule show command.

[0246] For example, the traffic transmission behavior viewed through the ip tule show command can be as follows:

[0247] ip rule show

[0248] 100:from 172.18.1.0 / 26tos lowdelay lookup 100prohibit

[0249] 110:from 172.19.1.0 / 26tos lowdelay lookup 110prohibit

[0250]

[0251] ip rule show table 100

[0252] 172.18.1.0 / 26via 192.168.1.101dev eth1 proto bird

[0253] ip rule show table 110

[0254] 172.19.1.0 / 26 via 192.168.2.101 dev eth0 proto bird

[0255] Based on the traffic transmission behavior, it can be seen that the final service behavior includes: service traffic from the 172.18.1.0 / 26 network segment (such as the IP address of pod1 in FIG. 16 is 172.18.1.101 belonging to the network segment) searching the routing table 100, the routing table 100 indicating that the service traffic of the network segment flows out from the eth1 of the node, that is, the default-plane traffic (the solid line in FIG. 16) is forwarded through eth1; service traffic from the 172.19.1.0 / 26 network segment (such as the IP address of pod2 in FIG. 16 is 172.19.1.101 belonging to the network segment) searching the routing table 110, the routing table 110 indicating that the service traffic of the network segment flows out from the eth0 of the node, that is, the bigdata-plane traffic (the dashed line in FIG. 16) is forwarded through eth0. By forwarding the service traffic of different network segments (that is, network planes) according to the routing entries from different network interfaces to other nodes, the mutual isolation of the traffic is realized, and the problem of bandwidth resource preemption of the container network is solved through the network forwarding strategy.

[0256] It can be understood that the device for updating routing entries in the embodiments of the present application can perform part or all of the steps in the embodiments of the present application, and these steps or operations are only examples, and the embodiments of the present application can also perform other operations or various modifications of the operations. In addition, each step can be executed in a different order according to the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application are executed.

[0257] In various embodiments of the present application, the terms and / or descriptions of different embodiments are consistent and can be mutually referred to if there is no special description and logical conflict, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0258] It can be understood that the method and / or steps realized by the device for updating routing entries in each of the above embodiments can also be realized by components (such as chips or circuits) that can be used for the device.

[0259] Alternatively, it can be understood that the apparatus for updating a routing entry comprises a hardware structure and / or a software module for performing the above functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0260] The embodiments of the present application can divide the apparatus for updating a routing entry according to the above-mentioned method embodiments, for example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. There can be another division manner in actual implementation.

[0261] For example, FIG. 17 shows a structural schematic diagram of an apparatus 170 for updating a routing entry. The apparatus 170 for updating a routing entry comprises an acquisition module 1701, a conversion module 1702 and an updating module 1703.

[0262] The acquisition module 1701 is configured to perform S701 in the processes of FIG. 7 and FIG. 12, the conversion module 1702 is configured to perform any one of S702 in the processes of FIG. 7 and FIG. 12, S7021-S7023 in the process of FIG. 9, S7021'-S7022' in the process of FIG. 10, S7021''-S7022'' in the process of FIG. 11, and the updating module 1703 is configured to perform S703 in the processes of FIG. 7 and FIG. 12. The apparatus 170 for updating a routing entry of the present application can further comprise an output module configured to perform S704 in the process of FIG. 12. All related contents of each step involved in the above-mentioned method embodiments can be cited to the functional description of the corresponding functional module, which will not be repeated here.

[0263] Optionally, the embodiments of the present application also provide a computing device (for example, the computing device can be a chip or a chip system), which comprises a processor for implementing the method in any of the method embodiments described above. In a possible design, the computing device further comprises a memory. The memory is used to save necessary program instructions and data, and the processor can invoke the program code stored in the memory to instruct the control device to execute the method in any of the method embodiments described above. Of course, the memory can also not be in the control device. In another possible design, the computing device further comprises an interface circuit, which is a code / data read-write interface circuit, and the interface circuit is used to receive computer execution instructions (the computer execution instructions are stored in the memory, which can be directly read from the memory or can pass through other devices) and transmit to the processor. When the computing device is a chip system, it can be composed of a chip or contain a chip and other discrete devices, and the embodiments of the present application do not make specific limitations hereon.

[0264] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or data storage device such as one or more servers, data centers, etc. integrated with one or more media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD) or semiconductor media (for example, solid state disk (SSD)) and the like. In the embodiments of the present application, the computer can include the device described above.

[0265] FIG. 18 is a schematic diagram of a hardware structure of a computing device according to an embodiment of the present application. As shown in FIG. 18, the computing device 180 can include a processor 1801, a memory 1802, and a communication interface 1803, and the various components are coupled together by a communication line 1804. It can be understood that the communication line 1804 is configured to realize the connection communication between the components. The communication line 1804 includes a data bus, a power supply bus, a control bus, and a status signal bus. However, for the purpose of clear illustration, all the buses are marked as the communication line 1804 in FIG. 18.

[0266] The processor 1801 is configured to execute the steps of the method according to any one of the preceding embodiments when running the computer program.

[0267] The memory 1802 is configured to store the computer program capable of running on the processor 1801.

[0268] The communication interface 1803 is configured to receive and send signals in the process of transceiving information with other external network elements.

[0269] It can be understood that the memory 1802 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DRRAM). The memory 1802 of the system and method described herein is intended to include, without being limited to, these and any other suitable types of memory.

[0270] The processor 1801 can be an integrated circuit chip having a processing capability for signals. In implementation, each step of the above method can be completed by integrated logic circuits of hardware in the processor 1801 or instructions in the form of software. The processor 1801 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor to execute, or be executed by a combination of hardware and software modules in the code processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register, or other mature storage medium in the art. The storage medium is located in the storage 1802, and the processor 1801 reads information in the storage 1802 and combines hardware to complete the steps of the above method.

[0271] It can be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing units can be implemented within one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.

[0272] For software implementation, the techniques described herein can be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes can be stored in memory and executed by processors. The memory can be implemented within the processors or external to the processors.

[0273] Optionally, as another embodiment, the processor 1801 is further configured to execute the steps of the method in any of the preceding embodiments when the computer program is run.

[0274] Optionally, the computer-executable instructions in the present application can also be referred to as application codes, which are not specifically limited in the present application.

[0275] In a specific implementation, as an embodiment, the processor 1801 can include one or more CPUs, such as CPU0 and CPU1 in FIG. 18.

[0276] It should be noted that FIG. 18 is only an example of a computing device, and does not limit the specific structure of the device.

[0277] As another form of the present embodiment, a computer-readable storage medium is provided, which stores instructions, and the instructions are executed to perform the method for updating a routing entry in the above method embodiments.

[0278] As another form of the present embodiment, a computer program product is provided, which includes instructions, and when the computer program product is run on a computer, the computer is caused to perform the method for updating a routing entry in the above method embodiments.

[0279] The embodiments of the present application further provide a chip system, which includes a processor for implementing the technical method of the embodiments of the present application. In a possible design, the chip system further includes a memory for storing necessary program instructions and / or data of the embodiments of the present application. In a possible design, the chip system further includes a memory for the processor to invoke an application code stored in the memory. The chip system can be composed of one or more chips, or can include chips and other discrete devices, which are not specifically limited in the embodiments of the present application.

[0280] As another form of the present embodiment, an electronic device is provided, which includes the above chip system.

[0281] It should be noted that the chip or chip system described in the present application does not limit the protocol followed by the chip, nor does it limit other (functional) chips used in conjunction with the chip, as long as the chip is used to implement any of the above method embodiments, which are within the protection scope of the present application.

[0282] The embodiments of the present application further provide a device for updating a routing entry, which includes a processor and an interface circuit. The interface circuit is configured to receive computer-executable instructions and transmit the computer-executable instructions to the processor. The processor is configured to execute the computer-executable instructions, so that the device for updating a routing entry performs any of the above method embodiments.

[0283] The embodiments of the present application further provide a system for updating a routing entry, comprising a plurality of servers, each server comprising a processor and a memory. The processor is configured to execute instructions stored in the memory to cause the server to perform any of the above method embodiments.

[0284] Although the present application is described in connection with various embodiments, it will be understood that the application is capable of further modifications within the spirit and scope of the application as described herein, which will become apparent to those skilled in the art from a review of the disclosure, which is to be understood to include all possible modifications and equivalents. In the claims, the term "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit can fulfil the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. The reference signs in the claims should not be construed as limiting the scope of the application.

[0285] Although the present application is described in connection with specific features and embodiments thereof, it is to be understood that other similar embodiments can be used and that certain modifications and changes can be made without departing from the spirit and scope of the application. Accordingly, the drawings and descriptions are to be regarded as illustrative in nature and not restrictive. The application is intended to cover any and all adaptations or variations of various embodiments of the present application including combinations of features of the various embodiments. It is intended to cover all changes and modifications of the application, including other applications met with in the art and targeted for markets currently known or those future developed. It is intended to cover in claims any and all existing or future products and processes that fall within the scope of the application. Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the application disclosed herein, modifications and / or equivalents can be made by those skilled in the art. Accordingly, the scope of the present application is not intended to be limited to the described embodiments but is to be accorded the full scope consistent with the claims set forth below.

Claims

1. A method of updating a routing entry, characterized by, The method comprises: obtaining a network forwarding policy of a configuration object from a human-computer interaction interface, the network forwarding policy of a first configuration object being used to indicate a network interface used by an end device of the first configuration object on a transmission path in a first direction when communicating; converting the network forwarding policy into a routing item of a communication object associated with the configuration object when transmitting business traffic in the container cluster network; wherein the routing item of a first communication object is used to indicate a container deployed in the first communication object and address information of a next hop when communicating in the first direction; updating the routing item of each communication object to each communication object respectively.

2. The method of claim 1, wherein, The conversion of the network forwarding policy into the routing item of the communication object associated with the configuration object when transmitting business traffic in the container cluster network comprises: determining a path between the end device and the communication object associated with the configuration object when transmitting business traffic in the container cluster network according to the network interface indicated by the network forwarding policy and address information corresponding to the configuration object according to a routing protocol; generating the routing item of the end device and the communication object according to the path.

3. The method according to claim 1 or 2, characterized in that, The configuration object is a network plane, one network plane is a path and components on the path for transmitting a type of business traffic in the cluster network, the components include nodes, the network forwarding policy of a first network plane comprises: an identifier of the first network plane, the first direction, and an identifier of a first network interface; The communication object associated with the first network plane when transmitting business traffic in the container cluster network comprises: nodes included in the first network plane; The conversion of the network forwarding policy of the first network plane into the routing item of the communication object associated with the first network plane when transmitting business traffic in the container cluster network comprises: determining the nodes included in the first network plane according to the identifier of the first network plane; regarding the node where the first network interface is located as the end device of the first network plane; determining a path between the end device and other nodes in the first network plane through the first network interface according to a routing protocol; generating the routing item of the nodes included in the first network plane according to the path.

4. The method according to claim 1 or 2, characterized in that, The configuration object is a pod, the network forwarding policy of a first pod comprises: an identifier of the first pod, the first direction, and an identifier of a second network interface; The communication object associated with the first pod when transmitting business traffic in the container cluster network comprises: pods other than the first pod in the container cluster network; The conversion of the network forwarding policy of the first pod into the routing item of the communication object associated with the first pod when transmitting business traffic in the container cluster network comprises: regarding the node where the second network interface is located as the end device; determining a path between the first pod and other pods in the cluster network through the second network interface according to a routing protocol; generating the routing item of each pod in the cluster network according to the path.

5. The method according to claim 1 or 2, characterized in that, The configuration object is a pod, and the network forwarding policy of the second pod comprises: the second pod identifier, the first direction, and an identifier of a third network interface; The communication object associated with the second pod when transmitting traffic in the container cluster network comprises: a node in the container cluster network other than the node where the second pod is located; The network forwarding policy of the second pod is converted into a routing entry of the communication object associated with the second pod when transmitting traffic in the container cluster network, comprising: The node where the third network interface is located is taken as an end device; According to a routing protocol, the path between the end device and other nodes in the cluster network through the third network interface is determined; According to the path, the routing entry of each node in the cluster network is generated.

6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: If the routing entry is successfully updated to each communication object, a prompt message is output on the human-computer interaction interface, and the prompt message is used to indicate that the routing entry is successfully updated.

7. The method according to any one of claims 1 to 6, characterized in that, The communication object is a node or a pod, and the routing entry in the node is stored in the node and outside the pod; the routing entry in the pod is stored in the pod and outside the container.

8. The method according to any one of claims 1 to 7, characterized in that, The human-computer interaction interface is in the form of a browser.

9. The method according to any one of claims 2-8, characterized in that, The routing protocol comprises: A routing information protocol (RIP) or an open shortest path first (OSPF) protocol.

10. An apparatus for updating a routing entry, the apparatus comprising: The device comprises: An acquisition module configured to acquire a network forwarding policy of a configuration object from a human-computer interaction interface, the network forwarding policy of a first configuration object being used to indicate a network interface used by an end device on a transmission path in a first direction when communicating; A conversion module configured to convert the network forwarding policy into a routing entry of a communication object associated with the configuration object when transmitting traffic in a container cluster network; wherein the routing entry of a first communication object is used to indicate address information of a next hop when a container deployed in the first communication object communicates in the first direction; An update module configured to update the routing entry of each communication object to the respective communication object.

11. A device for updating routing entries, characterized in that, The device for updating the routing entry comprises a processor and an interface circuit; The interface circuit is configured to receive computer execution instructions and transmit the computer execution instructions to the processor; The processor is configured to execute the computer execution instructions to enable the device for updating the routing entry to perform the method according to any one of claims 1-9.

12. A system for updating a routing entry, the system comprising: The server comprises a processor and a memory; The processor is configured to execute instructions stored in the memory to enable the server to perform the operation steps of the method according to any one of claims 1-9.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium has instructions stored thereon, and when the instructions are executed on the computer, the computer is enabled to perform the method according to any one of claims 1-9.

14. A computer program product, characterised in that, The computer-readable storage medium has instructions stored thereon, and when the instructions are executed on the computer, the computer is enabled to perform the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method and device for realizing multiple network planes of kubernetes container

    CN113127152A

  • Connection method and device, equipment and storage medium

    CN113342456A

  • Container communication method and system of multi-container network interface

    CN116633775A

  • Method for advertising availability of distributed gateway service and machines at host computer

    US20220038309A1

  • Containerized router with a disjoint data plane

    US20240031908A1