Routing control method, apparatus, device, and medium

By determining the node type and applying the corresponding routing update strategy in the Kubernetes cluster, the problem of the inability of cloud nodes and non-cloud nodes to communicate with each other in the existing technology is solved, realizing hybrid access and network communication, and improving the breadth of application scenarios and operation and maintenance efficiency.

CN122120200APending Publication Date: 2026-05-29BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2026-03-04
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The existing VPC routing controller in the Kubernetes cluster can only perform automatic routing management for nodes within the VPC network of the same cloud provider. It cannot support the identification and network access of other nodes outside the VPC network (such as self-built data center nodes, edge nodes, and nodes of other cloud providers), which limits the application scenarios.

Method used

A routing control method is provided, which determines the node type (cloud node or non-cloud node) of the target node, determines the corresponding routing update strategy based on the node type, and updates the network routing table to achieve mixed access of cloud nodes and non-cloud nodes, and manages the routing information of various types of nodes using different routing update strategies.

Benefits of technology

It enables hybrid access of cloud nodes and non-cloud nodes in the Kubernetes cluster of the container orchestration platform, improves the applicability of application scenarios, ensures smooth network communication between nodes, and reduces operation and maintenance complexity and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120200A_ABST
    Figure CN122120200A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a routing control method, device, equipment and medium. The routing control method comprises: in response to a target operation on a target node in a container orchestration platform k8s cluster, determining the node type of the target node, the node type comprising a cloud node and a non-cloud node, the cloud node being a node of a target cloud vendor in a virtual private network, and the non-cloud node being other nodes in the container orchestration platform k8s cluster except the cloud node; determining a target routing update strategy corresponding to the node type based on the node type; and updating target routing information in a network routing table based on the target routing update strategy, wherein the target routing information is routing information of the target node. Thus, different routing update strategies can be triggered for different node types, hybrid access of cloud nodes and non-cloud nodes is achieved, network communication between container groups running on the cloud nodes and the non-cloud nodes is achieved, and the use of application scenarios is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of network communication technology, and in particular to a routing control method, apparatus, device and medium. Background Technology

[0002] Currently, in managed container orchestration platform (Kubernetes, k8s) clusters, cloud vendors typically deploy Virtual Private Cloud (VPC) routing controller components to achieve automatic routing management between nodes and container pod networks. The VPC routing controller automatically synchronizes the Internet Protocol (IP) address range corresponding to the pods on each node in the k8s cluster to the VPC routing table of the cloud platform, enabling direct communication between container groups running on various nodes within the VPC.

[0003] However, the existing VPC routing controller in the Kubernetes cluster can only perform automatic routing management for nodes within the VPC network of the same cloud vendor. It cannot support the identification and network access of other nodes outside the VPC network (such as self-built data center nodes, edge nodes, and nodes of other cloud vendors), which limits the application scenarios. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a routing control method, apparatus, device, and medium.

[0005] A first aspect of this disclosure provides a routing control method, including: In response to a target operation on a target node in a container orchestration platform Kubernetes cluster, the node type of the target node is determined. The node type includes cloud nodes and non-cloud nodes. Cloud nodes are nodes of the target cloud vendor in a virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides cloud nodes. Determine the target route update strategy corresponding to the node type based on the node type; The target routing information in the network routing table is updated based on the target routing update strategy. The target routing information is the routing information of the target node. The network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

[0006] A second aspect of this disclosure provides a routing control device, comprising: The node type determination module is used to determine the node type of the target node in response to the target operation on the target node in the container orchestration platform Kubernetes cluster. The node type includes cloud nodes and non-cloud nodes. Cloud nodes are nodes of the target cloud vendor in the virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster other than cloud nodes. The route update strategy determination module is used to determine the target route update strategy corresponding to the node type based on the node type. The routing control module is used to update the target routing information in the network routing table based on the target routing update policy. The target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

[0007] A third aspect of this disclosure provides an electronic device, including: processor; Memory, used to store executable instructions; The processor is used to read executable instructions from memory and execute the executable instructions to implement the routing control method provided in the first aspect above.

[0008] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the routing control method provided in the first aspect.

[0009] A fifth aspect of this disclosure provides a computer program product comprising a computer program or instructions that, when executed by a processor, implement the routing control method of the first aspect described above.

[0010] The technical solution provided in this disclosure has the following advantages compared with the prior art: The routing control method, apparatus, device, and medium provided in this disclosure are capable of responding to a target operation on a target node in a container orchestration platform Kubernetes cluster, determining the node type of the target node, wherein the node type includes cloud nodes and non-cloud nodes, where cloud nodes are nodes of the target cloud vendor in a virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides cloud nodes. After determining the node type, a target routing update strategy corresponding to the node type is determined based on the node type; further, the target routing information in the network routing table is updated based on the target routing update strategy, wherein the target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster. Therefore, different routing update strategies can be adopted for different types of nodes, namely cloud nodes and non-cloud nodes, to update the network routing table. The routing information of cloud nodes and non-cloud nodes can be managed through a unified network routing table, and routing control can be performed based on the network routing table. This enables the container orchestration platform Kubernetes cluster to support mixed access of cloud nodes and non-cloud nodes at the same time, realizes network communication between container groups and each node, and further realizes communication between container groups running on each node. This solves the problem that existing Kubernetes clusters cannot support nodes other than cloud nodes, and also improves the versatility of application scenarios. Attached Figure Description

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

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a routing control method provided in an embodiment of this disclosure; Figure 2 This is a flowchart of a node type determination method provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a routing control device provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0016] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0017] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0019] Typically, in managed container orchestration platform (Kubernetes, k8s) clusters, cloud vendors usually deploy Virtual Private Cloud (VPC) routing controller components to achieve automatic routing management between nodes and container pod networks. The VPC routing controller automatically synchronizes the Internet Protocol (IP) address range corresponding to the pods of each node in the k8s cluster to the VPC routing table of the cloud platform, enabling direct communication between nodes within the VPC. For example, when a new node created by the cloud vendor's interface is added to the k8s cluster, the VPC routing controller reads the IP address range corresponding to the container group of that node and adds an entry to the VPC routing table, namely the target network segment of the node and the next-hop information corresponding to the node. The next-hop information corresponding to the node is set to the internal IP of the Elastic Network Interface (ENI) of the cloud instance where the node is located, so that the container groups running on each node within the VPC can communicate directly through the Layer 3 network.

[0020] However, this mechanism requires all nodes to be within the cloud vendor's VPC network. Nodes outside the cloud vendor's VPC network cannot be identified, thus preventing the generation of container group routing entries for other nodes. This leads to issues such as container group network connectivity problems between nodes within the VPC network and other nodes, scheduling failures, and service discovery failures. In other words, existing VPC routing controllers in Kubernetes clusters can only perform automatic routing management for nodes within the same cloud vendor's VPC network, and cannot support the identification and network access of nodes outside the VPC network (such as self-built data center nodes, edge nodes, and nodes from other cloud vendors), thus limiting application scenarios. To address this issue and meet the actual needs of users or enterprises in multi-cloud and hybrid deployment environments, this disclosure provides a routing control method, which is described below with reference to specific embodiments.

[0021] Figure 1 This is a flowchart of a routing control method provided in an embodiment of the present disclosure. The method can be executed by a routing control device, which can be implemented in software and / or hardware. The routing control device can be configured in an electronic device, such as a server, server cluster, or terminal, wherein the terminal specifically includes a mobile phone, computer, or tablet computer, etc.

[0022] like Figure 1 As shown, the routing control method provided in this embodiment includes the following steps.

[0023] S110, In response to a target operation on a target node in a Kubernetes cluster, determine the node type of the target node.

[0024] In this embodiment of the disclosure, the node types include cloud nodes and non-cloud nodes.

[0025] A cloud node can be understood as a node deployed by a target cloud provider in a virtual private network, that is, a physical or virtual server cluster node.

[0026] Non-cloud nodes can be understood as nodes in a Kubernetes (Kubernetes) cluster other than cloud nodes. For example, non-cloud nodes may include nodes from cloud vendors other than the target cloud vendor, self-built data center nodes, edge nodes, etc.

[0027] In this disclosed embodiment, a cloud vendor can be understood as a company or organization that provides cloud computing-related services to individuals, businesses, or organizations via the Internet. They utilize technologies such as distributed computing, virtualization, and automation to encapsulate computing resources (such as servers, storage, and networks), software tools, and platforms into services that can be invoked on demand, allowing users to obtain the necessary resources via the Internet without having to build their own infrastructure. Specifically, the target cloud vendor can be any existing cloud vendor, and no limitation is imposed herein.

[0028] In this embodiment of the disclosure, a target operation can be understood as an operation that modifies a target node. For example, a target operation may include one or more of the following: registration (creating a new node), deletion, and configuration modification.

[0029] Specifically, electronic devices can respond in real time to user operations on target nodes in the Kubernetes cluster of the container orchestration platform, determine the identification information of the target node based on the target operation, and then determine the node type corresponding to the target node based on the identification information of the target node.

[0030] S120. Determine the target route update strategy corresponding to the node type based on the node type.

[0031] In this embodiment, the target route update strategy is a strategy that matches the node type and is used to dynamically update or adjust the routing information of the nodes. This aims to optimize data transmission paths, improve network performance, and enhance reliability.

[0032] Specifically, after determining the node type corresponding to the target node, the electronic device can determine the target route update policy corresponding to the node type based on the preset correspondence between node types and route update policies, so that the target route update policy can better meet and adapt to the route information update of the target node.

[0033] S130. Update the target routing information in the network routing table based on the target routing update policy.

[0034] In this embodiment of the disclosure, the target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

[0035] In this embodiment of the disclosure, the routing information may include the IP address range of the container group pod in the node, the correspondence between the node and the container group, the next-hop routing information of the node, etc.

[0036] In this embodiment, the network routing table is a routing table set up in the target cloud vendor's virtual private cloud network. It can be understood as a routing table used for routing control between cloud nodes and non-cloud nodes. The network routing table includes the IP address ranges of container groups (pods) in both cloud and non-cloud nodes, as well as communication identification information between nodes. However, the methods for updating routing information in the network routing table differ between cloud nodes and non-cloud nodes.

[0037] Specifically, after determining the target route update policy, the electronic device can update the target route information corresponding to the target node in the network routing table based on the route update logic and route update method in the target route update policy, so as to ensure the validity, availability and consistency of the target route information corresponding to the target node.

[0038] In this embodiment of the disclosure, in response to a target operation on a target node in a container orchestration platform Kubernetes cluster, the node type of the target node can be determined. The node type includes cloud nodes and non-cloud nodes. Cloud nodes are nodes of the target cloud vendor in a virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides cloud nodes. After determining the node type, a target routing update strategy corresponding to the node type is determined. Further, the target routing information in the network routing table is updated based on the target routing update strategy. The target routing information is the routing information of the target node, and the network routing table includes routing information of at least some nodes in the container orchestration platform Kubernetes cluster. Therefore, different routing update strategies can be adopted for different types of nodes, namely cloud nodes and non-cloud nodes, to update the network routing table. The routing information of cloud nodes and non-cloud nodes can be managed through a unified network routing table, and routing control can be performed based on the network routing table. This enables the container orchestration platform Kubernetes cluster to support mixed access of cloud nodes and non-cloud nodes at the same time, realizes network communication between container groups and each node, and further realizes communication between container groups running on each node. This solves the problem that existing Kubernetes clusters cannot support nodes other than cloud nodes, and also improves the applicability of application scenarios.

[0039] Based on the above embodiments of this disclosure, the network routing table can be automatically updated through the routing update strategy, ensuring the consistency of routing information in the network routing table, and eliminating the need for manual configuration or updates, thus reducing labor costs.

[0040] In this embodiment of the disclosure, the electronic device can add identification information to the node for identifying the node type when registering the node, so that when responding to the target operation of the node, the node type can be determined according to the identification information, thereby improving the accuracy and efficiency of node type identification.

[0041] The following will combine Figure 2 The specific methods for determining node types are described in detail.

[0042] Figure 2 This is a flowchart of a node type determination method provided in an embodiment of this disclosure, such as... Figure 2 As shown, determining the node type of the target node can specifically include the following steps: S210. Obtain the identification information corresponding to the target node.

[0043] In this embodiment of the disclosure, the identification information can be understood as information used to identify the node type of the target node. Specifically, the identification information may include at least one of node label field information, node annotation field information, and extended field information corresponding to the node cloud vendor. For example, cloud nodes are labeled as "cloud", and non-cloud nodes are labeled as "external".

[0044] Specifically, the electronic device can respond to the target operation of the target node, obtain the node identification information of the target node, and obtain the identification information corresponding to the target node for identifying the node type from the preset database based on the node identification information.

[0045] S220. Determine the node type based on the identification information.

[0046] In this embodiment of the disclosure, after obtaining the identification information of the target node, the electronic device parses the identification information to obtain the parsed field, and determines the node type based on the parsed field.

[0047] In this embodiment, node types can be determined by adding identification information to nodes, improving the flexibility and efficiency of cluster management. The identification information allows for rapid identification of target node types, enhancing the accuracy and efficiency of node type recognition. Furthermore, the ability to classify nodes by identification information enables refined node management, improving the convenience of node management.

[0048] In some embodiments of this disclosure, determining the target route update strategy corresponding to the node type based on the node type may specifically include: when the node type is a cloud node, determining the target route update strategy as a first route update strategy, wherein the first route update strategy is to call the routing information management interface corresponding to the target cloud vendor to update the target route information in the network routing table.

[0049] In this embodiment of the disclosure, the routing information management interface can be understood as the interface through which the target cloud vendor manages the routing of nodes in its virtual private cloud network. That is, it is the interface for managing the routing of cloud nodes.

[0050] Specifically, updating the target routing information in the network routing table by calling the routing information management interface corresponding to the target cloud vendor can include: calling the routing information management interface corresponding to the target cloud vendor to obtain the target routing information of the target node; determining the target routing change information corresponding to the target node based on the target operation; and updating the target routing information in the network routing table through the routing information management interface corresponding to the target cloud vendor and the target routing change information.

[0051] In this embodiment of the disclosure, when the node type is a cloud node, the network routing table can be updated and managed through the routing information management interface of the target cloud vendor. This maintains the original routing control logic of the target cloud vendor, realizes automated network configuration synchronization, significantly improves operation and maintenance efficiency, routing control convenience and stability, and reduces operation and maintenance complexity.

[0052] In other embodiments of this disclosure, determining the target route update strategy corresponding to the node type based on the node type may specifically include: when the node type is a non-cloud node, determining the target route update strategy as a second route update strategy, wherein the second route update strategy is to obtain the IP address range and inter-node communication network identification information corresponding to the container group in the target node, and updating the target route information in the network routing table based on the IP address range and inter-node communication network identification information.

[0053] In this embodiment of the disclosure, the IP address range corresponding to the container group is the IP address range assigned to the container group. Specifically, a set of contiguous IP addresses is defined using Classless Inter-Domain Routing (CIDR) notation.

[0054] In this embodiment of the disclosure, the inter-node communication network identification information can be understood as network identification information used for communication between various nodes. For example, it may include network identification information for communication between cloud nodes and non-cloud nodes; it may also include network identification information for communication between non-cloud nodes and between cloud nodes, etc.

[0055] In this embodiment of the disclosure, updating the target routing information in the network routing table based on the IP address range and inter-node communication network identification information may specifically include: obtaining the target routing information; comparing the IP address range and inter-node communication network identification information with the target routing information to determine the routing change information; and updating the network routing table based on the routing change information.

[0056] Among them, route change information can be understood as route information that has changed.

[0057] In this embodiment, even when the node type is a non-cloud node, network communication between the container group and each node can be achieved through inter-node communication network identification information, thereby enabling network communication between container groups running on each node. This achieves the effect of simultaneously supporting network access for both cloud and non-cloud nodes, solving the problem of limited application scenarios and realizing the wide applicability of the application scenarios. Meanwhile, during the process of synchronizing routing information (i.e., updating the network routing table), by only synchronizing and updating changed routing information, update efficiency is improved, avoiding the resource waste caused by synchronizing and updating all routing information of the node during the update process.

[0058] In this embodiment of the disclosure, the inter-node communication network may include at least one of a network leased line, a target virtual tunnel network, and a virtual private network (VPN).

[0059] In some examples disclosed herein, when the inter-node communication network is a leased network line, the inter-node communication network identification information is the leased network line IP address. The leased network line is deployed between cloud nodes and non-cloud nodes to establish network communication between cloud nodes and non-cloud nodes. Among them, a network leased line can be understood as a physical or virtual private line established between cloud nodes and non-cloud nodes to provide a data transmission channel between cloud nodes and non-cloud nodes.

[0060] Network leased line IP addresses include cloud node-side gateway IP addresses and non-cloud node-side gateway IP addresses.

[0061] In this embodiment of the disclosure, network communication between cloud nodes and non-cloud nodes can be realized through a dedicated network line. That is, data transmission is carried out through an independent network line without going through the public Internet, avoiding risks such as interception and tampering, and improving the security and reliability of network communication.

[0062] In other instances of this disclosure, when the inter-node communication network is a target virtual tunnel network, the inter-node communication network identification information is a virtual tunnel network identifier, and the target virtual tunnel network is used to establish network communication between the nodes.

[0063] In this embodiment of the disclosure, the target virtual tunnel network can be an overlay network.

[0064] It should be noted that the specific implementation method for establishing a target virtual tunnel network between various nodes is similar to the existing method for establishing virtual tunnel networks, and the identifier of the virtual tunnel network is similar to the identifier of the existing tunnel network, so it will not be described in detail here.

[0065] In this embodiment of the disclosure, network communication of container groups in each node can be realized through virtual tunnel network identifiers, and routing information configuration of each node can be realized.

[0066] In some instances of this disclosure, when the inter-node communication network is a Virtual Private Network (VPN), the inter-node communication network identification information is the VPN tunnel endpoint identifier. The VPN is deployed on non-cloud nodes to establish network communication between non-cloud nodes and cloud nodes.

[0067] It should be noted that the specific implementation method for establishing a virtual private network on a non-cloud node is similar to the existing method of establishing a virtual private network (VPN). The VPN tunnel endpoint identifier is similar to the existing VPN identifier, so it will not be described in detail here.

[0068] In this embodiment of the disclosure, network communication between cloud nodes and non-cloud nodes can be realized in a variety of different ways, thereby realizing communication between container groups in cloud nodes and container groups between non-cloud nodes. While supporting network access for both cloud nodes and non-cloud nodes, the flexibility of network communication between various nodes is improved. By using a variety of different communication methods, the fault tolerance of the system is enhanced.

[0069] In this embodiment of the disclosure, after determining the node type of the target node, the routing control method may further include: when the node type is a non-cloud node and the inter-node communication network is a leased network line, controlling the proxy component corresponding to the target node to configure the routing information of the cloud node.

[0070] In this embodiment of the disclosure, the proxy component is deployed on the gateway device of the target node.

[0071] Configuring routing information for cloud nodes can be understood as pointing the next hop of the IP address range of container groups within the cloud node to the gateway address on the cloud node side of the leased network line. Simultaneously, it points the default route on non-cloud nodes to the non-cloud side gateway address of the leased network line.

[0072] For example, when a cloud node sends a first data packet to a non-cloud node, the first data packet is sent to the cloud node-side gateway of the network leased line through the cloud node-side gateway address. The cloud node-side gateway and the non-cloud node-side gateway communicate to send the first data packet to the container group or node corresponding to the first data packet on the non-cloud node side.

[0073] When a non-cloud node sends a second data packet to a cloud node, the second data packet is sent to the non-cloud node-side gateway address of the network leased line. The non-cloud node-side gateway and the cloud node-side gateway communicate to send the second data packet to the container group or node corresponding to the second data packet on the cloud node side.

[0074] In this embodiment of the disclosure, when the inter-node communication network is a dedicated network line, the routing information can be automatically configured by deploying a proxy component on the gateway device of the non-cloud node, thereby realizing the automatic configuration of the backhaul access route. This enables the non-cloud node to access the cloud node or the container group in the cloud node through backhaul, ensuring the bidirectional communication reachability between the cloud node and the non-cloud node.

[0075] Figure 3 This is a schematic diagram of the structure of a routing control device provided in an embodiment of this disclosure.

[0076] In this embodiment, the routing control device can be located within an electronic device and is understood as a functional module within the aforementioned electronic device. Specifically, the electronic device can be a server, a server cluster, or a terminal, wherein the terminal specifically includes mobile phones, computers, or tablet computers, etc., without limitation.

[0077] like Figure 3 As shown, the routing control device 300 may include a node type determination module 310, a route update policy determination module 320, and a routing control module 330.

[0078] The node type determination module 310 can be used to determine the node type of the target node in response to a target operation on a target node in a container orchestration platform Kubernetes cluster. The node type includes cloud nodes and non-cloud nodes. Cloud nodes are nodes of the target cloud vendor in a virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides cloud nodes. The route update strategy determination module 320 can be used to determine the target route update strategy corresponding to the node type based on the node type. The routing control module 330 can be used to update the target routing information in the network routing table based on the target routing update policy. The target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

[0079] In this embodiment of the disclosure, in response to a target operation on a target node in a container orchestration platform Kubernetes cluster, the node type of the target node can be determined. The node type includes cloud nodes and non-cloud nodes. Cloud nodes are nodes of the target cloud vendor in a virtual private network, and non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides cloud nodes. After determining the node type, a target routing update strategy corresponding to the node type is determined. Further, the target routing information in the network routing table is updated based on the target routing update strategy. The target routing information is the routing information of the target node, and the network routing table includes routing information of at least some nodes in the container orchestration platform Kubernetes cluster. Therefore, different routing update strategies can be adopted for different types of nodes, namely cloud nodes and non-cloud nodes, to update the network routing table. The routing information of cloud nodes and non-cloud nodes can be managed through a unified network routing table, and routing control can be performed based on the network routing table. This enables the container orchestration platform Kubernetes cluster to support mixed access of cloud nodes and non-cloud nodes at the same time, realizes network communication between container groups and each node, and further realizes communication between container groups running on each node. This solves the problem that existing Kubernetes clusters cannot support nodes other than cloud nodes, and also improves the versatility of application scenarios.

[0080] In some embodiments of this disclosure, the node type determination module 310 may be specifically used to obtain the identification information corresponding to the target node, the identification information including at least one of node tag field information, node annotation field information, and extended field information corresponding to the node cloud vendor; The node type is determined based on the identification information.

[0081] In some embodiments of this disclosure, the route update strategy determination module 320 can be specifically used to determine the target route update strategy as a first route update strategy when the node type is a cloud node. The first route update strategy is to call the route information management interface corresponding to the target cloud vendor to update the target route information in the network routing table.

[0082] In some embodiments of this disclosure, the routing update strategy determination module 320 may also be specifically used to determine the target routing update strategy as a second routing update strategy when the node type is a non-cloud node. The second routing update strategy is to obtain the IP address range and inter-node communication network identification information corresponding to the container group in the target node, and update the target routing information in the network routing table based on the IP address range and the inter-node communication network identification information.

[0083] In some embodiments of this disclosure, the route update strategy determination module 320 may also be specifically used to obtain the target route information; The IP address range and the inter-node communication network identification information are compared with the target routing information to determine the routing change information; The network routing table is updated based on the routing change information.

[0084] In some embodiments of this disclosure, the inter-node communication network includes at least one of a leased network, a target virtual tunnel network, and a virtual private network (VPN). When the inter-node communication network is a leased network line, the inter-node communication network identification information is the leased network line IP address. The leased network line is deployed between cloud nodes and non-cloud nodes to establish network communication between cloud nodes and non-cloud nodes. When the inter-node communication network is a target virtual tunnel network, the inter-node communication network identification information is a virtual tunnel network identifier, and the target virtual tunnel network is used to establish network communication between various nodes; When the inter-node communication network is a Virtual Private Network (VPN), the inter-node communication network identification information is a VPN tunnel endpoint identifier. The VPN is deployed on non-cloud nodes to establish network communication between non-cloud nodes and cloud nodes.

[0085] In some embodiments of this disclosure, the routing control device 300 may further include a routing configuration module.

[0086] The routing configuration module can be used to control the proxy component corresponding to the target node to configure the routing information of the cloud node after the node type of the target node is determined, in the case that the node type is a non-cloud node and the inter-node communication network is a leased network line. The proxy component is deployed on the gateway device of the target node.

[0087] It should be noted that, Figure 3 The routing control device 300 shown can execute the various steps in the above method embodiments and realize the various processes and effects in the above method embodiments, which will not be elaborated here.

[0088] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.

[0089] In this embodiment of the disclosure, Figure 4 The electronic devices shown can be servers, server clusters, or terminals. Terminals specifically include mobile phones, computers, or tablets, etc., without limitation.

[0090] like Figure 4As shown, the electronic device may include a processor 410 and a memory 420 storing computer program instructions.

[0091] Specifically, the processor 410 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this disclosure.

[0092] Memory 420 may include a large-capacity storage device for information or instructions. For example, and not limitingly, memory 420 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 420 may include removable or non-removable (or fixed) media. Where appropriate, memory 420 may be internal or external to the integrated gateway device. In a particular embodiment, memory 420 is a non-volatile solid-state memory. In a particular embodiment, memory 420 includes read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (Electrically Programmable ROM, EPROM), an electrically erasable programmable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0093] The processor 410 reads and executes computer program instructions stored in the memory 420 to perform the steps of the routing control method provided in the embodiments of this disclosure.

[0094] In one example, the electronic device may also include a transceiver 430 and a bus 440. Wherein, as... Figure 4 As shown, the processor 410, memory 420 and transceiver 430 are connected via bus 440 and communicate with each other.

[0095] Bus 440 may include hardware, software, or both. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 440 may include one or more buses.

[0096] This disclosure also provides a computer-readable storage medium that can store a computer program, which, when executed by a processor, enables the processor to implement the routing control method provided in this disclosure.

[0097] The aforementioned storage medium may include, for example, a memory 420 containing computer program instructions, which can be executed by a processor 410 of an electronic device to perform the routing control method provided in the embodiments of this disclosure. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), compact disc ROM (CD-ROM), magnetic tape, floppy disk, and optical data storage device.

[0098] This disclosure also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the routing control method provided in this disclosure and can achieve the various processes and effects in the above embodiments of this disclosure, which will not be elaborated here.

[0099] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A routing control method, characterized in that, The method includes: In response to a target operation targeting a target node in a container orchestration platform Kubernetes cluster, the node type of the target node is determined. The node type includes cloud nodes and non-cloud nodes. The cloud node is a node of the target cloud vendor in a virtual private network, and the non-cloud node is any other node in the container orchestration platform Kubernetes cluster other than the cloud node. Determine the target route update strategy corresponding to the node type based on the node type; The target routing information in the network routing table is updated based on the target routing update strategy, wherein the target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

2. The method according to claim 1, characterized in that, Determining the node type of the target node includes: Obtain the identification information corresponding to the target node, wherein the identification information includes at least one of node tag field information, node annotation field information, and extended field information corresponding to the node cloud vendor; The node type is determined based on the identification information.

3. The method according to claim 1, characterized in that, The step of determining the target route update strategy corresponding to the node type based on the node type includes: When the node type is a cloud node, the target route update strategy is determined to be the first route update strategy, which is to call the route information management interface corresponding to the target cloud vendor to update the target route information in the network routing table.

4. The method according to claim 1, characterized in that, The step of determining the target route update strategy corresponding to the node type based on the node type includes: When the node type is a non-cloud node, the target route update strategy is determined to be the second route update strategy. The second route update strategy is to obtain the IP address range and inter-node communication network identification information corresponding to the container group in the target node, and update the target route information in the network routing table based on the IP address range and inter-node communication network identification information.

5. The method according to claim 4, characterized in that, The step of updating the target route information in the network routing table based on the IP address range and the inter-node communication network identifier information includes: Obtain the target routing information; The IP address range and the inter-node communication network identification information are compared with the target routing information to determine the routing change information; The network routing table is updated based on the routing change information.

6. The method according to claim 4, characterized in that, Inter-node communication networks include at least one of network leased lines, target virtual tunnel networks, and virtual private networks (VPNs). When the inter-node communication network is a leased network line, the inter-node communication network identification information is the leased network line IP address. The leased network line is deployed between cloud nodes and non-cloud nodes to establish network communication between cloud nodes and non-cloud nodes. When the inter-node communication network is a target virtual tunnel network, the inter-node communication network identification information is a virtual tunnel network identifier, and the target virtual tunnel network is used to establish network communication between various nodes; When the inter-node communication network is a Virtual Private Network (VPN), the inter-node communication network identification information is a VPN tunnel endpoint identifier. The VPN is deployed on non-cloud nodes to establish network communication between non-cloud nodes and cloud nodes.

7. The method according to claim 5, characterized in that, After determining the node type of the target node, the method further includes: When the node type is a non-cloud node and the inter-node communication network is a leased network line, the proxy component corresponding to the target node is controlled to configure the routing information of the cloud node, and the proxy component is deployed on the gateway device of the target node.

8. A routing control device, characterized in that, include: The node type determination module is used to determine the node type of the target node in response to a target operation on a target node in a container orchestration platform Kubernetes cluster. The node type includes cloud nodes and non-cloud nodes. The cloud nodes are nodes of the target cloud vendor in a virtual private network, and the non-cloud nodes are other nodes in the container orchestration platform Kubernetes cluster besides the cloud nodes. The route update strategy determination module is used to determine the target route update strategy corresponding to the node type based on the node type. The routing control module is used to update the target routing information in the network routing table based on the target routing update policy, wherein the target routing information is the routing information of the target node, and the network routing table includes the routing information of at least some nodes in the container orchestration platform Kubernetes cluster.

9. An electronic device, characterized in that, include: processor; Memory, used to store executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the routing control method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to implement the routing control method described in any one of claims 1-7.