Tenant cluster deployment method and device, physical machine and storage medium
Directly creating a tenant cluster in a physical machine solves the performance loss problem caused by virtualization and achieves efficient computing performance and resource utilization.
Patent Information
- Application Number
- CN202310750941.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-27
AI Technical Summary
In Kubernetes (k8s) clusters, tenants need to run in virtual machines or containers when creating new tenant clusters, resulting in nested virtualization, resulting in performance losses and reduced resource utilization.
By running the host cluster in a physical machine, directly create a tenant cluster, avoiding the performance losses caused by virtualization, and achieving efficient computing performance of the tenant cluster.
It reduces performance losses caused by virtualization, improves the computing performance of the cluster, and improves resource utilization.
Smart Images

Figure CN119211005A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of tenant cluster deployment, and in particular to a tenant cluster deployment method, device, physical machine and storage medium. Background Art
[0002] In the actual use of Kubernetes (k8s), in order to reduce costs, some users will choose to share the k8s cluster with other users, that is, the above-mentioned users rent part of the cluster resources in the cluster created by other users as tenants.
[0003] In the prior art, no matter whether it is a k8s working node provided by a virtual machine or a container, when a tenant creates a new tenant cluster on a k8s working node, it needs to run in a container or a virtual machine.
[0004] In the above situation, the cluster operation will form nested virtualization, which will cause part of the performance of the created cluster to be lost in virtualization, thereby reducing the resource utilization of the cluster. Summary of the invention
[0005] The present application provides a tenant cluster deployment method, device, physical machine and storage medium to solve the problem of performance loss caused by nodes provided by virtual machines in the prior art during operation. By directly running the tenant cluster in the physical machine running the cluster, the performance loss caused by cluster virtualization is reduced, thereby achieving the effect of improving cluster computing performance.
[0006] In a first aspect, the present application provides a tenant cluster deployment method, which is applied to a cluster management platform of a host cluster running in a physical machine, and the method includes:
[0007] Receiving a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant;
[0008] Creating a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtaining a cluster link of the tenant cluster;
[0009] The cluster link is fed back to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0010] Optionally, the receiving a tenant cluster creation request sent by a tenant terminal includes:
[0011] Receive a tenant cluster creation request sent by a tenant, and parse and process the tenant cluster creation request to obtain the initial request data of the tenant;
[0012] The initial request data is processed based on a preset data structure to obtain tenant cluster data of the tenant, and the tenant cluster data is stored in a preset tenant database.
[0013] Optionally, creating a tenant cluster of the tenant in the host cluster based on the tenant cluster data and obtaining a cluster link of the tenant cluster includes:
[0014] Creating a tenant namespace of the tenant in the host cluster based on the tenant cluster data; the tenant namespace includes a cluster service corresponding to the tenant cluster;
[0015] A cluster link of the tenant cluster is generated based on the service information of the cluster service.
[0016] Optionally, the tenant cluster data includes a tenant identifier and cluster parameters;
[0017] The creating a tenant namespace of the tenant in the host cluster based on the tenant cluster data includes:
[0018] Creating an initial namespace for the tenant in the host cluster based on the tenant identifier;
[0019] At least one cluster service is added in the initial namespace based on the cluster parameters to obtain a tenant namespace of the tenant.
[0020] Optionally, after receiving the tenant cluster creation request sent by the tenant terminal, the method further includes:
[0021] Obtaining a preset tenant cluster parameter threshold, and determining whether the tenant cluster data exceeds the tenant cluster parameter threshold;
[0022] If it exceeds, a creation prompt message indicating that data needs to be modified is fed back to the tenant terminal; if it does not exceed, the tenant cluster creation step is executed.
[0023] Optionally, after feeding back the cluster link to the tenant terminal, the method further includes:
[0024] When the synchronizer preset by the cluster management platform detects a resource processing request to be synchronized, it forwards the resource processing request to be synchronized to the host cluster so that the host cluster processes the resource processing request to be synchronized; the resource processing request to be synchronized is a resource processing request sent by the tenant terminal to the tenant cluster;
[0025] When receiving the resource processing result fed back by the host cluster, the synchronizer feeds back the resource processing result to the tenant cluster, so that the tenant cluster feeds back the resource processing result to the tenant terminal corresponding to the resource processing request to be synchronized.
[0026] Optionally, after feeding back the cluster link to the tenant terminal, the method further includes:
[0027] A tenant cluster deregistration request sent by a tenant terminal is received, and based on the tenant cluster deregistration request, a deregistration operation is performed on the tenant cluster in the host cluster and a deletion operation is performed on the tenant cluster data stored in a preset tenant database.
[0028] In a second aspect, the present application provides a tenant cluster deployment device, which is applied to a cluster management platform of a host cluster running in a physical machine, and the device includes:
[0029] A tenant cluster creation request receiving module, configured to receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant;
[0030] A cluster link generation module, used to create a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster;
[0031] The cluster link sending module is used to feed back the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0032] Optionally, the tenant cluster creation request receiving module includes:
[0033] A request receiving unit, configured to receive a tenant cluster creation request sent by a tenant, and parse and process the tenant cluster creation request to obtain initial request data of the tenant;
[0034] The tenant cluster data obtaining unit is used to perform data processing on the initial request data based on a preset data structure to obtain the tenant cluster data of the tenant, and store the tenant cluster data in a preset tenant database.
[0035] Optional, cluster link generation module, including:
[0036] A tenant namespace creation unit, configured to create a tenant namespace of the tenant in the host cluster based on the tenant cluster data; the tenant namespace includes a cluster service corresponding to the tenant cluster;
[0037] A cluster link generating unit is used to generate a cluster link of the tenant cluster based on the service information of the cluster service.
[0038] Optionally, the tenant cluster data includes a tenant identifier and cluster parameters;
[0039] The tenant namespace creation unit includes:
[0040] An initial namespace creation subunit, configured to create an initial namespace for the tenant in the host cluster based on the tenant identifier;
[0041] The tenant namespace creation subunit is used to add at least one cluster service in the initial namespace based on the cluster parameters to obtain the tenant namespace of the tenant.
[0042] Optionally, the device further comprises:
[0043] A cluster data judgment module is used to obtain a preset tenant cluster parameter threshold after receiving a tenant cluster creation request sent by a tenant terminal, and determine whether the tenant cluster data exceeds the tenant cluster parameter threshold;
[0044] The cluster creation execution module is used to feedback creation prompt information that data needs to be modified to the tenant terminal if the number is exceeded; if the number is not exceeded, execute the tenant cluster creation step.
[0045] Optionally, the device further comprises:
[0046] A first data synchronization module is used for, after feeding back the cluster link to the tenant terminal, when a synchronizer preset by the cluster management platform detects a resource processing request to be synchronized, forwarding the resource processing request to be synchronized to the host cluster, so that the host cluster processes the resource processing request to be synchronized; the resource processing request to be synchronized is a resource processing request sent by the tenant terminal to the tenant cluster;
[0047] The second data synchronization module is used for the synchronizer to feed back the resource processing result fed back by the host cluster to the tenant cluster when receiving the resource processing result fed back by the host cluster, so that the tenant cluster feeds back the resource processing result to the tenant terminal corresponding to the resource processing request to be synchronized.
[0048] Optionally, the device further comprises:
[0049] The cluster deregistration module is used to receive a tenant cluster deregistration request sent by the tenant terminal after feeding back the cluster link to the tenant terminal, and to deregister the tenant cluster in the host cluster based on the tenant cluster deregistration request and to delete the tenant cluster data stored in the preset tenant database.
[0050] In a third aspect, the present application provides a physical machine, comprising: a processor, and a
[0051] Memory of
[0052] The memory stores computer-executable instructions;
[0053] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.
[0054] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0055] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0056] In the technical solution provided by the present application, the tenant terminal sends a tenant cluster creation request to the cluster management platform of the host cluster running in the physical machine, and then the cluster management platform creates a tenant cluster corresponding to the cluster creation request in the host cluster, and feeds back the cluster link corresponding to the tenant cluster generated by the host cluster to the tenant terminal, so that the tenant can access the tenant cluster running in the physical machine through the cluster link, which can reduce the cluster performance loss caused by the cluster virtualization, and thus improve the computing performance of the cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 An application scenario diagram of the tenant cluster deployment method provided in an embodiment of the present application;
[0059] Figure 2 A schematic diagram of a tenant cluster deployment method provided in an embodiment of the present application;
[0060] Figure 3 A flowchart of another tenant cluster deployment method provided in an embodiment of the present application;
[0061] Figure 4 A flowchart of another tenant cluster deployment method provided in an embodiment of the present application;
[0062] Figure 5 A schematic diagram of the structure of a tenant cluster deployment device provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of the structure of a physical machine provided in an embodiment of the present application;
[0064] Figure 7 A block diagram of a physical machine provided in an embodiment of the present application.
[0065] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0067] In the actual use of Kubernetes (k8s), in order to reduce costs, some users will choose to share the use of k8s clusters with other users, that is, some of the above users rent part of the cluster resources in the clusters created by other users as tenants. In the prior art, whether it is a k8s work node provided by a virtual machine or a container, when a tenant creates a new tenant cluster on a k8s work node, it needs to run in a container or a virtual machine. In other words, it can be understood that the tenant cluster run by the tenant later is running in the virtual cluster run by the host. In this case, two layers of nested virtualization will be formed, which will cause part of the performance of the created cluster to be lost in virtualization, thereby reducing the computing performance of the cluster.
[0068] The tenant cluster deployment method provided in this application aims to solve the above technical problems of the prior art. Specifically, the k8s tenant cluster created by the tenant will run directly on the host cluster that has been created in the physical machine, which can effectively reduce the performance loss caused by nested virtualization, thereby improving the computing performance of the cluster.
[0069] It should be noted that a physical machine is a name for a physical computer relative to a virtual machine. Optionally, since a single computer cannot meet the requirements of big data for storage capacity and computing performance, the physical machine provided in this application can be understood as a physical machine composed of multiple physical server resources. Specifically, a physical machine can have local computing resources and local hard disk resources, and can implement computing nodes and data nodes deployed on the same node, meeting the principle of "Moving jobs to data", reducing the movement of data between servers during the computing process, reducing network I / O, and achieving fast data reading and computing. The host cluster can be understood as a Kubernetes (k8s) cluster running directly in the physical machine.
[0070] Figure 1 This is an application scenario diagram of the tenant cluster deployment method provided in the embodiment of the present application. Figure 1 The application scenarios to which the embodiments of the present application are applicable are described. Figure 1 , a host cluster is running and created in the physical machine. The host cluster is provided with a plurality of nodes. Exemplarily, the number of nodes may be greater than 10. Among them, a cluster management platform for managing the host cluster may be pre-set in any node of the cluster. A scheduler, an executor and a database are provided in the cluster management platform. The executor and the scheduler are used to forward data generated by the tenant terminal and the host cluster. Among them, the scheduler is connected to the user terminal, and the executor is connected to the host cluster. The database is connected to the scheduler and the executor respectively, and is used to store data of the host cluster and the tenant cluster.
[0071] Specifically, the tenant sends a tenant cluster creation request to the cluster management platform through the tenant terminal. When the scheduler in the cluster management platform receives the tenant cluster creation request, it parses the request and obtains the tenant cluster data in the request, and saves the tenant cluster data to the preset tenant database. When the tenant cluster data is stored, the executor in the cluster management platform is triggered to start. The executor reads the tenant cluster data stored in the database, and creates an initial namespace corresponding to the tenant in the host cluster based on the tenant cluster data, and creates a corresponding cluster service in the initial namespace based on the tenant cluster data to generate the tenant cluster of the tenant. Furthermore, a cluster link of the tenant cluster is generated based on the service information of the cluster service, and the cluster link is sent to the scheduler. The scheduler sends the received cluster link to the corresponding tenant terminal so that the tenant can know the cluster link. After the tenant obtains the cluster link, the tenant can use the tenant cluster.
[0072] Furthermore, a synchronizer is also provided in the cluster management platform, which is connected to the tenant terminal and the host cluster respectively. Specifically, the tenant accesses the tenant cluster through the cluster link received by the tenant terminal, and sends a resource processing request to the tenant cluster. When the synchronizer in the cluster management platform receives the resource processing request, it forwards the request to the host cluster to implement resource processing in the host cluster. Then, the host cluster feeds back the processing result to the synchronizer, and the synchronizer synchronizes the processing result to the tenant cluster so that the tenant can perceive the processing result of the resource processing request. Specifically, the resource processing request may include the creation, modification and cancellation of resources.
[0073] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0074] Figure 2 A flowchart of a tenant cluster deployment method provided in an embodiment of the present application. The method can be executed by a tenant cluster deployment device, which can be a cluster management platform of a host cluster running in a physical machine. The following description takes a physical machine as an example. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware, such as Figure 2 As shown, the method includes the following steps.
[0075] S210: Receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant.
[0076] In an embodiment of the present application, the tenant inputs cluster parameters through the input device of the tenant terminal, and then the tenant terminal generates a cluster creation request based on the input cluster parameters and the tenant identifier generated by the terminal, and sends the tenant cluster creation request to the cluster management platform. Further, the cluster management platform determines the tenant's tenant cluster data based on the received tenant cluster creation request. Specifically, the scheduler can parse the above tenant cluster creation request and obtain the tenant's tenant cluster data based on the parsing result.
[0077] S220: Create a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster.
[0078] In an embodiment of the present application, the cluster management platform, based on the tenant cluster data obtained from the tenant, creates a corresponding namespace for the tenant based on the tenant cluster data, and starts a cluster service corresponding to the tenant cluster data in the namespace, and then generates a cluster link of the tenant cluster based on the service information of the cluster service, and feeds back the cluster link to complete the creation of the tenant cluster.
[0079] S230: Feedback the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0080] In the embodiment of the present application, based on the generation of the above cluster link, the cluster link is sent to the tenant terminal so that the tenant knows the tenant cluster that it requests to create. Further, the tenant can access the cluster link in the tenant terminal to access the tenant cluster that it requests to create.
[0081] In the above technical solution, the tenant terminal sends a tenant cluster creation request to the cluster management platform of the host cluster running in the physical machine, and then the cluster management platform creates a tenant cluster corresponding to the cluster creation request in the host cluster, and feeds back the cluster link corresponding to the tenant cluster generated by the host cluster to the tenant terminal, so that the tenant can access the tenant cluster running in the physical machine through the cluster link, which can reduce the cluster performance loss caused by the cluster virtualization, thereby improving the computing performance of the cluster.
[0082] Figure 3 This is a flow chart of another tenant cluster deployment method provided in an embodiment of the present application. This embodiment can be understood as a specific introduction embodiment of the steps mentioned in the method described in the above embodiment. Figure 3 , the method may specifically include:
[0083] S310: Receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant.
[0084] Specifically, the understanding and examples of the technical means, technical effects, and technical terms in step S310 may refer to the explanation of step S210 in the above embodiment.
[0085] On the basis of the above implementation, in this embodiment, the judging step in step S310 may specifically include:
[0086] S311 . Receive a tenant cluster creation request sent by a tenant, and parse and process the tenant cluster creation request to obtain initial request data of the tenant.
[0087] In an embodiment of the present application, the tenant inputs cluster parameters in the tenant terminal. Specifically, the input process can be to select cluster parameters in the tenant interface displayed in the tenant terminal, such as selecting parameter values of cluster parameters such as CPU, memory, and disk. Optionally, the tenant can also directly input data in the tenant interface, which is not specifically limited in this application.
[0088] Specifically, the tenant terminal provided in the embodiment of the present application corresponds to the tenant one by one, that is, the unique terminal identifier of the tenant terminal can be used to characterize the tenant identifier of the tenant. On this basis, the tenant cluster creation request of the tenant can be generated based on the terminal identifier of the tenant terminal and the cluster parameters input by the tenant.
[0089] Specifically, the data may be compressed to generate a request data compression package corresponding to the tenant, and the request data compression package is sent as a tenant cluster creation request to a cluster management platform of a host cluster running in a physical machine.
[0090] In this application, the scheduler preset in the cluster management platform is used to receive the request data sent by each tenant terminal. Further, when the scheduler receives the tenant cluster creation request sent by the above tenant terminal, it performs request parsing processing on the above tenant cluster creation request to obtain the tenant identifier (terminal identifier) of the tenant and the tenant's initial request data.
[0091] S312: Process the initial request data based on a preset data structure to obtain tenant cluster data of the tenant, and store the tenant cluster data in a preset tenant database.
[0092] Since the data structures of different parameters are different, in order to facilitate the subsequent reading and storage of data, on the basis of obtaining the initial request data, the initial request data is processed based on the preset data structure to obtain the tenant cluster data of the tenant. Specifically, the data structure of the initial request is initialized according to the preset configuration file to obtain the processed tenant cluster data. Furthermore, the obtained tenant cluster data is stored in the preset tenant database to facilitate the query and reading of subsequent data.
[0093] In actual applications, if the service resources of the host cluster created by the tenant request account for a large proportion of the host cluster, it will affect the processing efficiency of the host cluster for the host request, so it is necessary to limit the cluster resources requested by the tenant. Based on the above situation, the technical solution provided in the embodiment of the present application, on the basis of obtaining the tenant cluster data of the tenant, also judges the specific value of the tenant cluster data to determine whether its value exceeds the preset cluster data threshold, so as to determine whether to continue to create the cluster for the request sent by the tenant.
[0094] Optionally, the judgment process may include: obtaining a preset tenant cluster parameter threshold, determining whether the tenant cluster data exceeds the tenant cluster parameter threshold; if so, feeding back to the tenant terminal a creation prompt message indicating that data needs to be modified; if not, executing the tenant cluster creation step.
[0095] Specifically, the tenant cluster data is numerically compared with the tenant cluster parameter threshold. Based on the comparison result, it is determined whether to continue to create the cluster for the request sent by the tenant. Optionally, if the tenant cluster data exceeds the tenant cluster parameter threshold, it means that the tenant cluster created by the current tenant request will affect the running host cluster, so the tenant cluster requested by the tenant cannot be created; optionally, in order to facilitate the tenant to successfully create a tenant cluster, the executor can feedback to the tenant terminal that the value in the cluster data requested by the tenant is too large, resulting in the inability to continue to create the tenant cluster. The tenant modifies the value based on the creation prompt message and continues the request based on the modified parameters, thereby successfully creating it. Optionally, if the tenant cluster data does not exceed the tenant cluster parameter threshold, it means that the tenant cluster created by the current tenant request will not affect the running host cluster, so the tenant cluster requested by the tenant can continue to be created.
[0096] S320: Create a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster.
[0097] Specifically, the understanding and examples of the technical means, technical effects, and technical terms in step S320 may refer to the explanation of step S220 in the above embodiment.
[0098] On the basis of the above implementation, in this embodiment, the steps of step S320 may specifically include:
[0099] S321. Create a tenant namespace of the tenant in the host cluster based on the tenant cluster data; the tenant namespace includes cluster services corresponding to the tenant cluster.
[0100] In an embodiment of the present application, when the scheduler stores the tenant cluster data in the tenant database, it triggers the start of the executor in the cluster management platform. The executor accesses the tenant database and reads the tenant cluster data stored in the database. Then, the main cluster data is sent to the host cluster to create an initial namespace corresponding to the tenant in the host cluster based on the tenant cluster data, and create a corresponding cluster service in the initial namespace based on the tenant cluster data, and generate a tenant's namespace, which is a tenant cluster created by the tenant in the host cluster.
[0101] In the present application, tenant cluster data includes tenant identifier and cluster parameters; accordingly, the process of creating a tenant namespace of a tenant in a host cluster based on the tenant cluster data includes: creating an initial namespace of the tenant in the host cluster based on the tenant identifier; adding at least one cluster service to the initial namespace based on the cluster parameters to obtain the tenant namespace of the tenant.
[0102] Specifically, in the host cluster, a new namespace, namely, an initial namespace, is created for the tenant based on the tenant identifier in the tenant cluster data. The initial namespace can isolate the tenant cluster created for the tenant from the host cluster to ensure the data security of each.
[0103] In actual applications, in order to use the namespace as a tenant cluster, it is necessary to start the services required to execute the processing commands in the initial namespace created above. Specifically, the cluster parameters in the above tenant cluster data can be obtained, and the cluster services corresponding to the above cluster parameters can be started in the initial namespace to obtain the tenant namespace of the tenant. Exemplarily, the tenant namespace includes but is not limited to services such as apiserver, controller, etcd, etc. Among them, apiserver is responsible for receiving user requests, etcd is responsible for data storage, and controller is responsible for the life cycle of resources.
[0104] S322: Generate a cluster link of the tenant cluster based on the service information of the cluster service.
[0105] In an embodiment of the present application, the service information corresponding to the above cluster service is integrated to generate a cluster link corresponding to the above tenant namespace (tenant cluster). Further, the cluster link can be sent to the scheduler, and the scheduler sends the received cluster link to the corresponding tenant terminal so that the tenant can know the cluster link. Then, after obtaining the cluster link, the tenant can access the tenant cluster based on the cluster link.
[0106] S330: Feedback the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0107] Specifically, for the understanding and examples of the technical means, technical effects, and technical terms in step S330, reference may be made to the explanation of step S230 in the above embodiment.
[0108] In the above scheme, the tenant terminal sends a tenant cluster creation request to the cluster management platform of the host cluster running in the physical machine, and then the scheduler in the cluster management platform receives the tenant cluster creation request and parses the request to obtain the tenant cluster data, and sends the tenant cluster data to the tenant database for storage, which is convenient for subsequent data query and reading. During the data storage process, the executor in the cluster management platform is triggered to start, and the executor reads the cluster data in the tenant database and sends the tenant cluster data to the host cluster to create the tenant cluster corresponding to the cluster creation request in the host cluster, and receives the cluster link corresponding to the tenant cluster generated by the host cluster; and then the cluster link is fed back to the scheduler, so that the scheduler feeds back the cluster link to the tenant terminal, so that the tenant can access the tenant cluster running in the physical machine through the cluster link, which can reduce the cluster performance loss caused by the cluster virtualization, and thus improve the computing performance of the cluster.
[0109] Figure 4 This is a flow chart of another tenant cluster deployment method provided in an embodiment of the present application. This embodiment can be understood as a specific introduction embodiment of the steps mentioned in the method described in the above embodiment. Figure 4 , the method may specifically include:
[0110] S410: Receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant.
[0111] Specifically, for the understanding and examples of the technical means, technical effects, and technical terms in step S410, reference may be made to the explanations of steps S210 and S311-S312 in the above embodiments.
[0112] S420: Create a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster.
[0113] Specifically, for the understanding and examples of the technical means, technical effects, and technical terms in step S420, reference may be made to the explanations of steps S220 and S321-S322 in the above embodiments.
[0114] S430: Feedback the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0115] Specifically, for the understanding and examples of the technical means, technical effects, and technical terms in step S330, reference may be made to the explanation of step S230 in the above embodiment.
[0116] S440. When the synchronizer preset by the cluster management platform detects a resource processing request to be synchronized, the synchronizer forwards the resource processing request to be synchronized to the host cluster, so that the host cluster processes the resource processing request to be synchronized.
[0117] In the embodiment of the present application, the cluster management platform further includes a synchronizer, which is used to synchronize the data generated in the tenant cluster and the host cluster.
[0118] In actual applications, the tenant cluster created above is a virtual cluster, but it takes a long time to process resources in a virtual cluster. Therefore, in order to reduce processing time, in the technical solution of the present application, the synchronizer forwards the resource processing request received by the tenant cluster to the host cluster for processing. Since the host cluster runs in a physical machine, the processing efficiency of the host cluster is high, which can improve the processing efficiency of resource processing requests.
[0119] Specifically, after the tenant cluster is created, the tenant can send a resource processing request to the tenant cluster based on the tenant terminal, such as a resource creation and resource deregistration request. When the tenant cluster receives the resource processing request, it triggers the synchronizer, which obtains the resource processing request and synchronizes the resource processing request to the host cluster as a resource to be synchronized, so as to perform resource processing in the host cluster.
[0120] S450. When receiving the resource processing result fed back by the host cluster, the synchronizer feeds back the resource processing result to the tenant cluster, so that the tenant cluster feeds back the resource processing result to the tenant terminal corresponding to the resource processing request to be synchronized.
[0121] In an embodiment of the present application, the host cluster creates a new namespace for the tenant cluster in its cluster, and processes the received resource processing request in the namespace to generate a resource processing result corresponding to the request. When the resource processing result is generated, the synchronizer is triggered, and the synchronizer obtains the resource processing result and feeds the resource processing result back to the tenant cluster. The tenant cluster then feeds back the above resource processing result to the tenant terminal corresponding to the request so that the tenant can know the processing result.
[0122] Based on the above implementation methods, the technical solution of the embodiment of the present application also includes: receiving a tenant cluster deregistration request sent by a tenant terminal, deregistering the tenant cluster in the host cluster based on the tenant cluster deregistration request, and deleting the tenant cluster data stored in a preset tenant database.
[0123] In an embodiment of the present application, if a tenant wants to cancel the tenant cluster he created, he can send a cluster cancellation request to the cluster management platform through the tenant terminal. When the scheduler receives the request, it triggers the executor to process it. Then the executor cancels the tenant cluster running in the host cluster. In order to reduce the data occupation in the physical machine, the tenant cluster data in the tenant database is cleared synchronously to complete the cluster cancellation. On this basis, the above cancellation results are also gradually fed back to the tenant terminal so that the tenant can know the cancellation results.
[0124] In the above scheme, the tenant terminal sends a tenant cluster creation request to the cluster management platform of the host cluster running in the physical machine, and then the scheduler in the cluster management platform receives the tenant cluster creation request and parses the request to obtain the tenant cluster data, and sends the tenant cluster data to the tenant database for storage, which is convenient for subsequent data query and reading. During the data storage process, the executor in the cluster management platform is triggered to start, and the executor reads the cluster data in the tenant database and sends the tenant cluster data to the host cluster to create the tenant cluster corresponding to the cluster creation request in the host cluster, and receives the cluster link corresponding to the tenant cluster generated by the host cluster; and then the cluster link is fed back to the scheduler, so that the scheduler feeds back the cluster link to the tenant terminal, so that the tenant can access the tenant cluster running in the physical machine through the cluster link, which can reduce the cluster performance loss caused by the cluster virtualization, and thus improve the computing performance of the cluster. Furthermore, the synchronizer in the cluster management platform obtains the resource processing request received by the tenant cluster, sends the request to the host cluster for processing, and synchronizes the resource processing result generated by the host cluster to the tenant cluster, and then the tenant cluster feeds back the resource processing result to the tenant terminal so that the tenant can know the processing result. The effect of the above-mentioned specific resource processing in the host cluster is that it can reduce the slow processing efficiency caused by the virtual machine, thereby improving the processing efficiency of the tenant cluster for cluster resources.
[0125] Figure 5 A schematic diagram of the structure of a tenant cluster deployment device provided in an embodiment of the present application. Figure 5 The device is applied to a cluster management platform of a host cluster running in a physical machine, and includes:
[0126] The tenant cluster creation request receiving module 510 is used to receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes the tenant cluster data of the tenant;
[0127] A cluster link generation module 520, configured to create a tenant cluster of a tenant in a host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster;
[0128] The cluster link sending module 530 is used to feed back the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
[0129] Optionally, the tenant cluster creation request receiving module 510 includes:
[0130] A request receiving unit, used to receive a tenant cluster creation request sent by a tenant, and parse and process the tenant cluster creation request to obtain the tenant's initial request data;
[0131] The tenant cluster data obtaining unit is used to process the initial request data based on a preset data structure to obtain the tenant cluster data of the tenant, and store the tenant cluster data in a preset tenant database.
[0132] Optionally, the cluster link generation module 520 includes:
[0133] A tenant namespace creation unit, used to create a tenant namespace of a tenant in a host cluster based on tenant cluster data; the tenant namespace includes a cluster service corresponding to the tenant cluster;
[0134] The cluster link generating unit is used to generate a cluster link of a tenant cluster based on the service information of the cluster service.
[0135] Optionally, the tenant cluster data includes a tenant identifier and cluster parameters;
[0136] The tenant namespace creation unit includes:
[0137] An initial namespace creation subunit, used to create an initial namespace of a tenant in a host cluster based on a tenant identifier;
[0138] The tenant namespace creation subunit is used to add at least one cluster service to the initial namespace based on the cluster parameters to obtain the tenant namespace of the tenant.
[0139] Optionally, the device further comprises:
[0140] A cluster data judgment module is used to obtain a preset tenant cluster parameter threshold after receiving a tenant cluster creation request sent by a tenant terminal, and determine whether the tenant cluster data exceeds the tenant cluster parameter threshold;
[0141] The cluster creation execution module is used to feedback creation prompt information that requires data modification to the tenant terminal if the number is exceeded; if the number is not exceeded, execute the tenant cluster creation steps.
[0142] Optionally, the device further comprises:
[0143] The first data synchronization module is used for, after feeding back the cluster link to the tenant terminal, when the synchronizer preset by the cluster management platform detects a resource processing request to be synchronized, forwarding the resource processing request to be synchronized to the host cluster, so that the host cluster processes the resource processing request to be synchronized; the resource processing request to be synchronized is a resource processing request sent by the tenant terminal to the tenant cluster;
[0144] The second data synchronization module is used for the synchronizer to feed back the resource processing result to the tenant cluster when receiving the resource processing result fed back by the host cluster, so that the tenant cluster feeds back the resource processing result to the tenant terminal corresponding to the resource processing request to be synchronized.
[0145] Optionally, the device further comprises:
[0146] The cluster deregistration module is used to receive a tenant cluster deregistration request sent by the tenant terminal after feeding back the cluster link to the tenant terminal, deregister the tenant cluster in the host cluster based on the tenant cluster deregistration request, and delete the tenant cluster data stored in the preset tenant database.
[0147] Figure 6 A schematic diagram of the structure of a physical machine provided in an embodiment of the present application. Figure 6 As shown, the physical machine of this embodiment may include:
[0148] at least one processor 601; and
[0149] A memory 602 communicatively coupled to at least one processor;
[0150] The memory 602 stores instructions that can be executed by at least one processor 601, and the instructions are executed by at least one processor 601 to enable the server to execute a method as described in any of the above embodiments.
[0151] Optionally, the memory 602 may be independent or integrated with the processor 601 .
[0152] The implementation principle and technical effects of the physical machine provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.
[0153] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented.
[0154] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method of any of the aforementioned embodiments when executed by a processor.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0156] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0157] It should be understood that the above-mentioned processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0158] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0159] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a server or a main control device.
[0160] Figure 7 A block diagram of a physical machine provided in an embodiment of the present application. Figure 7, the physical machine 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0161] The processing component 802 generally controls the overall operation of the physical machine 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0162] The memory 804 is configured to store various types of data to support operations on the physical machine 800. Examples of such data include instructions for any application or method operating on the physical machine 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0163] The power supply component 806 provides power to various components of the physical machine 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the physical machine 800.
[0164] The multimedia component 808 includes a screen that provides an output interface between the physical machine 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the physical machine 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0165] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the physical machine 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0166] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0167] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the physical machine 800. For example, the sensor assembly 814 can detect the open / closed state of the physical machine 800, the relative positioning of components, such as the display and keypad of the physical machine 800, and the sensor assembly 814 can also detect the position change of the physical machine 800 or a component of the physical machine 800, the presence or absence of user contact with the physical machine 800, the orientation or acceleration / deceleration of the physical machine 800, and the temperature change of the physical machine 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0168] The communication component 816 is configured to facilitate wired or wireless communication between the physical machine 800 and other devices. The physical machine 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0169] In an exemplary embodiment, the physical machine 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0170] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of the physical machine 800 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0171] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a physical machine, enables the physical machine to execute the above-mentioned physical machine split-screen processing method.
[0172] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0173] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A tenant cluster deployment method, characterized in that: A cluster management platform applied to a host cluster running in a physical machine, the method comprising: Receiving a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant; Creating a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtaining a cluster link of the tenant cluster; The cluster link is fed back to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
2. The method according to claim 1, characterized in that The receiving a tenant cluster creation request sent by a tenant terminal includes: Receive a tenant cluster creation request sent by a tenant, and parse and process the tenant cluster creation request to obtain the initial request data of the tenant; The initial request data is processed based on a preset data structure to obtain tenant cluster data of the tenant, and the tenant cluster data is stored in a preset tenant database.
3. The method according to claim 1, characterized in that The creating a tenant cluster of the tenant in the host cluster based on the tenant cluster data and obtaining a cluster link of the tenant cluster includes: Creating a tenant namespace of the tenant in the host cluster based on the tenant cluster data; the tenant namespace includes a cluster service corresponding to the tenant cluster; A cluster link of the tenant cluster is generated based on the service information of the cluster service.
4. The method according to claim 3, characterized in that The tenant cluster data includes a tenant identifier and cluster parameters; The creating a tenant namespace of the tenant in the host cluster based on the tenant cluster data includes: Creating an initial namespace for the tenant in the host cluster based on the tenant identifier; At least one cluster service is added in the initial namespace based on the cluster parameters to obtain a tenant namespace of the tenant.
5. The method according to claim 1, characterized in that After receiving the tenant cluster creation request sent by the tenant terminal, the method further includes: Obtaining a preset tenant cluster parameter threshold, and determining whether the tenant cluster data exceeds the tenant cluster parameter threshold; If it exceeds, a creation prompt message indicating that data needs to be modified is fed back to the tenant terminal; if it does not exceed, the tenant cluster creation step is executed.
6. The method according to any one of claims 1 to 5, characterized in that: After feeding back the cluster link to the tenant terminal, the method further includes: When the synchronizer preset by the cluster management platform detects a resource processing request to be synchronized, it forwards the resource processing request to be synchronized to the host cluster so that the host cluster processes the resource processing request to be synchronized; the resource processing request to be synchronized is a resource processing request sent by the tenant terminal to the tenant cluster; When receiving the resource processing result fed back by the host cluster, the synchronizer feeds back the resource processing result to the tenant cluster, so that the tenant cluster feeds back the resource processing result to the tenant terminal corresponding to the resource processing request to be synchronized.
7. The method according to any one of claims 1 to 5, characterized in that: After feeding back the cluster link to the tenant terminal, the method further includes: A tenant cluster deregistration request sent by a tenant terminal is received, and based on the tenant cluster deregistration request, a deregistration operation is performed on the tenant cluster in the host cluster and a deletion operation is performed on the tenant cluster data stored in a preset tenant database.
8. A tenant cluster deployment device, characterized in that: A cluster management platform for a host cluster running in a physical machine, the device comprising: A tenant cluster creation request receiving module, configured to receive a tenant cluster creation request sent by a tenant terminal; the tenant cluster creation request includes tenant cluster data of the tenant; A cluster link generation module, used to create a tenant cluster of the tenant in the host cluster based on the tenant cluster data, and obtain a cluster link of the tenant cluster; The cluster link sending module is used to feed back the cluster link to the tenant terminal, so that the tenant can access the tenant cluster based on the cluster link.
9. A physical machine, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor is configured to implement the method according to any one of claims 1 to 7 when executing the computer-executable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the tenant cluster deployment method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for realizing Overlay multi-tenant CNI container network based on Open vSwitch
CN111049796A
Cluster resource scheduling method, system and device based on kubernetes and storage medium
CN115185697A
Data processing method and device, electronic equipment and storage medium
CN115705236A
Management cluster with integration service for deploying and managing a service in tenant clusters
US20230171322A1
Resource capacity management in clouds
WO2021205204A1