CN114938394B - Cross-cluster network control method, device, equipment and storage medium - Google Patents

Cross-cluster network control method, device, equipment and storage medium Download PDF

Info

Publication number
CN114938394B
CN114938394B CN202210436826.7A CN202210436826A CN114938394B CN 114938394 B CN114938394 B CN 114938394B CN 202210436826 A CN202210436826 A CN 202210436826A CN 114938394 B CN114938394 B CN 114938394B
Authority
CN
China
Prior art keywords
workload
cluster
internet protocol
application instance
resource units
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210436826.7A
Other languages
Chinese (zh)
Other versions
CN114938394A (en
Inventor
刘晓溪
何小锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210436826.7A priority Critical patent/CN114938394B/en
Publication of CN114938394A publication Critical patent/CN114938394A/en
Application granted granted Critical
Publication of CN114938394B publication Critical patent/CN114938394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure provides a cross-cluster network control method, a device, equipment and a storage medium, which are applied to a cloud environment comprising a plurality of clusters, wherein the method comprises the following steps: if the target application instance is determined to be a cross-cluster application instance, acquiring a state of a first workload, which is used for bearing the target application instance and comprises a plurality of resource units distributed in a plurality of clusters, at a preset frequency; when the state of the obtained first workload is the first state, creating a first application load balancer exposed to the outside for the first workload; respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of a first work load on a first application load equalizer; and carrying out network configuration on the plurality of resource units exposed to the outside according to the plurality of first Internet protocol addresses so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first Internet protocol addresses, thereby realizing cross-cluster network node scheduling.

Description

Cross-cluster network control method, device, equipment and storage medium
Technical Field
The disclosure relates to the field of cloud technology, and in particular relates to a cross-cluster network control method, a device, electronic equipment and a readable storage medium.
Background
Under the mixed cloud environment, a Platform as a service (PaaS) can be used for managing public cloud clusters and local clusters, so that mixed cloud management is realized. A user may create multiple types of clusters with different functions, for example, multiple public cloud clusters may be created through a Kubernetes application, and an application instance may be created. The user may wish to have these application instances distributed over one cluster or over multiple clusters provided by the service provider and may be configured to open up the network and access uniformly to achieve optimal utilization and high availability of resources.
The hybrid cloud management platform in the related technology only supports single-cluster instance management, and cannot completely support high-availability and network-through scenes; or require manual configuration and management, and expansibility is limited.
As described above, how to implement cross-cluster network node scheduling for automated cross-cluster instance management is a challenge.
The above information disclosed in the background section is only for enhancement of understanding of the background of the disclosure and therefore it may include information that does not form the prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a cross-cluster network control method, a device, electronic equipment and a readable storage medium, which realize cross-cluster network node scheduling to solve the problem of automatic cross-cluster instance management.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to an aspect of the present disclosure, there is provided a cross-cluster network control method applied to a cloud environment including a plurality of clusters, the method including: if the target application instance is determined to be a cross-cluster application instance, acquiring a state of a first workload at a preset frequency, wherein the first workload is used for bearing the target application instance and comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in the clusters; when the state of the first workload is obtained as a first state, creating a first application load balancer exposed to the outside for the first workload; respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of a first work load on a first application load equalizer; and carrying out network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses.
According to an embodiment of the present disclosure, if it is determined that the target application instance is a cross-cluster application instance, acquiring a state of the first workload at a preset frequency includes: acquiring configuration information of the target application instance, wherein the configuration information comprises label information of the target application instance; judging whether the label information of the target application instance comprises a cross-cluster application instance label or not; and if the label information of the target application instance comprises a cross-cluster application instance label, acquiring the state of the first workload at the preset frequency.
According to an embodiment of the present disclosure, acquiring a state of a first workload at a preset frequency includes: detecting a resource change event of the first workload at the preset frequency; and if the resource change event of the first workload is not detected within a preset length time period, acquiring the state of the first workload as the first state.
According to an embodiment of the present disclosure, the network configuration of the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses includes: acquiring configuration information of the target application instance, wherein the configuration information comprises public network binding requirement information; and binding the plurality of resource units mounted by the first application load balancer with a public network Internet protocol address according to the public network binding requirement information.
According to an embodiment of the disclosure, the plurality of resource units exposed to the outside include a first resource unit, and a first internet protocol address corresponding to the first resource unit is an internet protocol address in a first subnet; the method further comprises the steps of: responding to a first capacity expansion request, distributing a second internet protocol address for a second resource unit in the plurality of clusters to obtain first routing information of the second resource unit, wherein the second internet protocol address is an internet protocol address in a second subnet, and the first routing information comprises non-category inter-domain routing information of the second subnet and the second internet protocol address; configuring second routing information for the second resource unit, wherein the second routing information comprises non-category inter-domain routing information of the first subnet and the first internet protocol address, and the second routing information is used for indicating the second subnet to access the first resource unit; and mounting the second internet protocol address on the first application load balancer.
According to still another aspect of the present disclosure, there is provided a cross-cluster network control apparatus applied to a cloud environment including a plurality of clusters including a first cluster and a plurality of second clusters, the apparatus including: the first network controller is arranged at a first node in the first cluster and is used for acquiring a state of a first workload at a preset frequency if the target application instance is determined to be a cross-cluster application instance, wherein the first workload is used for bearing the target application instance; the first cluster controller is arranged at a second node in the first cluster and is used for acquiring information that the first workload comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in the plurality of second clusters; the first network controller is further configured to create a first application load balancer exposed to the outside for the first workload when the state of the first workload is obtained as a first state; the first network controller is further configured to mount, according to information that the first workload includes a plurality of resource units, a first application load balancer to a plurality of first internet protocol addresses corresponding to a plurality of resource units exposed to the outside in the plurality of resource units of the first workload, respectively; the first network controller is further configured to perform network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses.
According to an embodiment of the disclosure, the first cluster controller is further configured to establish association between the plurality of second clusters and the first cluster through a first interface, respectively.
According to an embodiment of the present disclosure, the apparatus further comprises: a second network controller, configured to be disposed at a first node in the second cluster, and configured to allocate a second internet protocol address to a second resource unit in the plurality of clusters in response to a first capacity expansion request, so as to obtain first routing information of the second resource unit, where the second internet protocol address is an internet protocol address in a second subnet, and the first routing information includes non-class inter-domain routing information of the second subnet and the second internet protocol address; the second network controller is further configured to configure second routing information for the second resource unit, where the second routing information includes classless inter-domain routing information of the first subnet and the first internet protocol address, and the second routing information is used to indicate that the second subnet accesses the first resource unit; the first network controller is further configured to mount the second internet protocol address on the first application load balancer.
According to still another aspect of the present disclosure, there is provided a cross-cluster network control apparatus applied to a cloud environment including a plurality of clusters, the apparatus including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a state of a first workload at a preset frequency if a target application instance is determined to be a cross-cluster application instance, the first workload is used for bearing the target application instance and comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters; the first processing module is used for creating a first application load equalizer exposed to the outside for the first workload when the state of the first workload is obtained as a first state; the second processing module is used for respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of the first work load on a first application load equalizer; and the configuration module is used for carrying out network configuration on the plurality of resource units exposed to the outside according to the plurality of first Internet protocol addresses so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first Internet protocol addresses.
According to an embodiment of the disclosure, the obtaining module is further configured to: acquiring configuration information of the target application instance, wherein the configuration information comprises label information of the target application instance; judging whether the label information of the target application instance comprises a cross-cluster application instance label or not; and if the label information of the target application instance comprises a cross-cluster application instance label, acquiring the state of the first workload at the preset frequency.
According to an embodiment of the disclosure, the obtaining module is further configured to: detecting a resource change event of the first workload at the preset frequency; and if the resource change event of the first workload is not detected within a preset length time period, acquiring the state of the first workload as the first state.
According to an embodiment of the disclosure, the configuration module is further configured to: acquiring configuration information of the target application instance, wherein the configuration information comprises public network binding requirement information; and binding the plurality of resource units mounted by the first application load balancer with a public network Internet protocol address according to the public network binding requirement information.
According to an embodiment of the disclosure, the plurality of resource units exposed to the outside include a first resource unit, and a first internet protocol address corresponding to the first resource unit is an internet protocol address in a first subnet; the apparatus further comprises: a third processing module, configured to allocate a second internet protocol address to a second resource unit in the plurality of clusters in response to the first capacity expansion request, so as to obtain first routing information of the second resource unit, where the second internet protocol address is an internet protocol address in a second subnet, and the first routing information includes non-category inter-domain routing information of the second subnet and the second internet protocol address; the configuration module is further configured to configure second routing information for the second resource unit, where the second routing information includes classless inter-domain routing information of the first subnet and the first internet protocol address, and the second routing information is used to indicate that the second subnet accesses the first resource unit; the second processing module is further configured to mount the second internet protocol address on the first application load balancer.
According to still another aspect of the present disclosure, there is provided an electronic apparatus including: a memory, a processor, and executable instructions stored in the memory and executable in the processor, the processor implementing any of the methods described above when executing the executable instructions.
According to yet another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement any of the methods described above.
According to the cross-cluster network control method provided by the embodiment of the disclosure, after the target application instance is determined to be the cross-cluster application instance, the state of the first workload for bearing the target application instance and comprising a plurality of resource units distributed in a plurality of clusters is acquired at the preset frequency, when the acquired state of the first workload is the first state, a first application load equalizer exposed to the outside is created for the first workload, then the first application load equalizer is respectively mounted with a plurality of first Internet protocol addresses corresponding to the plurality of resource units exposed to the outside in the plurality of resource units of the first workload, and then network configuration is carried out on the plurality of resource units exposed to the outside according to the plurality of first Internet protocol addresses, so that the first application load equalizer distributes network data processed by the target application instance according to the plurality of first Internet protocol addresses, cross-cluster network node scheduling can be realized, and automatic cross-cluster instance management is realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
Fig. 1 shows a schematic diagram of a system architecture in an embodiment of the present disclosure.
Fig. 2 shows a flowchart of a cross-cluster network control method in an embodiment of the disclosure.
Fig. 3 shows a schematic diagram of the processing procedure of step S202 shown in fig. 2 in an embodiment.
Fig. 4 shows a schematic diagram of the processing procedure of step S208 shown in fig. 2 in an embodiment.
Fig. 5 is a flow chart illustrating another cross-cluster network control method according to an example embodiment.
Fig. 6 is a schematic diagram illustrating an implementation of a cross-cluster network control device in an application scenario according to an exemplary embodiment.
Fig. 7 is a schematic diagram of another implementation of the cross-cluster network control device shown in fig. 6 in an application scenario.
Fig. 8 is a schematic implementation diagram of another cross-cluster network control device in an application scenario according to the embodiments shown in fig. 2 to 7.
Fig. 9 shows a block diagram of a cross-cluster network control device in an embodiment of the disclosure.
Fig. 10 illustrates a block diagram of another cross-cluster network control device in an embodiment of the disclosure.
Fig. 11 shows a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, apparatus, steps, etc. In other instances, well-known structures, methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present disclosure, the meaning of "a plurality" is at least two, such as two, three, etc., unless explicitly specified otherwise. The symbol "/" generally indicates that the context-dependent object is an "or" relationship.
In the present disclosure, unless explicitly specified and limited otherwise, terms such as "connected" and the like are to be construed broadly and, for example, may be electrically connected or may communicate with each other; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the terms in this disclosure will be understood by those of ordinary skill in the art as the case may be.
As described above, the hybrid cloud management platform in the related art only supports single-cluster instance management, and cannot completely support the high-availability and network-through scenes across clusters; or manual configuration and management are needed, the change of resources cannot be perceived in real time, and the expansibility is limited.
Some mature open source projects attempt to address the problem of high availability across clusters, and some multi-cluster management software functions have supported partitioning topology domains across clusters, scheduling of cross-cluster services, and so forth. On the basis of these items, the disclosed embodiments enhance the functions of the network plugin, and mainly focus on the cross-cluster application of the network plugin, by acquiring the state of a first workload for carrying a target application instance and including a plurality of resource units distributed in a plurality of clusters with a preset frequency after determining that the target application instance is the cross-cluster application instance, when the state of the first workload is obtained as the first state, creating an externally exposed first application load equalizer for the first workload, then respectively mounting the first application load equalizer on a plurality of first internet protocol addresses corresponding to the externally exposed plurality of resource units in the plurality of resource units of the first workload, and then performing network configuration on the externally exposed plurality of resource units according to the plurality of first internet protocol addresses, so that the first application load equalizer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses, thereby realizing cross-cluster network node scheduling, and realizing automatic cross-cluster instance management.
Fig. 1 illustrates an exemplary system architecture 10 in which the cross-cluster network control method or cross-cluster network control apparatus of the present disclosure may be applied.
As shown in fig. 1, the system architecture 10 may be a network formed by a virtual Private cloud (Virtual Private Cloud, VPC) 102 and a VPC 104, where the VPC 102 and the VPC 104 may be divided to obtain a Private Subnet (Private Subnet) 1022 and a Private Subnet 1024, a cluster (cluster) 10222 and a cluster 10422 may be disposed in the Private Subnet 1022 and the Private Subnet 1024, respectively, and the target application instances in the embodiment of the disclosure may be distributed in the cluster 10222 and the cluster 10422. A plurality of nodes 102222 may be disposed in cluster 10222, each node 102222 having at least one resource unit 1022222 running thereon; a plurality of nodes 104222 may also be disposed in the cluster 10422, each node 104222 being operable with at least one resource unit (pod) 1042222. The resource units 1022222 and 1042222 may serve as a workload (workload) carrying the target application instance in embodiments of the present disclosure.
It should be understood that the number of VPC networks, subnets, clusters, nodes, resource units, etc. in fig. 1 are merely illustrative. There may be any number of VPC networks, subnets, clusters, nodes and resource units, as desired for implementation.
Fig. 2 is a flow chart illustrating a method of cross-cluster network control, according to an example embodiment. The method as shown in fig. 2 may be applied to a cloud environment including a plurality of clusters, for example, may be applied to the cloud environment shown in fig. 1; the method as shown in fig. 2 may be performed by a network plug-in arranged on one (management) cluster, e.g. as may be implemented by the first network controller 602 in fig. 6.
Referring to fig. 2, a method 20 provided by an embodiment of the present disclosure may include the following steps.
In step S202, if the target application instance is determined to be a cross-cluster application instance, a state of a first workload is acquired at a preset frequency, where the first workload is used to carry the target application instance, the first workload includes a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters.
In some embodiments, for example, an application may employ a hybrid cloud management platform to install and manage components. The hybrid cloud management platform may employ Kubernetes (abbreviated as "K8s" in fig. 8) as a platform for container scheduling, and the disclosure is illustrated by way of example, but not limitation. Kubernetes can nanotube multiple types of clusters, which can include public and private cloud clusters.
In some embodiments, for example, the plurality of clusters may be co-account, co-regional clusters.
In some embodiments, for example, the tag of the target application instance may be utilized to determine whether it is a cross-cluster application instance, and the detailed description may refer to fig. 3.
In some embodiments, the status of the first workload may be listened to by retrieving the status of the first workload at a preset frequency, e.g., the preset frequency may be 0.5s, or 1s, or 2s, etc.
In step S204, when the state in which the first workload is obtained is the first state, a first application load balancer exposed to the outside is created for the first workload.
In some embodiments, the first state may be a ready state, and the controller (Kubernetes) may monitor the incremental change of resources to determine whether the first workload is ready, for example, a preset frequency may detect a resource change event of the first workload, and if the resource change event of the first workload is not detected within a preset length of time, obtain the state of the first workload as the first state.
In some embodiments, the externally exposed first application load balancer is an externally accessible application load balancer (Application Load Balancer, ALB).
In step S206, the first application load balancer is respectively mounted with a plurality of first internet protocol addresses corresponding to a plurality of resource units exposed to the outside in a plurality of resource units of the first workload.
In some embodiments, the first application load balancer may mount internet protocol (Internet Protocol, IP) addresses of trusted network cards corresponding to externally exposed pod on each cluster one by one.
In some embodiments, for example, the externally exposed multiple resource units, i.e., the accessible pod, may also be distributed across multiple clusters.
In step S208, the plurality of resource units exposed to the outside are configured in a network according to the plurality of first internet protocol addresses, so that the first application load balancer distributes the network data processed by the target application instance according to the plurality of first internet protocol addresses.
In some embodiments, for example, according to the configuration of the target application instance, it may be determined whether ALB needs to bind to the public network, and a domain name is configured for each externally exposed pod on which the ALB is mounted, so that the ALB distributes network data processed by the target application instance according to the IP address. The specific embodiment can refer to fig. 4.
Each cluster in the related art is in an independent VPC, the network between VPCs is isolated, ALBs (or domains) in the clusters cannot schedule nodes across the clusters, so that the nodes between the clusters are isolated, the same instance cannot be created across the clusters, manual intervention is required for migration and handover when scheduling across the cluster network, and the scalability of the clusters and network resources is limited.
According to the cross-cluster network control method provided by the embodiment of the disclosure, after the target application instance is determined to be the cross-cluster application instance, the state of the first workload for bearing the target application instance and comprising a plurality of resource units distributed in a plurality of clusters is acquired at a preset frequency, when the obtained state of the first workload is the first state, a first application load equalizer exposed to the outside is created for the first workload, then the first application load equalizer is respectively mounted with a plurality of first internet protocol addresses corresponding to the plurality of resource units exposed to the outside in the plurality of resource units of the first workload, and then the plurality of resource units exposed to the outside are subjected to network configuration according to the plurality of first internet protocol addresses, so that the first application load equalizer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses, and cross-cluster network node scheduling can be realized, and automatic cross-cluster instance management is realized.
Fig. 3 shows a schematic diagram of the processing procedure of step S202 shown in fig. 2 in an embodiment. As shown in fig. 3, in the embodiment of the present disclosure, the above step S202 may further include the following steps.
Step S302, obtain configuration information of the target application instance, where the configuration information includes tag information of the target application instance.
In some embodiments, configuration information of resources of the target application instance may be queried through a Kubernetes controller (controller) mechanism, from which information of a Kubernetes tag (label) of the target application instance may be queried.
Step S304, judging whether the label information of the target application instance comprises a cross-cluster application instance label.
In step S306, if the tag information of the target application instance includes a cross-cluster application instance tag, the state of the first workload is obtained at a preset frequency.
In some embodiments, the network plug-in may be managed by an operator (operator) of Kubernetes in a declarative application program interface (Application Interface, API) style customization of Kubernetes to enable listening of workload status, and the specific implementation may refer to step S202.
According to the cross-cluster network control method provided by the embodiment of the disclosure, the controller mechanism based on the Kubernetes automatically executes the cross-cluster network scheme according to the configuration label through the operator, so that the high availability and the expandability of the system are further improved, and the operation and maintenance cost of manual intervention is saved.
Fig. 4 shows a schematic diagram of the processing procedure of step S208 shown in fig. 2in an embodiment. As shown in fig. 4, in the embodiment of the present disclosure, the above step S208 may further include the following steps.
Step S402, obtaining configuration information of a target application instance, wherein the configuration information comprises public network binding requirement information.
Step S404, binding a plurality of resource units mounted by the first application load balancer with the public network Internet protocol address according to the public network binding requirement information.
Fig. 5 is a flow chart illustrating another cross-cluster network control method according to an example embodiment. The method as shown in fig. 5 may be applied, for example, to a cloud environment including a plurality of clusters, for example, to the cloud environment shown in fig. 1, or fig. 6 to 8. Referring to fig. 2, the plurality of resource units exposed to the outside may include a first resource unit, and a first internet protocol address corresponding to the first resource unit is an internet protocol address in the first subnet.
Referring to fig. 5, a method 50 provided by an embodiment of the present disclosure may include the following steps.
In step S502, a second internet protocol address is allocated to a second resource unit in the plurality of clusters in response to the first capacity expansion request, so as to obtain first routing information of the second resource unit, where the second internet protocol address is an internet protocol address in a second subnet, and the first routing information includes non-category inter-domain routing information of the second subnet and the second internet protocol address.
In some embodiments, a second internet protocol address of a network card in the second subnet may be configured for the second resource unit in response to the first capacity expansion request, and the first Routing information of the second resource unit after the network card is configured may include a non-classified inter-Domain Routing (CIDR) information of the second subnet and the second internet protocol address.
In step S504, second routing information is configured for the second resource unit, the second routing information including the classless inter-domain routing information of the first subnet and the first internet protocol address, the second routing information being used to indicate that the second subnet accesses the first resource unit.
In some embodiments, the pod that is exposed to the outside may be accessed through the second subnet, for example, may be a first resource unit in the first subnet, and the second routing information is newly added in the second resource unit to open a network between the second resource unit and the first resource unit in a different subnet.
In some embodiments, this may be implemented by a network plug-in (e.g., the second network controller 606 shown in fig. 6) disposed on a cluster in the subnet.
In step S506, the first application load balancer is mounted with the second internet protocol address.
In the related art, a network between two VPCs is opened, a network card of one VPC is used to bind a certain IP address in a subnet, the network card is inserted into a node of the other VPC after being trusted, and after the IP address of the subnet is exhausted, the existing instance cannot be expanded.
According to the method provided by the embodiment of the disclosure, the expansion of the network resources of the corresponding user side can be supported, and after the IP address of the same subnet as the VPC is exhausted, the continued expansion of the subnet can be increased, so that the expandability of the system is greatly improved.
Fig. 6 is a schematic diagram illustrating an implementation of a cross-cluster network control device in an application scenario according to an exemplary embodiment. The multiple clusters in the service-side virtual private cloud 60 environment shown in fig. 6 may include a first cluster 6002 and multiple second clusters (including, for example, a second cluster 6004 and a second cluster 6006), where the second cluster 6004 and the second cluster 6006 are located in a first subnet 60002 and a second subnet 60004, respectively, and may implement underlying multi-cluster registration and scheduling management based on multi-cluster management software 60022, which may manage the first cluster controller 604, the first network controller 602, and the second network controller 606 disposed on the first cluster 6002 and the second network controller 608 disposed on the second cluster 6004 and the second network controller 608 disposed on the second cluster 6006.
The first network controller 602 may be disposed at a first node 60024 in the first cluster and may be configured to perform step S63, where step S63 may include acquiring, if it is determined that the target application instance is a cross-cluster application instance, a state of a first workload for carrying the target application instance at a preset frequency (step S202); when the state of the first workload is obtained as the first state, creating a first application load balancer exposed to the outside for the first workload (step S204); according to the information that the first workload includes a plurality of resource units, respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in the plurality of resource units of the first workload by a first application load balancer (step S206); the plurality of resource units exposed to the outside are configured in a network manner according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses (step S208).
The first cluster controller 604 may be configured at a second node (not shown) in the first cluster, for performing step S62, where step S62 may include obtaining information that the first workload includes a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of second clusters;
The first cluster controller 604 is further configured to perform step S61, where step S61 establishes association between a plurality of second clusters and the first clusters through the first interface 6010, respectively, and the second clusters may be registered on a control panel of the multi-cluster management software 60022, for example. The first interface 6010 may be a cloud service resource operation interface (public cloud software development kit (Software Development Kit, SDK)).
The first cluster 6002 may further include a master node 60026, and an application program interface Service (API SERVICE) 600262 disposed on the master node 60026 may be used to provide interfaces for adding, deleting, modifying, checking, and monitoring various resource objects (pod, service, etc.) of Kubernetes, which are data buses and data centers of the whole system. The controller management 600264 provided at the master node 60026 can be used to manage the controllers in the first cluster 6002.
The second network controller 606 may be disposed at the first node 60042 in the second cluster 6004 and may be configured to perform step S66, where step S66 may include configuring a network card (IP address) to the first resource unit 600424, modifying a routing rule (Route-Table), self-checking whether the network card routing is normal, and so on. The first resource unit 600422 may be disposed in the name space 600422 of the first node 60042, where various types of information of the first resource unit 600424 include a resource unit name, an externally exposed tag 6004242, and so on.
Third resource unit 600444 and third resource unit 600444 may be a deployment resource unit (Deployment Pod) that may act as global controller 600446, on second node 60044 in second cluster 6004.
The second cluster 6004 may also be provided with a master node 60046, and the application program interface Service 600462 provided on the master node 60046 may be used to provide interfaces for adding, deleting, modifying, checking, and monitoring various resource objects (pod, service, etc.). Controller manager 600464, located at master node 60046, may be used to manage controllers in second cluster 6004. The master node 60046 in the second cluster 6004 can be used to feed back the status of each pod in the second cluster 6004 to the first cluster 6002.
The second network controller 608 may be configured to be disposed at the first node 60062 in the second cluster 6006 and may be configured to perform step S64, where step S64 may include configuring a network card (IP address) to the first resource unit 600624, for example, in response to the first capacity expansion request, allocating a second internet protocol address to a second resource unit in the plurality of clusters to obtain first routing information of the second resource unit (step S502), the second internet protocol address being an internet protocol address in the second subnet 60004, the first routing information including the classless inter-domain routing information of the second subnet and the second internet protocol address. A first node 60062 operable to perform step S65, wherein step S65 may comprise modifying a routing rule (custom routing-Table), e.g. configuring a second resource unit with second routing information (step S504), the second routing information comprising classless inter-domain routing information of the first subnet and the first internet protocol address, the second routing information being used to indicate that the second subnet accesses the first resource unit; and whether the routing of the self-inspection network card is normal or not. The first resource unit 600624 may be disposed in the name space 600622 of the first node 60062, where various types of information of the first resource unit 600624 are included, including a resource unit name, an externally exposed tag 6006242, and so on.
Third resource unit 600644 and third resource unit 600644 may be deployment resource unit (Deployment Pod) may be provided on second node 60064 in second cluster 6006, which may act as global controller 600646.
The second cluster 6006 may also be provided with a master node 60066, where an application program interface Service 600662 provided on the master node 60066 may be used to provide interfaces for adding, deleting, modifying, and monitoring various resource objects (pod, service, etc.). Controller management 600664 disposed on master node 60066 may be used to manage controllers in second cluster 6006. The master node 60066 in the second cluster 6006 can be used to feed back the status of each pod in the second cluster 6006 to the first cluster 6002.
The first network controller 602 may further be configured to mount the first application load balancer to a second internet protocol address (step S506).
Fig. 7 is a schematic diagram of another implementation of the cross-cluster network control device shown in fig. 6 in an application scenario. Fig. 7 is a user-side virtual private cloud 70 environment corresponding to fig. 6, in which a first subnet 70002 and a second subnet 70004 correspond to the first subnet 60002 and the second subnet 60004 in fig. 6, respectively, and refer to step S64 and step S65, respectively, and may be used to transmit a first capacity expansion request of the user side.
According to the method provided by the embodiment of the disclosure, a network plug-in is arranged on a first cluster according to the configuration on a target application instance, if a label of cross-cluster application is found, the ready state of a corresponding workload in a multi-cluster management module is monitored, once the ready state is established, an externally exposed ALB is created for the workload, the ALB is one by one loaded with the IP addresses of the trusted network cards corresponding to the exposed pod on each cluster, and then whether the ALB needs to be bound with a public network or not is judged according to the configuration, and a domain name is configured; the first cluster and the second cluster are respectively provided with network break-through plug-ins of single cluster dimension, an asynchronous double-operator mechanism is adopted, and the automatic maintenance of externally exposed network resources (domain name/load balance/network card/public network IP/security group) of the cluster is responsible, so that the problems of dispatching and expanding of public cloud service providers across cluster network nodes and communication and access of multiple subnets at a user side are solved. The method not only supports the expansion and external exposure of the service side cross-cluster creation instance, but also supports the expansion of the network resources of the corresponding user side, and after the IP address in the same subnet as the VPC is exhausted, the continued expansion of the subnet can be increased, thereby greatly improving the expandability of the system.
Fig. 8 is a schematic implementation diagram of another cross-cluster network control device in an application scenario according to the embodiments shown in fig. 2 to 7. The multiple clusters in fig. 8 may be one master Cluster (Host Cluster) 802 and multiple K8s sub-clusters, such as K8s Cluster 1, K8s Cluster 2 … … K8s Cluster n shown in fig. 8. The primary cluster 802 may be used as a management node and other types of clusters may be registered as sub-clusters with the primary cluster 802. K8s cluster 1, K8s cluster 2 … … K8s cluster n constitute a service Side (SERVICEPIN) 804, each cluster being deployed with 2-3 available zones (Availability Zones, AZ) (available zone a, available zone B and available zone C as shown in fig. 8), nodes in the same cluster may correspond to different physical AZ. Corresponding to the service side, the VPC 806 of the user side (userPin) also includes 2 subnets of the user, such as subnet 1 and subnet 2 shown in fig. 8, where K8s cluster 1, K8s cluster 2 … … K8s cluster n is under SERVICEPIN under the same account with area (region) (as area 1 shown in fig. 8).
The multi-cluster management software 8022 may have different options, for example, by disposing resources such as the controller 80242 at the node 8024, the controller 80262 and Domain (Domain) disposed at the node 8026, the public network IP address (implemented by SVC (Service)), ALB, etc., and processing workload information such as disposition information, cluster information, etc. The number of copies (replicas) of pod in deployment (Deployment) 1 starts with 3, as shown in fig. 8 for resource unit 1, resource unit 2, and resource unit 3, with the 4 th copy resource unit 4 added to the expansion.
The K8s cluster 1, K8s cluster 2 … … K8s cluster n are first registered on the control panel of the multi-cluster management software 8022, and the multi-cluster management software 8022 manages the cluster distribution of the pod and the number of replicas of the pod in workload according to the user configuration. Then, according to the configuration on the target application instance, if the label of the cross-cluster application is found, the controller 80262 monitors the ready state of the corresponding workload in the multi-cluster management module, once the ready state is found, creates an externally exposed ALB for the workload, the ALB mounts the trust network card IP addresses corresponding to the exposed pod on each cluster one by one, and then judges whether the ALB needs to be bound to the public network according to the configuration, and configures the domain name.
For example, the CIDR of the subnet 1 is 10.0.16.0/22, and after the network card is configured, the following records may be recorded in the route of the resource unit 1:
10.0.16.0/22dev eth2 proto kernel scope link src 10.0.17.225 wherein 10.0.17.225 (IP 1 shown in fig. 8) is the network card IP address corresponding to resource unit 1.
If subnet 2 is newly added during capacity expansion, e.g., CIDR of subnet 2 is 10.0.64.0/22, subnet 2 is required to access the exposed resource unit 3. The following records may be included in the route of the resource unit 4 after the network card is configured:
10.0.64.0/22dev eth2 proto kernel scope link src 10.0.64.3
Wherein 10.0.64.3 (IP 2 shown in fig. 8) is the network card IP address corresponding to resource unit 4. The second network controller (608 in fig. 6) plug-in, which may be implemented by a K8s API, automatically configures, after creating the above network card, to add the following routes to this resource unit 4:
10.0.16.0/22via 10.0.64.1dev eth2
wherein 10.0.16.0/22 is CIDR of subnet 1, 10.0.64.1 is the network card IP address corresponding to resource unit 3.
This can be achieved by setting a master operator plug-in on the master cluster 802 and daemonset operator plug-ins on the K8s sub-clusters, respectively, daemonset operator can be set on one pod on each node, responsible for controlling the resource allocation on each node.
According to the method provided by the embodiment of the disclosure, a multi-cluster Kubernetes controller mechanism is utilized, and the multi-cluster registration and scheduling management of the bottom layer is performed based on multi-cluster management software, so that the problems of automatic scheduling and communication across cluster networks and mutual communication of multiple subnets across VPCs are solved.
Fig. 9 is a schematic structural diagram of a cross-cluster network control device according to an exemplary embodiment. The apparatus as shown in fig. 9 may be applied to a cloud environment including a plurality of clusters, for example, may be applied to the cloud environment shown in fig. 1; the apparatus as shown in fig. 9 may be implemented by a network plug-in arranged on one (management) cluster, for example by the first network controller 602 in fig. 6.
Referring to fig. 9, an apparatus 90 provided by an embodiment of the present disclosure may include an acquisition module 902, a first processing module 904, a second processing module 906, and a configuration module 908.
The obtaining module 902 may be configured to obtain, if it is determined that the target application instance is a cross-cluster application instance, a state of a first workload at a preset frequency, where the first workload is used to carry the target application instance, the first workload includes a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters.
The first processing module 904 is operable to create a first application load balancer exposed to the outside for the first workload when the state in which the first workload is obtained is the first state.
The second processing module 906 may be configured to mount, by using the first application load balancer, a plurality of first internet protocol addresses corresponding to a plurality of resource units exposed to the outside in a plurality of resource units of the first workload.
The configuration module 908 may be configured to perform network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses.
Fig. 10 is a schematic diagram illustrating the structure of another cross-cluster network control device according to an exemplary embodiment. The apparatus as shown in fig. 10 may be applied to, for example, a cloud environment including a plurality of clusters, for example, the cloud environment shown in fig. 1, or fig. 6 to 8. Referring to fig. 9, the plurality of resource units exposed to the outside may include a first resource unit, and a first internet protocol address corresponding to the first resource unit is an internet protocol address in the first subnet.
Referring to fig. 10, an apparatus 100 provided by an embodiment of the present disclosure may include an acquisition module 1002, a first processing module 1004, a second processing module 1006, a configuration module 1008, and a third processing module 1010.
The obtaining module 1002 may be configured to obtain, if it is determined that the target application instance is a cross-cluster application instance, a state of a first workload at a preset frequency, where the first workload is used to carry the target application instance, the first workload includes a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters.
The obtaining module 1002 may be further configured to obtain configuration information of the target application instance, where the configuration information includes tag information of the target application instance; judging whether the label information of the target application instance comprises a cross-cluster application instance label or not; if the tag information of the target application instance includes a cross-cluster application instance tag, acquiring a state of the first workload at a preset frequency.
The obtaining module 1002 may be further configured to detect a resource change event of the first workload at a preset frequency; and if the resource change event of the first workload is not detected within the preset length time period, acquiring the state of the first workload as a first state.
The first processing module 1004 may be configured to create a first application load balancer exposed to the outside for the first workload when the state in which the first workload is obtained is the first state.
The second processing module 1006 may be configured to mount, by using the first application load balancer, a plurality of first ip addresses corresponding to a plurality of resource units exposed to the outside among a plurality of resource units of the first workload.
The plurality of resource units exposed to the outside may include a first resource unit, and the first internet protocol address corresponding to the first resource unit is an internet protocol address in the first subnet.
The second processing module 1006 may also be configured to mount the first application load balancer with a second internet protocol address.
The configuration module 1008 may be configured to perform network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses.
The configuration module 1008 may be further configured to obtain configuration information of the target application instance, where the configuration information includes public network binding requirement information; and binding the plurality of resource units mounted on the first application load equalizer with the public network Internet protocol address according to the public network binding requirement information.
The configuration module 1008 is further operable to configure second routing information for the second resource unit, the second routing information including classless inter-domain routing information of the first subnet and the first internet protocol address, the second routing information being operable to indicate that the second subnet accesses the first resource unit.
The third processing module 1010 may be configured to allocate a second internet protocol address to a second resource unit in the plurality of clusters in response to the first capacity expansion request, to obtain first routing information of the second resource unit, where the second internet protocol address is an internet protocol address in a second subnet, and the first routing information includes classless inter-domain routing information of the second subnet and the second internet protocol address.
Specific implementation of each module in the apparatus provided in the embodiments of the present disclosure may refer to the content in the foregoing method, which is not described herein again.
Fig. 11 shows a schematic structural diagram of an electronic device in an embodiment of the disclosure. It should be noted that the apparatus shown in fig. 11 is only an example of a computer system, and should not impose any limitation on the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, the apparatus 1100 includes a Central Processing Unit (CPU) 1101 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM1103, various programs and data necessary for the operation of the device 1100 are also stored. The CPU1101, ROM1102, and RAM1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a LAN card, a modem, and the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the I/O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. The above-described functions defined in the system of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 1101.
It should be noted that the computer readable medium shown in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The described modules may also be provided in a processor, for example, as: a processor includes an acquisition module, a first processing module, a second processing module, and a configuration module. The names of these modules do not in some way limit the module itself, for example, the acquisition module may also be described as a "module that acquires the status of a workload".
As another aspect, the present disclosure also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
If the target application instance is determined to be a cross-cluster application instance, acquiring a state of a first workload at a preset frequency, wherein the first workload is used for bearing the target application instance and comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters; when the state of the obtained first workload is the first state, creating a first application load balancer exposed to the outside for the first workload; respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of a first work load on a first application load equalizer; and carrying out network configuration on the plurality of resource units exposed to the outside according to the plurality of first Internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first Internet protocol addresses.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that this disclosure is not limited to the particular arrangements, instrumentalities and methods of implementation described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method of cross-cluster network control, characterized by being applied to a cloud environment comprising a plurality of clusters, the method comprising:
If the target application instance is determined to be a cross-cluster application instance, acquiring a state of a first workload at a preset frequency, wherein the first workload is used for bearing the target application instance and comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in the clusters;
when the state of the first workload is obtained as a first state, creating a first application load balancer exposed to the outside for the first workload, wherein the first state is a ready state;
respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of a first work load on a first application load equalizer;
Performing network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses;
If the target application instance is determined to be a cross-cluster application instance, acquiring the state of the first workload at a preset frequency, including:
Acquiring configuration information of the target application instance, wherein the configuration information comprises label information of the target application instance;
judging whether the label information of the target application instance comprises a cross-cluster application instance label or not;
And if the label information of the target application instance comprises a cross-cluster application instance label, acquiring the state of the first workload at the preset frequency.
2. The method of claim 1, wherein acquiring the status of the first workload at the preset frequency comprises:
detecting a resource change event of the first workload at the preset frequency;
And if the resource change event of the first workload is not detected within a preset length time period, acquiring the state of the first workload as the first state.
3. The method of claim 1, wherein network configuring the externally exposed plurality of resource units according to the plurality of first internet protocol addresses comprises:
Acquiring configuration information of the target application instance, wherein the configuration information comprises public network binding requirement information;
And binding the plurality of resource units mounted by the first application load balancer with a public network Internet protocol address according to the public network binding requirement information.
4. The method of claim 1, wherein the plurality of externally exposed resource units comprises a first resource unit, and a first internet protocol address corresponding to the first resource unit is an internet protocol address in a first subnet;
The method further comprises the steps of:
Responding to a first capacity expansion request, distributing a second internet protocol address for a second resource unit in the plurality of clusters to obtain first routing information of the second resource unit, wherein the second internet protocol address is an internet protocol address in a second subnet, and the first routing information comprises non-category inter-domain routing information of the second subnet and the second internet protocol address;
configuring second routing information for the second resource unit, wherein the second routing information comprises non-category inter-domain routing information of the first subnet and the first internet protocol address, and the second routing information is used for indicating the second subnet to access the first resource unit;
And mounting the second internet protocol address on the first application load balancer.
5. A cross-cluster network control apparatus for use in a cloud environment comprising a plurality of clusters including a first cluster and a plurality of second clusters, the apparatus comprising:
The first network controller is arranged at a first node in the first cluster and is used for acquiring a state of a first workload at a preset frequency if the target application instance is determined to be a cross-cluster application instance, wherein the first workload is used for bearing the target application instance;
The first network controller is further configured to obtain configuration information of the target application instance, where the configuration information includes tag information of the target application instance; judging whether the label information of the target application instance comprises a cross-cluster application instance label or not; if the tag information of the target application instance comprises a cross-cluster application instance tag, acquiring the state of the first workload at the preset frequency;
The first cluster controller is arranged at a second node in the first cluster and is used for acquiring information that the first workload comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in the plurality of second clusters;
the first network controller is further configured to create a first application load balancer exposed to the outside for the first workload when the state of the first workload is obtained as a first state, where the first state is a ready state;
The first network controller is further configured to mount, according to information that the first workload includes a plurality of resource units, a first application load balancer to a plurality of first internet protocol addresses corresponding to a plurality of resource units exposed to the outside in the plurality of resource units of the first workload, respectively;
the first network controller is further configured to perform network configuration on the plurality of resource units exposed to the outside according to the plurality of first internet protocol addresses, so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first internet protocol addresses.
6. The apparatus of claim 5, wherein the first cluster controller is further configured to establish association of the plurality of second clusters with the first cluster, respectively, via a first interface.
7. The apparatus of claim 5, wherein the plurality of externally exposed resource units comprise first resource units, and wherein a first internet protocol address corresponding to the first resource units is an internet protocol address in a first subnet;
The apparatus further comprises: a second network controller, configured to be disposed at a first node in the second cluster, and configured to allocate a second internet protocol address to a second resource unit in the plurality of clusters in response to a first capacity expansion request, so as to obtain first routing information of the second resource unit, where the second internet protocol address is an internet protocol address in a second subnet, and the first routing information includes non-class inter-domain routing information of the second subnet and the second internet protocol address;
The second network controller is further configured to configure second routing information for the second resource unit, where the second routing information includes classless inter-domain routing information of the first subnet and the first internet protocol address, and the second routing information is used to indicate that the second subnet accesses the first resource unit;
the first network controller is further configured to mount the second internet protocol address on the first application load balancer.
8. A cross-cluster network control apparatus for use in a cloud environment comprising a plurality of clusters, the apparatus comprising:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a state of a first workload at a preset frequency if a target application instance is determined to be a cross-cluster application instance, the first workload is used for bearing the target application instance and comprises a plurality of resource units, and the plurality of resource units of the first workload are distributed in a plurality of clusters;
The acquisition module is further configured to: acquiring configuration information of the target application instance, wherein the configuration information comprises label information of the target application instance; judging whether the label information of the target application instance comprises a cross-cluster application instance label or not; if the tag information of the target application instance comprises a cross-cluster application instance tag, acquiring the state of the first workload at the preset frequency;
The first processing module is used for creating a first application load equalizer exposed to the outside for the first workload when the state of the first workload is obtained as a first state, wherein the first state is a ready state;
The second processing module is used for respectively mounting a plurality of first internet protocol addresses corresponding to a plurality of externally exposed resource units in a plurality of resource units of the first work load on a first application load equalizer;
and the configuration module is used for carrying out network configuration on the plurality of resource units exposed to the outside according to the plurality of first Internet protocol addresses so that the first application load balancer distributes network data processed by the target application instance according to the plurality of first Internet protocol addresses.
9. An electronic device, comprising: memory, a processor and executable instructions stored in the memory and executable in the processor, wherein the processor implements the method of any of claims 1-4 when executing the executable instructions.
10. A computer readable storage medium having stored thereon computer executable instructions which when executed by a processor implement the method of any of claims 1-4.
CN202210436826.7A 2022-04-13 2022-04-13 Cross-cluster network control method, device, equipment and storage medium Active CN114938394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210436826.7A CN114938394B (en) 2022-04-13 2022-04-13 Cross-cluster network control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210436826.7A CN114938394B (en) 2022-04-13 2022-04-13 Cross-cluster network control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114938394A CN114938394A (en) 2022-08-23
CN114938394B true CN114938394B (en) 2024-05-17

Family

ID=82862957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210436826.7A Active CN114938394B (en) 2022-04-13 2022-04-13 Cross-cluster network control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114938394B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460075A (en) * 2022-09-14 2022-12-09 深圳前海环融联易信息科技服务有限公司 Multi-network mode implementation method, device, equipment and medium based on cloud-native
CN115333993B (en) * 2022-10-11 2022-12-09 江苏博云科技股份有限公司 Method, equipment and storage medium for customizing container group routing in container environment

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032760A (en) * 2018-08-01 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for application deployment
CN110213358A (en) * 2019-05-23 2019-09-06 深圳壹账通智能科技有限公司 Method, node, equipment and the storage medium of cluster resource scheduling
CN110581873A (en) * 2018-06-11 2019-12-17 中国移动通信集团浙江有限公司 cross-cluster redirection method and monitoring server
CN111614738A (en) * 2020-05-07 2020-09-01 北京金山云网络技术有限公司 Service access method, device, equipment and storage medium based on Kubernetes cluster
US10785158B1 (en) * 2019-05-22 2020-09-22 Chunghwa Telecom Co., Ltd. System and method for provisioning both IPV4 and IPV6 internet service and load balancer service
CN111885123A (en) * 2020-07-06 2020-11-03 苏州浪潮智能科技有限公司 Construction method and device of cross-K8 s target service access channel
CN112615856A (en) * 2020-12-16 2021-04-06 上海道客网络科技有限公司 Multi-cluster network security policy management and control method and system
CN113572838A (en) * 2021-07-22 2021-10-29 北京金山云网络技术有限公司 Network access method, device, equipment and medium based on Kubernetes
CN113572831A (en) * 2021-07-21 2021-10-29 重庆星环人工智能科技研究院有限公司 Communication method between Kubernetes clusters, computer equipment and medium
CN113746887A (en) * 2020-11-05 2021-12-03 北京沃东天骏信息技术有限公司 Cross-cluster data request processing method, device and storage medium
CN113783774A (en) * 2021-08-20 2021-12-10 北京快乐茄信息技术有限公司 Cross-cluster network configuration method and device, communication equipment and storage medium
CN113886058A (en) * 2020-07-01 2022-01-04 中国联合网络通信集团有限公司 Cross-cluster resource scheduling method and device
CN114153566A (en) * 2021-12-20 2022-03-08 浪潮电子信息产业股份有限公司 Cross-processor architecture multi-container inter-cluster service discovery method, device and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7712102B2 (en) * 2004-07-30 2010-05-04 Hewlett-Packard Development Company, L.P. System and method for dynamically configuring a plurality of load balancers in response to the analyzed performance data
US10733029B2 (en) * 2018-07-31 2020-08-04 Hewlett Packard Enterprise Development Lp Movement of services across clusters
US11507479B2 (en) * 2019-09-25 2022-11-22 Sap Se High availability for a relational database management system as a service in a cloud platform
US11755385B2 (en) * 2020-05-29 2023-09-12 Vmware, Inc. Cross-cluster load balancer
US11863352B2 (en) * 2020-07-30 2024-01-02 Vmware, Inc. Hierarchical networking for nested container clusters

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110581873A (en) * 2018-06-11 2019-12-17 中国移动通信集团浙江有限公司 cross-cluster redirection method and monitoring server
CN109032760A (en) * 2018-08-01 2018-12-18 北京百度网讯科技有限公司 Method and apparatus for application deployment
US10785158B1 (en) * 2019-05-22 2020-09-22 Chunghwa Telecom Co., Ltd. System and method for provisioning both IPV4 and IPV6 internet service and load balancer service
CN110213358A (en) * 2019-05-23 2019-09-06 深圳壹账通智能科技有限公司 Method, node, equipment and the storage medium of cluster resource scheduling
CN111614738A (en) * 2020-05-07 2020-09-01 北京金山云网络技术有限公司 Service access method, device, equipment and storage medium based on Kubernetes cluster
CN113886058A (en) * 2020-07-01 2022-01-04 中国联合网络通信集团有限公司 Cross-cluster resource scheduling method and device
CN111885123A (en) * 2020-07-06 2020-11-03 苏州浪潮智能科技有限公司 Construction method and device of cross-K8 s target service access channel
CN113746887A (en) * 2020-11-05 2021-12-03 北京沃东天骏信息技术有限公司 Cross-cluster data request processing method, device and storage medium
CN112615856A (en) * 2020-12-16 2021-04-06 上海道客网络科技有限公司 Multi-cluster network security policy management and control method and system
CN113572831A (en) * 2021-07-21 2021-10-29 重庆星环人工智能科技研究院有限公司 Communication method between Kubernetes clusters, computer equipment and medium
CN113572838A (en) * 2021-07-22 2021-10-29 北京金山云网络技术有限公司 Network access method, device, equipment and medium based on Kubernetes
CN113783774A (en) * 2021-08-20 2021-12-10 北京快乐茄信息技术有限公司 Cross-cluster network configuration method and device, communication equipment and storage medium
CN114153566A (en) * 2021-12-20 2022-03-08 浪潮电子信息产业股份有限公司 Cross-processor architecture multi-container inter-cluster service discovery method, device and equipment

Also Published As

Publication number Publication date
CN114938394A (en) 2022-08-23

Similar Documents

Publication Publication Date Title
US11252228B2 (en) Multi-tenant multi-session catalogs with machine-level isolation
CN107580083B (en) Method and system for allocating IP addresses of containers
US20220377045A1 (en) Network virtualization of containers in computing systems
US10701139B2 (en) Life cycle management method and apparatus
US9999030B2 (en) Resource provisioning method
US11237815B2 (en) Service pool architecture for multitenant services to support canary release
CN114938394B (en) Cross-cluster network control method, device, equipment and storage medium
CN110741352B (en) Virtual network function management system, virtual network function management method and computer readable storage device
US20170371717A1 (en) Resource management in cloud systems
JP2019528005A (en) Method, apparatus, and system for a virtual machine to access a physical server in a cloud computing system
CN108028827B (en) Method and device for managing certificate in network function virtualization architecture
US20170111457A1 (en) Browser Server Session Transfer
CN111510515B (en) Method and device for distinguishing containers of mixed application environment
US11201930B2 (en) Scalable message passing architecture in a cloud environment
CN113810230B (en) Method, device and system for carrying out network configuration on containers in container cluster
US20230042205A1 (en) Customer activation on edge computing environment
CN114924751A (en) Method and device for distributing service access request flow
CN114365107A (en) Network-based media processing (NBMP) workflow management controlled by 5G real-time uplink streaming framework (plus)
CN115604120A (en) Multi-cloud cluster resource sharing method, device, equipment and storage medium
CN114745757B (en) Cluster switching method, device, equipment and medium
CN109067573B (en) Traffic scheduling method and device
CN110347473B (en) Method and device for distributing virtual machines of virtualized network elements distributed across data centers
US10824476B1 (en) Multi-homed computing instance processes
CN112889247B (en) VNF service instantiation method and device
CN113132295A (en) Method and device for accessing extranet by cluster intranet, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant