Cross-cluster service access method and device

By receiving tenant configuration information on the cloud management platform, creating cluster groups and gateways, automatic service access between K8s clusters is achieved, and the automation problem of K8s service access in a multi-cluster environment is solved, reducing management costs and resource usage .

CN118945220APending Publication Date: 2024-11-12HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202311324854.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-12
Filing Date
2023-10-12
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

K8s lacks automated solutions for service access in multi-cluster environments, resulting in complex manual configuration and high management costs. The existing service grid achieves cross-cluster access through sidecars, but its resource occupancy is large and management is difficult.

Method used

Provide a cross-cluster service access method, receive tenant configuration information through the cloud management platform, create cluster groups and gateways, map service name and access address relationships, realize automatic service access, and avoid using sidecar.

Benefits of technology

It realizes automatic access to services in multiple clusters, which is easy to manage, reduces management costs, improves user experience, and avoids sidecar resource occupation and management complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945220A_ABST
    Figure CN118945220A_ABST
Patent Text Reader

Abstract

The invention provides a cross-cluster service access method and a computing device, a tenant configures a created cluster group, and a gateway can send third configuration information to each application gateway, so that when a first application gateway receives a service access request of a client in a first cluster, the service access request of the client in the first cluster is sent to the first application gateway. According to the invention, the service access request can be directly forwarded to the application gateways corresponding to other clusters based on the obtained third configuration information, so that the tenants can access the services in other clusters, automatic access among the services in multiple clusters is realized, management is facilitated, and the management cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of China on May 12, 2023, with application number 202310539823.0 and invention name “A method and device for automatic discovery of cross-container cluster services and automatic network interconnection”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of container application technology, and more specifically, to a method and device for cross-cluster service access. Background Art

[0003] K8s is a lightweight and scalable open source platform for managing containerized applications and services. K8s can be used to automatically deploy and scale applications. K8s combines the containers that make up the application into a logical unit for easy management and discovery. K8s has solved the problem of access between services (also understood as applications) within a single cluster. However, for access between services in multiple clusters, K8s does not provide an automated solution. Currently, it can only be configured manually, which is complex, inconvenient to manage, and prone to errors. At present, although the open source service grid project can support service access across K8s clusters, it is implemented through the sidecar method. A sidecar container is deployed in each pod, and access between services in different clusters is forwarded to the sidecar container through a proxy. Service governance is performed in the sidecar container, but the sidecar resource usage is large and the management cost is high.

[0004] Therefore, a method for cross-cluster service access is needed to achieve automatic access between services in multiple clusters, thereby facilitating management and saving management costs. Summary of the invention

[0005] The present application provides a method for cross-cluster service access, which can realize automatic access between services in multiple clusters, thereby facilitating management and saving management costs.

[0006] In a first aspect, a communication method is provided. The method can be applied in a cloud service system. The method can be executed by a cloud management platform (or a device in a cloud management platform), or can be executed by a component (such as a chip or circuit) of the cloud management platform (or a device in a cloud management platform).

[0007] In the present application, the cloud service system includes multiple clusters, each cluster includes at least a client and at least one working node, each working node includes at least one pod, and each pod is used to provide services.

[0008] The method includes: receiving first configuration information from a tenant, the first configuration information is used to indicate the creation of a cluster group for multiple clusters; creating a cluster group according to the first configuration information, wherein the cluster group includes multiple clusters; receiving second configuration information from the tenant, the second configuration information is used to indicate the creation of a gateway in the cluster group; creating a gateway in the cluster group according to the second configuration information; receiving third configuration information from the tenant, the third configuration information includes: a first mapping relationship between a service name corresponding to a service included in each cluster and a corresponding access address, a second mapping relationship between a service name corresponding to a service included in each cluster and the corresponding cluster information, and a third mapping relationship between each cluster and an application gateway, wherein the cluster information, the gateway is used to send the third configuration information to the application gateway corresponding to each cluster, and the application gateway is used to access the service according to a request message from a client and the third configuration information.

[0009] In this application, the access address corresponding to the service includes one or more of the following: the domain name corresponding to the service, the uniform resource locator URL corresponding to the service, and the Internet Protocol IP address corresponding to the service.

[0010] The “cluster” in this application may be, for example, a K8s cluster.

[0011] In the present application, for example, "cluster information" may include: the name of the cluster, the name of the working node in the cluster, and the name of the pod in the working node.

[0012] Based on the above technical solution, the present application provides a method and computing device for cross-cluster service access. The tenant configures the created cluster group, and the gateway can send the third configuration information to each application gateway, so that when the first application gateway receives a service access request from a client in the first cluster, it can directly forward the service access request to the application gateway corresponding to other clusters based on the obtained third configuration information, thereby ensuring that the tenant can access services in other clusters. In the present application, through the configuration of the tenant in the cluster, automatic mutual access of services between different clusters can be achieved, that is, automatic connection of the network across clusters is achieved, which is more convenient than the tenant's static manual configuration of the network, improves the user's business experience, and avoids the use of sidecar to achieve cross-cluster service mutual access, which is easy to manage and saves management costs.

[0013] In a possible implementation, multiple clusters include a first cluster and a second cluster, the first cluster includes a first client, and the first cluster is associated with a first application gateway. The method also includes: the first client obtains a first IP address corresponding to a first domain name; the first client sends a first request message to the first application gateway, the first request message carries the first IP address, and the first request message is used to request access to the first IP address; the first application gateway determines that the service identifier corresponding to the first IP address is the first identifier based on the first request message and the first mapping relationship, determines that the first identifier is the identifier corresponding to the service in the second cluster based on the second mapping relationship, and determines that the second cluster is associated with the second application gateway based on the third mapping relationship; the first application gateway sends a first request message to the second application gateway.

[0014] In a possible implementation manner, the gateway sends third configuration information to the first application gateway and the second application gateway.

[0015] For example, the gateway may send the third configuration information to the application gateways corresponding to each cluster based on the triggering of a service access request message from a client in a cluster in the cluster group.

[0016] Exemplarily, the gateway may send all the third configuration information to the application gateway corresponding to each cluster.

[0017] Exemplarily, the gateway may determine the configuration information that needs to be sent based on the service access request message of the client, and to which application gateways the required configuration information needs to be sent. For example, if the gateway determines based on the service access request message of the client that the service access request is a request from a client in cluster #1 to access service #C in cluster #2, the gateway may only send configuration information #1 related to service #C to application gateway #1 corresponding to cluster #1 and application gateway #2 corresponding to cluster #2, where configuration information #1 is part of the configuration information in the third configuration information.

[0018] In a possible implementation, the method also includes: the second application gateway determines that the service identifier corresponding to the first IP address is the first identifier based on the first IP address and the first mapping relationship carried in the first request message, and determines that the first identifier corresponds to the second pod in the second working node in the second cluster based on the second mapping relationship; the second application gateway sends a second request message to the second pod, and the second request message is used to request access to the service corresponding to the first identifier.

[0019] In a possible implementation, the first cluster also includes a first module, on which a fourth mapping relationship between a domain name and an IP address is configured, the first module is used for domain name resolution, and the first client obtains a first IP address corresponding to the first domain name, including: the first client sends a third request message to the first module, the third request message carries the first domain name, and the third request message is used to request to obtain the Internet Protocol IP address corresponding to the first domain name; the first client receives a first response message from the first module, the first response message carries the first IP address, and the first IP address is determined by the first module.

[0020] In the present application, the first module may be an extension module, for example, an operator module.

[0021] Based on the above technical solution, in this application, domain name resolution can be achieved through the first module, and service access requests can be sent to gateways corresponding to other clusters through the application gateway, thereby achieving cross-cluster service access.

[0022] In a second aspect, the present application proposes a device for executing the method of the first aspect. Specifically, the device may include a unit and / or module for executing a communication method proposed in the present application, such as a transceiver unit and / or a processing unit. In the present application, the device is applied to a cloud management platform. Alternatively, the device is a cloud management platform.

[0023] In a third aspect, the present application provides a device, the device comprising: at least one processor, configured to execute a computer program or instruction stored in a memory to perform the method of the first aspect. Optionally, the device further comprises a memory, configured to store a computer program or instruction. Optionally, the device further comprises a communication interface, and the processor reads the computer program or instruction stored in the memory through the communication interface.

[0024] In one implementation, the device is a device used in a cloud management platform for implementing the functions of the above communication method in a chip. Alternatively, the device is a cloud management platform.

[0025] In another implementation, the device is a chip, a chip system or a circuit applied to a cloud management platform for implementing the functions of the above-mentioned communication method in a chip.

[0026] In a fourth aspect, the present application provides a processor, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of the first aspect.

[0027] In the specific implementation process, the processor can be one or more chips, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a transceiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0028] For the operations such as sending and acquiring / receiving involved in the processor, unless otherwise specified, or unless they conflict with their actual function or internal logic in the relevant description, they can be understood as operations such as processor output, reception, input, etc., or as sending and receiving operations performed by the radio frequency circuit and antenna, and this application does not limit this.

[0029] In a fifth aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter to execute the method of the first aspect.

[0030] Optionally, the number of the processors is one or more, and the number of the memories is one or more.

[0031] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0032] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0033] It should be understood that the related data interaction process, such as sending indication information, can be a process of outputting indication information from the processor, and receiving capability information can be a process of receiving input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Among them, the transmitter and the transceiver can be collectively referred to as a transceiver.

[0034] The processing device in the fifth aspect may be one or more chips. The processor in the processing device may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.

[0035] In a sixth aspect, a computing cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method described in any possible implementation manner in the first aspect.

[0036] Optionally, the processor may be a general-purpose processor, which may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated in the processor or located outside the processor and exist independently.

[0037] In a seventh aspect, a computer-readable storage medium is provided, wherein the computer-readable medium stores a program code for execution by a device, wherein the program code includes a method for executing the above-mentioned first aspect.

[0038] According to an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method according to the first aspect.

[0039] In a ninth aspect, a chip system is provided, comprising a processor for calling and running a computer program from a memory, so that a device equipped with the chip system executes the method of the first aspect.

[0040] In the tenth aspect, a cloud service system is provided, which includes a cloud management platform, and computing nodes and / or network nodes, wherein the cloud management platform is used to execute the method in any possible implementation of the first aspect above, and the computing node is used to execute related actions of the first client, the first application gateway, and the second application gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of the K8s cluster architecture shown in this application.

[0042] Figure 2 It is a schematic diagram of a cloud service scenario to which this application is applicable.

[0043] Figure 3 It is a schematic flow chart of a cross-cluster service access method 300 provided in the present application.

[0044] Figure 4 This is another schematic flow chart of a cross-cluster service access method provided by the present application.

[0045] Figure 5 This is another schematic flowchart of a cross-cluster service access method provided by the present application.

[0046] Figure 6 This is another schematic diagram of a K8s cluster architecture provided by this application.

[0047] Figure 7 This is another schematic diagram of a K8s cluster architecture provided by this application.

[0048] Figure 8 It is a schematic diagram of a system architecture applicable to the present application.

[0049] Fig. 9 It is a schematic block diagram of the device 900 provided in this application.

[0050] Fig.10 It is a schematic block diagram of the device 1000 provided in this application.

[0051] Fig.11 It is a schematic diagram of the architecture of a computing device cluster provided by this application.

[0052] Fig.12 It is a schematic diagram of the connection between computing devices 1100A and 1100B provided by the present application through a network. DETAILED DESCRIPTION

[0053] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0054] 1. K8s

[0055] K8s (Kubernetes) is an example of a well-architected distributed system that treats all machines in the cluster as part of a single resource pool. K8s has two layers: head nodes (master) and worker nodes (node). The head node or master node consists of the control plane and the worker node application. A K8s cluster consists of many head nodes and worker nodes.

[0056] When K8s is physically divided, it is divided into two types of hosts, master nodes and node nodes. Among them, the master node is mainly used for scheduling, controlling cluster resources and other functions; while the node node is mainly used to run containers, that is, nodes that run services. The master is used to store various metadata, and the node is a working node, mainly used to run various services. The node node communicates with the master regularly and reports information through the kubelet process.

[0057] 2. Pod

[0058] Pod is the smallest unit created or deployed in K8s. A pod represents a process running on the cluster. A pod consists of one or more containers. The containers in the pod share network, storage, and computing resources and run on the same Docker host. Multiple containers can run in a pod, and in a production environment, a single container or multiple containers with strong correlation and complementarity usually make up a pod. A pod can only run on one host, while a host can have multiple pods.

[0059] 3. Container

[0060] A container is a runnable software package that contains a complete executable program, including code and default values ​​for runtime applications, system libraries, and all important settings. Inside the container, applications run in an isolated environment, which is usually provided by a container engine. They use the host system's kernel and package the application and its dependencies together to run as a container. Because containers share resources with the host system, they are usually lighter and easier to start and stop than virtual machines.

[0061] 4. Service

[0062] In a K8s cluster, each pod is assigned a separate Internet Protocol (IP) address. However, since pods have a lifecycle (they can be created and will not be restarted after being destroyed), the IP address may disappear at any time due to business changes.

[0063] "Service" is used to solve this problem. The service in K8s can be understood as a gateway layer, which can be regarded as an external access interface and traffic balancer for a group of pods that provide the same service. The service that the client needs to access is the service object. Each service has a fixed virtual IP address, which can automatically and dynamically bind to the backend pod. All network requests directly access the virtual IP of the service, and the service will automatically forward to the backend. In addition to providing a stable external access method, the service can also play a load balancing function, automatically distributing the request traffic to all backend services. The service can be horizontally expanded transparently to customers.

[0064] Service is the core of K8s service. It shields service details and uniformly exposes service interfaces to the outside world, truly achieving "microservices". For example, a service #A has three replicas deployed, that is, three pods. For tenants, they only need to pay attention to the entry of one service, without worrying about which pod should be requested. The advantages of this are: on the one hand, external tenants do not need to perceive the IP changes caused by the accidental crash of the service on the pod and the re-pulling of the pod by K8s; on the other hand, external tenants do not need to perceive the IP address changes caused by the replacement of pods due to upgrades and changes in services.

[0065] Figure 1 This is a schematic diagram of the internal system architecture of K8s shown in this application. Figure 1 Two K8s clusters are shown in the figure, and K8s cluster #1 is taken as an example for introduction. The cluster includes two working nodes, namely node#1 and node#2. Node#1 includes two pods, namely pod#11 and pod#12. Pod#11 includes two containers, one of which is container #111; pod#12 includes three containers, one of which is container #121. Node#2 in K8s cluster #1 can be understood similarly, and K8s cluster #2 can also be understood in the same way, so we will not go into details. At present, for access between services in multiple clusters, you can manually configure the IP address and other information of the gateway. The configuration is complex, inconvenient to manage, and prone to errors. In other words, the network of node nodes between different clusters cannot be automatically connected and needs to be manually configured. For example, Figure 1 The network between node#1 in K8s cluster #1 and node#3 in K8s cluster #2 cannot be automatically connected. Some IP address information needs to be manually configured to achieve cross-cluster service access.

[0066] In view of this, the present application provides a service access method that can realize automatic service mutual access between different K8s clusters, and realize automatic connection of networks across K8s clusters. Compared with the static manual network configuration method of tenants, it is more convenient, improves the user's business experience, and avoids the use of sidecar to realize service mutual access across clusters, which is easy to manage and saves management costs. It avoids the use of sidecar to realize service mutual access across clusters, which is easy to manage and saves management costs.

[0067] The communication method provided in the embodiment of the present application can be applied to the cloud service scenario, and the method is executed by the cloud management platform in the cloud service scenario. Figure 2 , describe the cloud service scenarios in detail.

[0068] Figure 2 is a schematic block diagram of a cloud scenario applicable to an embodiment of the present application. Figure 2 As shown, the cloud scenario may include: a cloud management platform 210 , the Internet 220 , and a client 230 .

[0069] like Figure 2 As shown, the cloud management platform 210 is used to manage the infrastructure that provides multiple cloud services. The infrastructure includes multiple cloud data centers, each of which includes multiple servers, and each server includes cloud service resources to provide corresponding cloud services to tenants. In the embodiment of the present application, the cloud service resources can be cloud databases.

[0070] The cloud management platform 210 may be located in a cloud data center, and it may provide an access interface (such as an interface or an application program interface (API)). The tenant may operate the client 230 to remotely access the access interface to register a cloud account and password on the cloud management platform 210, and log in to the cloud management platform 210. After the cloud management platform 210 successfully authenticates the cloud account and password, the tenant may further pay to select and purchase a virtual machine of specific specifications (processor, memory, disk) on the cloud management platform 110. After the paid purchase is successful, the cloud management platform 210 provides the remote login account and password of the purchased virtual machine, and the client 230 may remotely log in to the virtual machine, and install and run the tenant's application in the virtual machine. Therefore, the tenant may create, manage, log in and operate virtual machines in the cloud data center through the cloud management platform 210.

[0071] The functions of the cloud management platform 210 include, but are not limited to, a tenant console, computing management services, network management services, storage management services, authentication services, and image management services. The tenant console provides an interface or API to interact with tenants. The computing management service is used to manage servers running virtual machines and containers and bare metal servers. The network management service is used to manage network services (such as gateways, firewalls, etc.). The storage management service is used to manage storage services (such as data bucket services). The authentication service is used to manage tenant accounts and passwords, and the image management service is used to manage virtual machine images. Tenants can use the client 210 to log in to the cloud management platform 210 through the Internet 220 to manage the rented cloud services.

[0072] In this application, the K8s cluster can be deployed in a public cloud, a private cloud, a traditional data center, or a physical machine, without limitation.

[0073] Figure 3 is a schematic flow chart of a method 300 for accessing services across clusters shown in the present application. The method may be, for example, Figure 2 The cloud management platform in the cloud service system shown in FIG. 1 is executed. As described above, the cloud service system includes multiple clusters, each cluster includes at least a client and at least one working node, each working node includes at least one pod, and each pod is used to provide services. Figure 3 As shown, the method includes:

[0074] 310. Receive first configuration information from a tenant, where the first configuration information is used to instruct to create a cluster group for multiple clusters.

[0075] The "cluster" in this application can be understood as a K8s cluster, for example.

[0076] In a possible implementation, the first configuration information includes the names of multiple clusters input by the tenant.

[0077] Exemplarily, the cloud management platform may receive first configuration information from a tenant. Assume that the name of one cluster may be recorded as cluster #1, the name of another cluster may be recorded as cluster #2, the name of another cluster may be recorded as cluster #3, and so on.

[0078] 320. Create a cluster group according to the first configuration information, where the cluster group includes multiple clusters.

[0079] Exemplarily, the cloud management platform can create a "clusterset" for the tenant according to the first configuration information, where the clusterset represents a cluster group. The cluster group includes each cluster deployed by the tenant. In other words, each cluster deployed by the tenant can be added to the cluster group.

[0080] 330. Receive second configuration information from the tenant, where the second configuration information is used to instruct to create a gateway in the cluster group.

[0081] Exemplarily, the cloud management platform may receive second configuration information from the tenant.

[0082] 340. Create a gateway in the cluster group according to the second configuration information.

[0083] Exemplarily, the cloud management platform may create a gateway in the cluster group according to the second configuration information.

[0084] In this application, for example, advanced traffic management policies can be configured on the gateway.

[0085] 350, receiving third configuration information from the tenant.

[0086] In the present application, the third configuration information includes: a first mapping relationship between the service name corresponding to the service included in each cluster and the access address corresponding to the service, a second mapping relationship between the service name corresponding to the service included in each cluster and the cluster information corresponding to the service, and a third mapping relationship between each cluster and the application gateway.

[0087] In the present application, the cluster information can be used to determine the cluster. In other words, which cluster it is can be determined based on the cluster information.

[0088] Exemplarily, the cluster information may include the name of the cluster, the name of the working node in the cluster, and the name of the pod in the working node.

[0089] In the present application, for example, the access address corresponding to the service may be the domain name corresponding to the service; for another example, the access address corresponding to the service may be the uniform resource locator URL corresponding to the service; for another example, the access address corresponding to the service may be the Internet Protocol IP address corresponding to the service.

[0090] The various mapping relationships included in the third configuration information are introduced below.

[0091] Exemplarily, the tenant can enter the service name corresponding to the service included in each K8s cluster and the corresponding access address. For example, the tenant deploys two K8s clusters, namely K8s cluster #1 and K8s cluster #2, wherein K8s cluster #1 includes two services, respectively recorded as service #A and service #B; K8s cluster #2 includes one service, recorded as service #C. Taking the access address as a domain name as an example, it is assumed that the domain name of service #A is domain name #1, the domain name of service #B is domain name #2, and the domain name of service #C is domain name #3. Taking the access address as a URL as an example, it is assumed that the URL of service #A is URL #1, the URL of service #B is URL #2, and the URL of service #C is URL #3. Taking the access address as an IP address as an example, the IP address of service #A is IP address #1, the IP address of service #B is IP address #2, and the IP address of service #C is IP address #3. For example, the first mapping relationship can be in the form of a table, as shown in Table 1 below.

[0092] Table 1

[0093] Service Name Access address Service#A Domain name #1, URL #1, IP address #1 Service#B Domain name #2, URL #2, IP address #2 Service#C Domain name #3, URL #3, IP address #3

[0094] The first mapping relationship in this application can also be understood as the routing rules configured by the tenant. For example, the hypertext transfer protocol (HTTP) route represents the 7-layer routing rules, the transmission control protocol (TCP) route or the user datagram protocol (UDP) represents the 4-layer routing rules, the transport layer security protocol (TLS) represents the encryption rule routing, and the Google Remote Procedure Call Protocol (GRPC) based on HTTP2 released by Google represents the routing specifications of the grpc protocol. The destination of the route in this application is the service imported into the cluster group.

[0095] As mentioned above, "services" are actually provided by a pod in a node in a cluster. Therefore, services in each cluster can be located by specific pods that provide services. For example, assume that service #A is provided by pod #11 in node #1 in K8s cluster #1; service #B is provided by pod #21 in node #2 in K8s cluster #1; service #C is provided by pod #31 in node #3 in K8s cluster #2. For example, the second mapping relationship can be in the form of a table, as shown in Table 2 below.

[0096] Table 2

[0097] Service Name Access address Service#A K8s cluster #1—node node #1—pod #11 Service#B K8s cluster #1—node #2—pod #21 Service#C K8s cluster #2—node node #3—pod #31

[0098] In the present application, "cluster information" may include, for example, the name of the cluster, the name of the working node in the cluster, and the name of the pod in the working node. Alternatively, "cluster information" may include the name of the cluster, the address of the working node in the cluster, and the address of the pod in the working node. Alternatively, the second mapping relationship may be understood as being able to know through the second mapping relationship which pod on which node in which cluster provides a certain service. It should be noted that multiple pods can provide the same service. For example, service #A can be provided by pod #11 and pod #12 in node #1.

[0099] It should be noted that in this application, each cluster has its own corresponding application gateway, which is used to provide routing for service access requests of clients in the corresponding cluster. For example, it is assumed that the application gateway corresponding to K8s cluster #1 is application gateway #1, the application gateway corresponding to K8s cluster #2 is application gateway #2, and the application gateway corresponding to K8s cluster #3 is application gateway #3. For example, the third mapping relationship can be in the form of a table, as shown in Table 3 below.

[0100] Table 3

[0101] Cluster Application Gateway K8s cluster #1 Application Gateway #1 K8s Cluster #2 Application Gateway #2 K8s Cluster #3 Application Gateway #3

[0102] It can also be understood that the address of the application gateway corresponding to each K8s cluster can be obtained according to the third mapping relationship.

[0103] 360. Configure the third configuration information to the gateway, where the gateway is used to send the third configuration information to the application gateway corresponding to each cluster, where the application gateway is used to access the service according to the request message of the client and the third configuration information.

[0104] For example, the gateway may send the third configuration information to the application gateways corresponding to each cluster based on the triggering of a service access request message from a client in a cluster in the cluster group.

[0105] In a possible implementation manner, the gateway may send all the third configuration information to the application gateways corresponding to each cluster.

[0106] In another possible implementation, the gateway may determine the configuration information that needs to be sent based on the service access request message of the client, and to which application gateways the required configuration information needs to be sent. For example, if the gateway determines based on the service access request message of the client that the service access request is a request from a client in cluster #1 to access service #C in cluster #2, the gateway may only send configuration information #1 related to service #C to application gateway #1 corresponding to cluster #1 and application gateway #2 corresponding to cluster #2, where configuration information #1 is part of the configuration information in the third configuration information.

[0107] It should be noted that the present application also configures a global controller and local controllers. The global controller is connected to the gateway, and when the tenant uses the cluster service to access, the third configuration information is distributed to each local controller; the local controller can manage the cluster nearby, and one local controller manages one to multiple sites. The local controller receives the configuration information of the global controller and sends the configuration information to the corresponding cluster and application gateway.

[0108] The above method 300 mainly introduces the process of tenant configuration. The above tenant configuration process can also refer to Figure 4 To understand, such as Figure 4 As shown, the method includes:

[0109] Step 1: Create a K8s cluster group.

[0110] For example, you can create a clusterset, which represents a cluster group, and add the K8s cluster #1 and K8s cluster #2 deployed by the tenant to the cluster group.

[0111] Step 2: Import the services in each K8s cluster into the cluster group.

[0112] For example, the services included in each K8s cluster can be exported (service export) first, and then imported (service import) into the cluster group. For example, service #A and service #B in cluster #1 can be exported from their respective clusters, and then imported into the cluster group.

[0113] Step 3: Create a gateway in the cluster group.

[0114] Step 4: Configure the gateway.

[0115] As mentioned above, the first mapping relationship, the second mapping relationship and the third mapping relationship can be configured on the gateway. Specifically, the specific contents of the first mapping relationship to the third mapping relationship can refer to the description in step 350 of the above method 300, which will not be repeated here.

[0116] Step 5: The gateway sends configuration information to each application gateway through the global controller.

[0117] For example, when a client in a K8s cluster has a service access request, the gateway will send configuration information to the global controller, the global controller will send the configuration information to each local controller, and each local controller will send the configuration information to the corresponding application gateways.

[0118] The above method 300 introduces the tenant configuration process. The following will introduce how to implement cross-cluster service access based on tenant configuration.

[0119] In this application, an extension component is deployed in each K8s cluster, and the extension component is used to perform domain name resolution, wherein the fourth mapping relationship between the domain name and the IP address is configured on the extension component. For example, the extension component can be an operator.

[0120] Assume that client #1 (an example of the first client) in K8s cluster #1 needs to access service #C, then client #1 can first send a request message #1 (an example of the third request message) to the extension component, and the request message #1 carries the domain name of service #C (an example of the first domain name). The request message #1 is used to request the IP address corresponding to service #C. After receiving the request message, the extension component determines that the IP address corresponding to service #C is IP address #1 based on the configured fourth mapping relationship, and sends a response message #1 (an example of the first response message) to client #1, and the response message #1 carries the IP address #1 corresponding to service #C.

[0121] Exemplarily, after client #1 obtains the IP address corresponding to service #C, it sends request message #2 (an example of the first request message) to application gateway #1. Request message #2 carries IP address #1. Request message #2 is used to request access to the IP address. The first application gateway determines that the identifier of the service corresponding to IP address #1 is service #C based on the received request message #2 and the configuration information #1 received from the gateway (for example, including the first mapping relationship, the second mapping relationship, and the third mapping relationship). Based on the first mapping relationship, it is determined that service #C is located in K8s cluster #2, and based on the third mapping relationship, it is determined that K8s cluster #2 is associated with application gateway #2 (an example of the first application gateway). Therefore, application gateway #1 can send request message #2 to application gateway #2. Application gateway #2 determines that the service corresponding to the IP address is service #C based on the IP address #1 carried in request message #2 and the first mapping relationship, and determines that service #C is provided by pod #7 (the second pod) on node #4 (an example of the second working node) in cluster #2 based on the second mapping relationship. Therefore, application gateway #2 sends a request message #3 (an example of a second request message) to pod #7 for requesting access to service #C.

[0122] Figure 5 A schematic diagram showing a client accessing a service is shown in FIG. Figure 5 As shown in the figure, the client in K8s cluster #1 sends a request message to application gateway #2 through application gateway #1, and application gateway #2 routes the request message to the corresponding pod, thereby achieving cross-cluster service access. Figure 5 It can be seen that the cross-K8s cluster service access method provided by this application can uniformly forward service access requests to the application gateway corresponding to the K8s cluster (for example, application gateway #1), which can perform load or governance. In this application, the application gateway can provide the IP address of the pod to be accessed for providing the target service based on the received service access request, and encapsulate the service access request message (for example, using a virtual eXtensible local area network (vxlan)) and send it to the application gateway corresponding to the K8s cluster where the target service is located (for example, application gateway #2), which only performs routing and does not perform load. It can also be understood that the data plane only needs to perform load once, avoiding the problem of uneven load caused by multiple loads.

[0123] As can be seen from the above introduction, in this application, two new functions are extended in each tenant K8s cluster. One of the new functions is to forward the client's service access request to the application gateway corresponding to the cluster. For example, this function can be implemented by the proxy component in the K8s cluster, such as Figure 6 As shown, the proxy component can be the route-agent component in the figure. The route-agent can also monitor the services and pods of other K8s clusters, and forward service access requests to the application gateway. For example, this function can be implemented by the standard K8s cluster application program interface API. For example, as long as a K8s cluster implements this API, there is no need to deploy additional proxy components to implement this function. The API's custom resource definitions (CRD) are defined as: "destinations" represents the destination network segment list; "next-hop: represents the next hop information, which can be understood as the attributes included in the routing forwarding CRD. Another new feature is the implementation of automatic service discovery and domain name resolution. In this application, services accessed across clusters need to be automatically injected into the tenant K8s cluster in order to achieve automatic access to the service. For example, this function can be implemented by an extension component, and for example, the service domain names of other sites can be resolved by a proxy component. As Figure 7 As shown, the proxy component can be Figure 7 The domain name system (DNS) agent in the server.

[0124] Exemplarily, the application gateway in the present application can be a centralized gateway, for example, it can be pre-deployed. For example, it can be deployed in a virtual private cloud (VPC) on the cloud, it can also be deployed in a traditional data center, or it can be deployed in a VPC on the cloud. For example, the tenant's K8s cluster can also be deployed in a VPC, and the VPC network where the application gateway is located and the VPC network where the tenant's K8s is located are automatically connected, and the local controller connects the VPC network. For another example, the application gateway can be deployed in a traditional data center, and the tenant's K8s cluster can also be deployed in a traditional data center. The network of the application gateway and the tenant's K8s network can be pre-configured and connected through the physical network.

[0125] After the application gateway is deployed, it can be managed by the control plane. Each resource pool has a corresponding application gateway. The application gateway cluster is deployed. After the tenant K8s cluster in the resource pool joins the cluster group, it is scheduled by the control plane. For example, the mapping relationship with the application gateway can be configured. At this time, the cross-cluster service access requests in the tenant K8s cluster can be uniformly forwarded to the corresponding application gateway.

[0126] As mentioned above, Figure 8 A schematic diagram of a system architecture applicable to the present application is shown, such as Figure 8As shown, the system architecture is divided into the orchestration layer, the global control layer, the local control layer and the data plane forwarding layer from top to bottom. Among them, the "orchestration layer" is used to provide a service-oriented console to facilitate tenants to use the functions of automatic service discovery and automatic network intercommunication when they use cross-K8s clusters. For example, the orchestration layer can be used to create cluster groups, service management, service gateway management, gray release, service traffic governance, service security, site management, and gateway management. The "global control layer" can also be called the "global controller", which is responsible for distributing the tenant's configuration to each local controller when the tenant uses cross-K8s cluster services. For example, the global controller can be used for service discovery, cross-cluster service access, service resource management, service policy management, site resource management, and gateway resource management. The "local control layer" can also be called the "local controller" to manage the K8s cluster in the nearest site. A local controller can manage one or more sites. The local controller receives the configuration of the global controller and sends the configuration information to the K8s cluster and the application gateway. In this application, the global control layer can be separated from the local control layer, the global control layer logic is unified, the local control layer is nearby, partially autonomous, and highly reliable. The local control layer can connect to the tenant's K8s control plane and the application gateway to open up the data plane. The "data plane forwarding layer" is used to receive the configuration of the local controller and is responsible for forwarding service access requests across K8s clusters, including traffic load and other governance functions.

[0127] As mentioned above, in this application, pod is the entity that provides services. After the service access request passes through the application gateway load, it is finally forwarded to the pod. The pod can be elastically scalable. Pod changes (for example, pod location changes, or new pods are added) need to be notified to the application gateway so that the application gateway can correctly forward the service method request to the pod. The pod is managed by the tenant's K8s cluster, and the extension component in the tenant's k8s (for example, operator) needs to notify the local controller in reverse. The local controller then sends it to the local application gateway to refresh the routing information, and notifies the global controller, which sends it to the local controllers of other clusters in the cluster group, and then the local controller notifies the application gateway to send the pod's routing information.

[0128] Based on the above scheme, in this application, the tenant configures the created cluster group, and the gateway can send the third configuration information to each application gateway, so that when the first application gateway receives the service access request from the client in the first cluster, it can directly forward the service access request to the application gateway corresponding to other clusters based on the obtained third configuration information, thereby ensuring that the tenant can access the services in other clusters. In this application, automatic mutual access between services between different clusters can be achieved, that is, automatic connection between networks across clusters is achieved, which is more convenient than the tenant's static manual configuration of the network, improves the user's business experience, and avoids the use of sidecar to achieve service mutual access between clusters, which is easy to manage and saves management costs.

[0129] It can be understood that the term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0130] Those skilled in the art should be aware that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0131] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0132] Fig. 9 900 is a schematic block diagram of an apparatus 900 provided in an embodiment of the present application. As shown in the figure, the computing apparatus 900 may include: a transceiver module 910 and a processing module 920.

[0133] Among them, the above-mentioned modules are respectively used to execute the steps of the above-mentioned methods, which will not be repeated here.

[0134] It should also be understood that the apparatus 900 herein is embodied in the form of a functional unit. The term "unit" herein may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0135] The apparatus 900 of each of the above schemes has the function of implementing the corresponding steps of the above method 300. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions; for example, the determination unit and the like can be replaced by a processor to respectively perform the transceiver operations and related processing operations in each method embodiment. In addition, the determination unit can be a processing circuit.

[0136] In a possible implementation, the device 900 may be a device in the method 300 described above and applied in a cloud management platform, and the device is used to execute the actions in the method 300 described above.

[0137] In another possible implementation, the device 900 may be the cloud management platform in the above method 300 , and the cloud management platform is used to execute the actions in the above method 300 .

[0138] It should be pointed out that Fig. 9 The device in the above method can be the cloud management platform (or the device in the cloud management platform) in the above method embodiment, or it can be a chip or chip system corresponding to the cloud management platform (or the device in the cloud management platform), such as a system on chip (SoC). The processing unit is a processor or microprocessor or integrated circuit integrated on the chip. This is not limited here.

[0139] Fig.10 1 is a schematic block diagram of another device 1000 provided in an embodiment of the present application. As shown in the figure, the device 1000 includes: at least one processor 1020. The processor 1020 is coupled to the memory and is used to execute instructions stored in the memory to send signals and / or receive signals. Optionally, the device 1000 also includes a memory 1030 for storing instructions. Optionally, the device 1000 also includes a transceiver 1010, and the processor 1020 controls the transceiver 1010 to send signals and / or receive signals.

[0140] It should be understood that the processor 1020 and the memory 1030 may be combined into one processing device, and the processor 1020 is used to execute the program code stored in the memory 1030 to implement the above functions. In specific implementation, the memory 1030 may also be integrated into the processor 1020, or independent of the processor 1020.

[0141] It should also be understood that the transceiver 1010 may include a transceiver (or receiver) and a transmitter (or transmitter). The transceiver may further include an antenna, and the number of antennas may be one or more. The transceiver 1010 may also be a communication interface or an interface circuit.

[0142] Specifically, the processor 1020 in the device 1000 may correspond to the processing module 920 in the device 900. The transceiver 1010 in the device 1000 may correspond to the processing module 910 in the device 900.

[0143] As a solution, the device 1000 is used to implement the steps corresponding to the device applied in the cloud management platform in the above method 300 embodiment.

[0144] As another solution, the device 1000 is used to implement the steps corresponding to the cloud management platform in the above method 300 embodiment.

[0145] For example, the processor 1020 is used to execute the computer program or instructions stored in the memory 1030 to implement each step in the above method 300.

[0146] Fig.11 : is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of the present application. The computing device cluster includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smart phone. Fig.11 As shown, the computing device cluster includes at least one computing device 1100. The memory 1030 in one or more computing devices 1100 in the computing device cluster may store the same instructions for executing the actions executed by the cloud management platform (or the devices in the cloud management platform) in the above embodiment 300.

[0147] In some possible implementations, the memory 1130 of one or more computing devices 1100 in the computing device cluster may also respectively store partial instructions for executing the actions performed by the cloud management platform (or, the devices in the cloud management platform) in the method 300 described in the above embodiment. In other words, the combination of one or more computing devices 1100 may jointly execute instructions for executing the actions performed by the cloud management platform (or, the devices in the cloud management platform) described in the above embodiment.

[0148] It should be noted that the memory 1130 in different computing devices 1100 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the computing device 1100. That is, the instructions stored in the memory 1130 in different computing devices 1100 may implement the functions of one or more modules of the transceiver module 910 and the processing module 920.

[0149] Alternatively, the memory 1130 in different computing devices 1100 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the cloud management platform (or the devices in the cloud management platform) corresponding to the above devices 900 to 1000. That is, the instructions stored in the memory 1130 in different computing devices 1100 may implement the functions of one or more modules in the transceiver module 910 and the processing module 920.

[0150] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig.12 A possible implementation is shown. Fig.12 As shown, two computing devices 1100A and 1100B are connected via a network. Specifically, they are connected to the network via a communication interface in each computing device.

[0151] It should be understood that Fig.12 The functions of the computing device 1100A shown in FIG. 1 may also be completed by multiple computing devices 1100. Similarly, the functions of the computing device 1100B may also be completed by multiple computing devices 1100.

[0152] In this embodiment, a computer program product including instructions is also provided, and the computer program product may be software or a program product including instructions that can be run on a computing device cluster or stored in any available medium. When the computer program product is run by a computing device cluster, the computing device cluster executes the method provided above, or the computing device cluster implements the function of the device provided above.

[0153] In this embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions. When the instructions in the computer-readable storage medium are executed on the computing device, the computing device executes the method provided above.

[0154] In this embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions. When the instructions in the computer-readable storage medium are executed by a computing device cluster, the computing device cluster executes the method provided above.

[0155] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0157] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0160] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for cross-cluster service access, characterized in that: The method is applied to a cloud management platform in a cloud service system, wherein the cloud service system includes multiple clusters, each cluster includes at least a client and at least one working node, each working node includes at least one pod, and each pod is used to provide services. The method includes: receiving first configuration information from a tenant, where the first configuration information is used to instruct to create a cluster group for the plurality of clusters; Creating the cluster group according to the first configuration information, wherein the cluster group includes the multiple clusters; receiving second configuration information from the tenant, where the second configuration information is used to instruct to create a gateway in the cluster group; Creating the gateway in the cluster group according to the second configuration information; Receive third configuration information from the tenant, the third configuration information including: a first mapping relationship between a service name corresponding to a service included in each cluster and a corresponding access address, a second mapping relationship between a service name corresponding to a service included in each cluster and corresponding cluster information, and a third mapping relationship between each cluster and an application gateway corresponding to each cluster, wherein the cluster information is used to determine the cluster; The third configuration information is configured to the gateway, and the gateway is used to send the third configuration information to the application gateway corresponding to each cluster, and the application gateway is used to access the service according to the request message of the client and the third configuration information.

2. The method according to claim 1, characterized in that The access address corresponding to the service includes one or more of the following: a domain name corresponding to the service, a uniform resource locator URL corresponding to the service, and an Internet Protocol IP address corresponding to the service.

3. The method according to claim 1 or 2, characterized in that: The cluster information includes: the name of the cluster, the name of the working node in the cluster, and the name of the pod in the working node.

4. The method according to any one of claims 1 to 3, characterized in that The multiple clusters include a first cluster and a second cluster, the first cluster includes a first client, and the first cluster is associated with a first application gateway. The method further includes: The first client obtains a first IP address corresponding to the first domain name; The first client sends a first request message to the first application gateway, where the first request message carries the first IP address, and the first request message is used to request access to the first IP address; The first application gateway determines, according to the first request message and the first mapping relationship, that the service identifier corresponding to the first IP address is the first identifier, determines, according to the second mapping relationship, that the first identifier is the identifier corresponding to the service in the second cluster, and determines, according to the third mapping relationship, that the second cluster is associated with the second application gateway; The first application gateway sends the first request message to the second application gateway.

5. The method according to claim 4, characterized in that The method further comprises: The gateway sends the third configuration information to the first application gateway and the second application gateway.

6. The method according to claim 5, characterized in that: The method further comprises: The second application gateway determines, based on the first IP address and the first mapping relationship carried in the first request message, that the service identifier corresponding to the first IP address is the first identifier, and determines, based on the second mapping relationship, that the first identifier corresponds to the second pod in the second working node in the second cluster; The second application gateway sends a second request message to the second pod, where the second request message is used to request access to the service corresponding to the first identifier.

7. The method according to any one of claims 4 to 6, characterized in that The first cluster further includes a first module, on which a fourth mapping relationship between the domain name and the IP address is configured, and the first module is used for domain name resolution. The first client obtains a first IP address corresponding to the first domain name, including: The first client sends a third request message to the first module, where the third request message carries a first domain name, and the third request message is used to request to obtain an Internet Protocol IP address corresponding to the first domain name; The first client receives a first response message from the first module, where the first response message carries the first IP address, and the first IP address is determined by the first module.

8. A device, the device is applied to a cloud management platform in a cloud service system, the cloud service system includes multiple clusters, each cluster includes at least a client and at least one working node, each working node includes at least one pod, each pod is used to provide services, the device includes: Transceiver module and processing module, The transceiver module is used to receive first configuration information from a tenant, where the first configuration information is used to instruct to create a cluster group for the multiple clusters; The processing module is used to create the cluster group according to the first configuration information, wherein the cluster group includes the multiple clusters; The transceiver module is used to receive second configuration information from the tenant, where the second configuration information is used to instruct to create a gateway in the cluster group; The processing module is used for creating the gateway in the cluster group according to the second configuration information; The transceiver module is used to receive third configuration information from the tenant, the third configuration information including: a first mapping relationship between a service name corresponding to a service included in each cluster and a corresponding access address, a second mapping relationship between a service name corresponding to a service included in each cluster and corresponding cluster information, and a third mapping relationship between each cluster and an application gateway corresponding to each cluster, wherein the cluster information is used to determine the cluster; The processing module is used to configure the third configuration information to the gateway, and the gateway is used to send the third configuration information to the application gateway corresponding to each cluster, and the application gateway is used to access the service according to the request message of the client and the third configuration information.

9. The device according to claim 8, characterized in that The access address corresponding to the service includes one or more of the following: the domain name corresponding to the service, or the uniform resource locator URL corresponding to the service, or the Internet Protocol IP address corresponding to the service.

10. The device according to claim 8 or 9, characterized in that The cluster information includes: the name of the cluster, the name of the working node in the cluster, and the name of the pod in the working node.

11. The device according to any one of claims 8 to 10, characterized in that The multiple clusters include a first cluster and a second cluster, the first cluster includes a first client, and the first cluster is associated with a first application gateway, The first client is used to obtain a first IP address corresponding to the first domain name; The first client is used to send a first request message to a first application gateway, where the first request message carries the first IP address, and the first request message is used to request access to the first IP address; The first application gateway is used to determine, according to the first request message and the first mapping relationship, that the service identifier corresponding to the first IP address is the first identifier, according to the second mapping relationship, determine that the first identifier is the identifier corresponding to the service in the second cluster, and according to the third mapping relationship, determine that the second cluster is associated with the second application gateway; The first application gateway is used to send the first request message to the second application gateway.

12. The device according to claim 11, characterized in that The gateway is used to send the third configuration information to the first application gateway and the second application gateway.

13. The device according to claim 12, characterized in that The second application gateway is used to determine, according to the first IP address carried in the first request message and the first mapping relationship, that the service identifier corresponding to the first IP address is the first identifier, and to determine, according to the second mapping relationship, that the first identifier corresponds to the second pod in the second working node in the second cluster; The second application gateway is used to send a second request message to the second pod, where the second request message is used to request access to the service corresponding to the first identifier.

14. The device according to any one of claims 11 to 13, characterized in that The first cluster further includes a first module, on which a fourth mapping relationship between the domain name and the IP address is configured, and the first module is used for domain name resolution. The first client is used to obtain a first IP address corresponding to the first domain name, including: The first client is used to send a third request message to the first module, where the third request message carries a first domain name, and the third request message is used to request to obtain an Internet Protocol IP address corresponding to the first domain name; The first client is used to receive a first response message from the first module, where the first response message carries the first IP address, and the first IP address is determined by the first module.

15. A computing device, characterized in that: The method comprises a processor and a memory, wherein the processor runs instructions in the memory, so that the processor performs the method according to any one of claims 1 to 7.

16. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method according to any one of claims 1 to 7.

17. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the method according to any one of claims 1 to 7.

18. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, and when the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method as claimed in any one of claims 1 to 7.

Citation Information

Cited By

  • Cross-multi-tenant communication method and device

    CN119743513A

  • Domain name resolution method and device, storage medium and program product

    CN119814472A

  • Domain Name Resolution Method, Device, Storage Medium and Program Product

    CN119814472B

  • Cross-cluster service access method, and apparatus

    WO2024234764A1