Computing node distribution method and device, storage medium and electronic equipment

By dividing computing nodes with different isolation levels for container applications in a multi-tenant environment, the problems of poor isolation, low security, and high management complexity are solved, and the security of container applications and the utilization of computing nodes are improved.

CN118819834APending Publication Date: 2024-10-22JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410854142.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The problems of poor isolation, low security, and high management complexity of container applications in multi-tenant environments have not been effectively solved.

Method used

By determining the project priority of the target tenant, obtain the corresponding resource isolation level, and divide the computing nodes into different isolation levels, including exclusive isolation within the tenant, shared isolation within the tenant and global shared isolation level, automatically allocate computing nodes to implement containers Security isolation of applications.

Benefits of technology

Without the need to modify container applications, different levels of security isolation of container applications in a multi-tenant environment are achieved, improving the utilization of computing nodes and the security of container applications, and reducing operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819834A_ABST
    Figure CN118819834A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a computing node distribution method and device, a storage medium and electronic equipment, and the method comprises the steps: determining an item to which a target tenant content application belongs, a plurality of items being set under the target tenant, and the plurality of items being respectively provided with corresponding priorities; resource isolation levels corresponding to the priorities of the items are obtained, and the resource isolation levels are used for dividing a plurality of computing nodes deployed in a container cluster into different isolation levels; and allocating the computing node corresponding to the resource isolation level to the target tenant. Through the method and the device, the problems of poor isolation, low security and high management complexity of the container application in a multi-tenant environment are solved, security isolation of different levels of the container application in a multi-tenant scene is realized, and the effects of improving the utilization rate of the computing node and the security of the container application and reducing the complexity of operating the computing node are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computing node processing, and more specifically, to a computing node allocation method, device, storage medium, and electronic device. Background Art

[0002] Container technology has been widely used in modern cloud-native environments due to its significant advantages such as lightweight and standardized packaging, greatly improving the deployment efficiency and portability of container applications. However, although container cluster management applications such as Kubernetes achieve logical isolation through the role-based access control (RBAC) mechanism, the container itself only provides process-level isolation at the operating system level, which poses security risks in multi-tenant environments. For example, resource competition or unauthorized attacks. Currently, there are two solutions to avoid security risks in multi-tenant environments. One is to equip each tenant's container application with a dedicated host and independent network resources, but this will increase the consumption of control plane resources and the complexity of tenant operation and maintenance. The second is to set taints and tolerance labels on computing nodes, but this increases the complexity of management and operation and maintenance and poses security risks.

[0003] In relation to the related technologies, no effective solutions have been proposed for the problems of poor isolation, low security and high management complexity of container applications in a multi-tenant environment. Summary of the invention

[0004] The embodiments of the present application provide a computing node allocation method, device, storage medium and electronic device to at least solve the problems of poor isolation, low security and high management complexity of container applications in a multi-tenant environment in the related art.

[0005] According to an embodiment of the present application, a computing node allocation method is provided, including: determining a project to which a container application in a target tenant belongs, wherein a plurality of projects are set under the target tenant, and the plurality of projects are respectively set with corresponding priorities; obtaining a resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide a plurality of computing nodes deployed in a container cluster into different isolation levels; and allocating a computing node corresponding to the resource isolation level to the target tenant.

[0006] In an exemplary embodiment, the resource isolation level includes: an intra-tenant exclusive isolation level, which is used to determine the computing nodes unique to a single project under the target tenant; an intra-tenant shared isolation level, which is used to determine the computing nodes shared by different projects under the target tenant; and a global shared isolation level, which is used to determine the computing nodes shared by different tenants.

[0007] In an exemplary embodiment, the method further includes: initializing multiple computing nodes in the container cluster as computing nodes of the global shared isolation level by default.

[0008] In an exemplary embodiment, the method further includes: according to actual project requirements, setting the proportion of the number of computing nodes with different resource isolation levels in the multiple computing nodes deployed in the container cluster to obtain a set ratio; classifying the multiple computing nodes in the container cluster based on the set ratio to obtain computing node groups with different resource isolation levels; according to the computing node groups with different resource isolation levels, storing the attribute information of the multiple computing nodes in the container cluster to a target database table, wherein the target database table includes: multiple database table items, each of the multiple database table items includes: multiple database table fields, the multiple database table fields include: computing node name, computing node network address, computing node isolation level and tenant identifier corresponding to the computing node.

[0009] In an exemplary embodiment, the method further includes: caching the contents of the target database table to the memory in the form of a hash table, wherein the hash table form includes: multiple key-value pairs, each of the multiple key-value pairs includes: a key field and a value field, the key field is used to record the level identifier of different resource isolation levels, and the value field is used to record the computing node name corresponding to the level identifier.

[0010] In an exemplary embodiment, the method further includes: detecting whether computing node groups with different resource isolation levels are in a resource-balanced state according to a preset period; in response to computing node groups with different resource isolation levels not being in the resource-balanced state, obtaining the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of running container applications of the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated, wherein the computing node to be migrated is preferentially migrated between computing node groups with exclusive isolation levels and computing node groups with shared isolation levels within the same tenant, and secondly migrated from computing node groups with global shared isolation levels to computing node groups with exclusive isolation levels or shared isolation levels. The computing node grouping to be migrated is finally migrated from the computing node grouping in other tenants to the computing node grouping in the current tenant, and the remaining resources include: the remaining processor and the remaining memory; the isolation level of the computing node to be migrated, the remaining resources of the computing node to be migrated, the number of running container applications of the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated are weightedly calculated to obtain the score of the computing node to be migrated; in response to the score of the computing node to be migrated meeting the preset score condition, the computing node to be migrated is migrated from the current computing node grouping to the target computing node grouping, wherein the number of remaining computing nodes in the target computing node grouping does not meet the current project requirements.

[0011] In an exemplary embodiment, the method further includes: establishing an association relationship between projects of different priorities set under the target tenant and computing nodes of different resource isolation levels.

[0012] In an exemplary embodiment, the method further includes: setting a downgrade flag for the project, wherein the downgrade flag is used to determine whether to allow allocation of computing nodes corresponding to a second isolation level to the project when the computing nodes corresponding to a first isolation level to be used by the project do not meet actual needs of the project, the first isolation level being higher than the second isolation level.

[0013] In an exemplary embodiment, before allocating the computing nodes corresponding to the resource isolation level to the target tenant, it also includes: filtering multiple computing nodes in the container cluster based on the node availability status and resource utilization of the multiple computing nodes in the container cluster to obtain filtering results; allocating the computing nodes corresponding to the resource isolation level to the target tenant, including: allocating the computing nodes corresponding to the resource isolation level to the target tenant based on the filtering results.

[0014] According to another embodiment of the present application, a computing node allocation device is provided, including: a determination module, used to determine the project to which the container application in the target tenant belongs, wherein the target tenant is provided with multiple projects, and the multiple projects are respectively provided with corresponding priorities; an acquisition module, used to obtain the resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide the multiple computing nodes deployed in the container cluster into different isolation levels; an allocation module, used to allocate the computing node corresponding to the resource isolation level to the target tenant.

[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0016] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0017] Through this application, we first determine the project to which the container application in the target tenant belongs, then obtain the resource isolation level corresponding to the priority of the project, and finally allocate the computing node corresponding to the resource isolation level to the target tenant, set the priority for the project under the target tenant, and divide the computing nodes into different isolation levels. The computing nodes are allocated according to the correspondence between the priority of the project and the resource isolation level. Without any modification to the container application, it can automatically sense and schedule to the corresponding computing node, which solves the problems of poor isolation, low security and high management complexity of container applications in a multi-tenant environment, realizes different levels of security isolation for container applications in multi-tenant scenarios, improves the utilization rate of computing nodes and the security of container applications, and reduces the complexity of operating computing nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a hardware structure block diagram of a server device of a computing node allocation method according to an embodiment of the present application;

[0019] Figure 2 is a flowchart of a computing node allocation method according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a computing node allocation method according to an embodiment of the present application Figure 1 ;

[0021] Figure 4 is a schematic diagram of a computing node allocation method according to an embodiment of the present application Figure 2 ;

[0022] Figure 5 It is a structural block diagram of a computing node allocation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0025] First, the related technologies involved in the present invention are described:

[0026] Container cluster management applications such as Kubernetes achieve logical isolation through the RBAC mechanism, but the container itself only provides process-level isolation at the operating system level. This level of isolation is not enough to prevent security risks such as resource competition or unauthorized attacks in a multi-tenant environment. In order to ensure the secure isolation of resources between container applications, the following solutions exist:

[0027] (1) Deploy each tenant's container application on a dedicated host and equip it with independent network resources. Although this solution improves security, it also increases control plane resource consumption and increases tenant operation and maintenance complexity.

[0028] (2) By setting taints on computing nodes and allowing specific applications (with corresponding tolerance labels) to be scheduled to these nodes. In this solution, the administrator needs to set taints for each computing node in advance, which increases the complexity of management and operation and maintenance. Tenants need to add corresponding tolerance labels to their container applications, which means that additional modifications need to be made to the container applications. In addition, when other tenants know the taint information of a node, they can add corresponding tolerance labels to their own applications and schedule other tenants' nodes, which poses a security risk.

[0029] In the related technology, there are problems such as poor isolation of container applications, low security and high management complexity in a multi-tenant environment.

[0030] In view of the above problems in the related art, corresponding solutions are proposed in the embodiments of the present invention. The present invention is described below in conjunction with the embodiments:

[0031] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a computing node allocation method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above-mentioned server device. For example, the server device may also include more or fewer components than those shown in FIG. Figure 1 Different configurations are shown.

[0032] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the computing node allocation method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] In this embodiment, a computing node allocation method is provided. Figure 2 is a flowchart of a computing node allocation method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0035] Step S202, determining the project to which the container application belongs in the target tenant, wherein the target tenant is provided with a plurality of projects, and the plurality of projects are respectively provided with corresponding priorities;

[0036] Step S204, obtaining a resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide multiple computing nodes deployed in the container cluster into different isolation levels;

[0037] Step S206: Allocate the computing node corresponding to the resource isolation level to the target tenant.

[0038] Through the above steps, first determine the project to which the container application in the target tenant belongs, then obtain the resource isolation level corresponding to the priority of the project, and finally allocate the computing node corresponding to the resource isolation level to the target tenant, set the priority for the project under the target tenant, and divide the computing nodes into different isolation levels. The computing nodes are allocated according to the correspondence between the priority of the project and the resource isolation level. Without any modification to the container application, it can automatically sense and schedule to the corresponding computing node, which solves the problems of poor isolation, low security and high management complexity of container applications in a multi-tenant environment, realizes different levels of security isolation for container applications in multi-tenant scenarios, improves the utilization rate of computing nodes and the security of container applications, and reduces the complexity of operating computing nodes.

[0039] The execution subject of the above steps may be a server, but is not limited thereto, and this solution does not impose any limitation on this.

[0040] In the technical solution provided in the above step S202, the target tenant is used to represent the individual or organization using the cloud service. Each target tenant has its own resources and data in the cloud environment and is isolated from the data and workloads of other tenants. Container applications are used to represent applications built based on container technology. Container applications are isolated from each other, and multiple container applications can be started on the same host.

[0041] Optionally, in an embodiment of the present application, a plurality of projects are set under the target tenant, and each project is respectively set with a corresponding priority, and the container applications in the target tenant are divided into the projects.

[0042] In the technical solution provided in the above step S204, the priority of the project corresponds to the isolation level of the computing node. When the container application is created, in the resource scheduling stage, the computing node corresponding to the resource isolation level is scheduled in real time according to the priority of the project.

[0043] In the technical solution provided in the above step S206, the computing nodes corresponding to the resource isolation level are allocated to the target tenant.

[0044] Optionally, in an embodiment of the present application, the computing nodes corresponding to the resource isolation level are allocated to the target tenants through a cluster management module, a resource scheduling module, a tenant management module, an application management module, a resource management module and an extended scheduling module. Figure 3 The following is a schematic diagram of a computing node allocation method according to an embodiment of the present application. Figure 1 ,like Figure 3 As shown, the container cluster includes a control node and a computing node. A cluster management module, a resource scheduling module, a tenant management module, an application management module, a resource management module and an extended scheduling module are deployed on the control node to divide the multiple computing nodes deployed in the container cluster into different isolation levels, including a tenant-exclusive isolation level, a tenant-shared isolation level and a global shared isolation level.

[0045] The tenant management module is responsible for the life cycle management of tenants, including creation, deletion, modification, query and quota management. When the tenant management module receives a tenant creation request, it creates a tenant. The resource management module obtains all computing nodes by reading the computing node list information maintained by the cluster management module, and allocates computing nodes to tenants. Among them, the cluster management module manages all nodes in the container cluster and maintains the status of the entire container cluster, and divides the multiple computing nodes deployed in the container cluster into different isolation levels, including exclusive isolation levels within tenants, shared isolation levels within tenants, and global shared isolation levels. For example, container cluster management is implemented based on the container cluster management application (Kubemetes).

[0046] The application management module is responsible for managing the life cycle and priority of container applications. When an application creation request is received from the target tenant, a project is set under the target tenant. The container application is grouped with projects and the priority is set for the project. The resource scheduling module performs basic scheduling based on basic filtering conditions such as the available status of computing nodes and resource utilization. For example, basic scheduling is implemented based on Kubernetes' built-in scheduling strategy. On top of the basic scheduling strategy, an extended scheduling module is added to add scheduling based on resource isolation level. After filtering according to the basic conditions, the resource scheduling module sends the node list to the extended scheduling module. The extended scheduling module queries the computing nodes corresponding to the resource isolation level in the resource management module in real time based on the priority of the project where the container application is located and the correspondence between the project priority and the resource isolation level, returns the schedulable computing nodes, and allocates the schedulable computing nodes to tenants.

[0047] As an optional embodiment, the resource isolation level includes:

[0048] The exclusive isolation level within a tenant is used to determine the computing nodes unique to a single project under the target tenant;

[0049] The intra-tenant shared isolation level is used to determine the computing nodes shared by different projects under the target tenant;

[0050] The global shared isolation level is used to determine the computing nodes shared by different tenants.

[0051] Optionally, in this embodiment, all computing nodes in the container cluster are obtained, and the computing nodes are divided into three isolation levels: intra-tenant exclusive isolation level, intra-tenant shared isolation level, and global shared isolation level. Among them, the computing nodes unique to a project under the target tenant are divided into the intra-portfolio exclusive isolation level, the computing nodes that can be shared between different projects under the target tenant are divided into the intra-tenant shared isolation level, and the nodes that can be used by all tenants in the container cluster are divided into the global shared isolation level.

[0052] Optionally, in this embodiment, the tenant management module is responsible for the life cycle management of the tenant, including creation, deletion, modification, query and quota management. The tenant management module allocates resource quotas of three different resource isolation levels to tenants, namely, exclusive isolation level within the tenant, shared isolation level within the tenant and global shared isolation level. Specific resources include CPU and memory. In addition, after setting quotas for tenants, there is no need to allocate computing nodes immediately, but to bind computing nodes when the actual container application is created.

[0053] Through the above steps, the computing nodes are divided into resource isolation levels, which provides a high degree of security and isolation for the target tenants and ensures the privacy and security of the projects under the target tenants.

[0054] As an optional embodiment, the method further includes:

[0055] Initialize multiple computing nodes in the container cluster as computing nodes of the global shared isolation level by default.

[0056] Optionally, in this embodiment, the system administrator initializes the isolation level of multiple computing nodes in the container cluster to a global shared isolation level during initialization.

[0057] Through the above steps, the isolation level of multiple computing nodes in the container cluster is initialized to the global shared isolation level, which means that the computing nodes can be accessed by any tenant, which can maximize the utilization of computing nodes and reduce the complexity of computing node management.

[0058] As an optional embodiment, the method further includes:

[0059] According to actual project requirements, the proportion of computing nodes with different resource isolation levels in the multiple computing nodes deployed in the container cluster is set to obtain a set ratio;

[0060] Classifying the multiple computing nodes in the container cluster based on the set ratio to obtain computing node groups with different resource isolation levels;

[0061] According to the computing nodes of different resource isolation levels, the attribute information of multiple computing nodes in the container cluster is stored in a target database table, wherein the target database table includes: multiple database table items, each of the multiple database table items includes: multiple database table fields, and the multiple database table fields include: computing node name, computing node network address, computing node isolation level and tenant identifier corresponding to the computing node.

[0062] Optionally, in this embodiment, the system administrator can set the node ratio of computing nodes with different resource isolation levels in the multiple computing nodes deployed in the container cluster according to actual project requirements. For example, the computing nodes with exclusive isolation levels within the tenant are set to not exceed 10% of the computing nodes deployed in the container cluster, and the computing nodes with shared isolation levels within the tenant are set to not exceed 30% of the computing nodes deployed in the container cluster.

[0063] Optionally, in this embodiment, the list information of all computing nodes deployed in the container cluster is read, and the computing nodes are classified according to the set ratio to obtain computing node groups with different resource isolation levels. According to the computing node groups with different resource isolation levels, the attribute information of the computing nodes in the container cluster is stored in the target database table. Taking 4 computing nodes as an example, the corresponding target database table is shown in Table 1.

[0064] Table 1 Target database table corresponding to computing nodes

[0065] Compute node name Compute node network address Compute node isolation level Tenant ID nodel 192.168.1.10 1(Exclusive for tenants) id1 (tenant ID) node2 192.168.1.11 2(Shared within a tenant) id2 (tenant ID) node3 192.168.1.12 3 (global sharing) - node4 192.168.1.13 3 (global sharing) -

[0066] As shown in Table 1, the network address of the computing node node1 is 192.168.1.10, and its isolation level is set to the exclusive isolation level within the tenant, and its corresponding tenant identifier is id1; the network address of the computing node node2 is 192.168.1.11, and its isolation level is set to the shared isolation level within the tenant, and its corresponding tenant identifier is id2; the network address of the computing node node3 is 192.168.1.12, and its isolation level is set to the global shared isolation level, and its corresponding tenant identifier is all tenant IDs in the container cluster; the network address of the computing node node4 is 192.168.1.13, and its isolation level is set to the global shared isolation level, and its corresponding tenant identifier is all tenant IDs in the container cluster.

[0067] Through the above steps, by setting and classifying the proportions of computing nodes according to the resource isolation level, it is possible to ensure that resources are configured according to the actual needs of the project, which can avoid waste caused by excessive allocation of computing nodes and ensure that key projects obtain sufficient resource guarantees; the resource isolation level and the corresponding proportion of computing nodes can be flexibly adjusted according to actual conditions. When project requirements change, resources can be quickly reallocated to adapt to new requirements; by storing the attribute information of computing nodes in the target database table, the computing nodes can be easily queried, modified and monitored. This centralized management method improves the efficiency and accuracy of management; by dividing different resource isolation levels, the security and privacy of the project can be ensured.

[0068] As an optional embodiment, the method further includes:

[0069] The contents of the target database table are cached to the memory in the form of a hash table, wherein the hash table form includes: multiple key-value pairs, each of the multiple key-value pairs includes: a key field and a value field, the key field is used to record the level identifiers of different resource isolation levels, and the value field is used to record the computing node name corresponding to the level identifier.

[0070] Optionally, in this embodiment, the content of the target database table is cached in the memory in the form of a hash table. Taking the target database table shown in Table 1 as an example, the data in Table 1 is converted into a hash table form as shown in Table 2.

[0071] Table 2 Hash table format corresponding to the target database table in Table 1

[0072] Key Fields Value field Key1 node1 Key2 node2 Key3 node3、node4

[0073] In Table 2, Key1, Key2, and Key3 represent key fields, where Key1 represents the exclusive isolation level within the tenant, Key2 represents the shared isolation level within the tenant, and Key3 represents the global shared isolation level. node1 is the value field corresponding to Key1, indicating that the isolation level of computing node node1 is set to the exclusive isolation level within the tenant; node2 is the value field corresponding to Key2, indicating that the isolation level of computing node node2 is set to the shared isolation level within the tenant; node3 and node4 are the value fields corresponding to Key3, indicating that the isolation levels of computing nodes node3 and computing nodes node4 are set to the global shared isolation level.

[0074] Optionally, in this embodiment, the resource management module monitors the update events of the computing nodes in the cluster management module. When a computing node is added or deleted in the container cluster, the target database table and the hash table corresponding to the target database table in memory are updated according to the update events of the computing nodes.

[0075] Through the above steps, the hash table stores data in the form of key-value pairs, which reduces the complexity of queries and can quickly respond to resource allocation and query requests, thereby improving query efficiency; by caching the contents of the target database table in memory, the system burden can be reduced and the response speed can be improved; when computing nodes are added or deleted in the container cluster, the resource management module will listen to the update events in the cluster management module and update the database table and hash table in real time, ensuring the accuracy and consistency of the cached data and avoiding errors and conflicts caused by inconsistent data.

[0076] As an optional embodiment, the method further includes:

[0077] Check whether the computing node groups with different resource isolation levels are in a resource-balanced state according to a preset period;

[0078] In response to the computing node groups of different resource isolation levels not being in the resource balancing state, the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running of the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated are obtained, wherein the computing node to be migrated is preferentially migrated between the computing node group of the exclusive isolation level and the computing node group of the shared isolation level in the same tenant, and then migrated from the computing node group of the global shared isolation level to the computing node group of the exclusive isolation level or the computing node group of the shared isolation level, and finally migrated from the computing node group in other tenants to the computing node group in the current tenant, and the remaining amount of resources includes: the remaining amount of processor and the remaining amount of memory;

[0079] Perform weighted calculation on the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running on the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated to obtain a score for the computing node to be migrated;

[0080] In response to the score of the computing node to be migrated satisfying a preset score condition, the computing node to be migrated is migrated from a current computing node group to a target computing node group, wherein the number of remaining computing nodes in the target computing node group does not meet current project requirements.

[0081] Optionally, in this embodiment, after the container cluster runs for a period of time, the computing node grouping may be in a resource imbalance state due to the use of the tenant's container application. For example, some target tenants have idle computing nodes, while some target tenants have no computing nodes available. Therefore, it is necessary to regularly check whether the computing node groups of different resource isolation levels in the container cluster are in a resource balanced state.

[0082] Optionally, in this embodiment, when computing node groups of different resource isolation levels are not in a resource-balanced state, it is necessary to dynamically adjust the resource balance of the computing nodes. That is, if a computing node group of a certain resource isolation level is short of resources, it is preferentially migrated between the computing node group of the exclusive isolation level and the computing node group of the shared isolation level in the same tenant, and then migrated from the computing node group of the global shared isolation level to the computing node group of the exclusive isolation level or the computing node group of the shared isolation level, and finally migrated from the computing node group in other tenants to the computing node group in the current tenant.

[0083] Optionally, in this embodiment, when the migration path of the computing nodes to be migrated is to migrate from a computing node group with an exclusive isolation level within a tenant or a computing node group with a shared isolation level within a tenant to a computing node group with a global shared isolation level, priority is given to migrating from a computing node group with an exclusive isolation level within the tenant to a computing node group with a global shared isolation level.

[0084] Optionally, in this embodiment, when migrating between a computing node group of an exclusive isolation level and a computing node group of a shared isolation level in the same tenant, migrating from a computing node group of a global shared isolation level to a computing node group of an exclusive isolation level or a computing node group of a shared isolation level, and migrating from a computing node group in other tenants to a computing node group in the current tenant, a weighted calculation is performed according to the isolation level node_level of the computing node to be migrated, the remaining amount of the processor cpu, the remaining amount of the memory mem, the number of container applications running app_count, the number of container image caches image_count, and the last update time of the container image image_time, to obtain the score of the computing node to be migrated, wherein node_level, cpu, mem, app_count, image_count, and image_time correspond to different weight values ​​weight1, weight2, ..., weight6, respectively, and the weight values ​​can be fine-tuned according to the actual situation and effect. For example, weight1=1, weight2=1, weight3=2, weight4=3, weight5=2, weight6=1 are set.

[0085] Optionally, in this embodiment, node_level represents the resource isolation level of the computing node to be migrated, and different migration paths have different node_level settings. For example, if the migration path of the computing node to be migrated is to migrate from a computing node group with an exclusive isolation level within the same tenant to a computing node group with a shared isolation level, then the node_level of the computing node to be migrated is set to 3; if the migration path of the computing node to be migrated is to migrate from a computing node group with a global shared isolation level to a computing node group with an exclusive isolation level or a computing node group with a shared isolation level, then the node_level of the computing node to be migrated is set to 2; if the migration path of the computing node to be migrated is to migrate from a computing node group in other tenants to a computing node group in the current tenant, then the node_level of the computing node to be migrated is set to is 1; if the migration path of the computing nodes to be migrated is from the computing node group with the exclusive isolation level within the tenant or the computing node group with the shared isolation level within the tenant to the computing node group with the global shared isolation level, the computing node group with the exclusive isolation level within the tenant is preferentially migrated to the computing node group with the global shared isolation level, then the node_level of the computing nodes to be migrated from the computing node group with the exclusive isolation level within the tenant to the computing node group with the global shared isolation level is set to 2; the node_level of the computing nodes to be migrated from the computing node group with the shared isolation level within the tenant to the computing node group with the global shared isolation level is set to 1.

[0086] cpu indicates the remaining CPU percentage of the compute node to be migrated. mem indicates the remaining memory percentage of the compute node to be migrated. The larger the cpu and mem are, the higher the priority of the compute node to be migrated. For example, a compute node with a cpu and mem percentage of 50% will be migrated before a node with a percentage of 30%.

[0087] app_count indicates the number of container applications running on the computing node to be migrated. The fewer the container applications on the computing node to be migrated, the higher the priority of migration.

[0088] image_count is the number of container image caches on the compute node to be migrated. The more container image caches on the compute node to be migrated, the fewer container images need to be pulled when the compute node to be migrated runs the container application, and the higher the operating efficiency. Therefore, the more container image caches on the compute node to be migrated, the smaller the score; the fewer container image caches on the compute node to be migrated, the larger the score.

[0089] Image_time indicates the difference between the last update time of all container images on the compute node to be migrated and the current time. The higher the value, the older the container image on the compute node to be migrated, which means that the container image on the compute node to be migrated may no longer be used. Therefore, the compute nodes to be migrated with a higher image_time are migrated first.

[0090] Optionally, in this embodiment, the scores of the computing nodes to be migrated are obtained as shown in expression (1), wherein the computing nodes with the highest scores are preferentially migrated to the computing node group with insufficient resources.

[0091]

[0092] Among them, score represents the score of the computing node to be migrated; weight1, weight2, ..., weight6 represent the weight values ​​of different factors; node_level represents the resource isolation level of the computing node to be migrated; cpu represents the remaining CPU percentage of the computing node to be migrated; mem represents the remaining memory percentage of the computing node to be migrated; app_count represents the number of container applications running on the computing node to be migrated; image_count represents the number of container image caches on the computing node to be migrated; image_time represents the difference between the last update time of all container images on the computing node to be migrated and the current time.

[0093] Through the above steps, by dynamically migrating computing nodes, resource waste can be effectively avoided; the computing node attribute information considered during the migration process can ensure that the migrated computing nodes have better performance, and by adjusting the weight value, it can flexibly respond to different project requirements; priority is given to migrating from computing node groups with exclusive isolation levels within tenants to computing node groups with global shared isolation levels, and the strategy of sorting migration by score can reduce the impact of computing node migration on tenant business and ensure that the project will not be interrupted or seriously interfered with during the migration process.

[0094] As an optional embodiment, the method further includes:

[0095] An association relationship is established between projects of different priorities set under the target tenant and computing nodes of different resource isolation levels.

[0096] Optionally, in this embodiment, the application management module is responsible for managing the lifecycle management and priority of the container application. Projects are set under the tenant, and the container application is grouped with projects, and the priority of the project is set to high, medium, and low. Among them, the resource isolation level corresponding to the high-priority project is the exclusive isolation level within the tenant, the resource isolation level corresponding to the medium-priority project is the shared isolation level within the tenant, and the resource isolation level corresponding to the low-priority project is the global shared isolation level. When the container application has high isolation requirements, it is created in a high-priority project.

[0097] Optionally, in this embodiment, Figure 4 is a schematic diagram of a computing node allocation method according to an embodiment of the present application Figure 2 ,like Figure 4 As shown, it is assumed that there are two tenants, respectively denoted as Tenant 1 and Tenant 2. Under Tenant 1, there are 4 projects, respectively denoted as Project 1, Project 2, Project 3, and Project 4, where the priority of Project 1 is high, the priority of Project 2 is medium, the priority of Project 3 is medium, and the priority of Project 4 is low. Under Tenant 2, there are 4 projects, respectively denoted as Project 5, Project 6, Project 7, and Project 8, where the priority of Project 5 is low, the priority of Project 6 is medium, the priority of Project 7 is medium, and the priority of Project 8 is low. According to the allocation strategy that the resource isolation level corresponding to the high priority project is the exclusive isolation level within the tenant, the resource isolation level corresponding to the medium priority project is the shared isolation level within the tenant, and the resource isolation level corresponding to the low priority project is the global shared isolation level, the resource isolation level corresponding to project 1 is the exclusive isolation level within the tenant, the resource isolation level corresponding to project 2 and project 3 is the shared isolation level within the tenant, the resource isolation level corresponding to project 4 and project 5 is the global shared isolation level, the resource isolation level corresponding to project 6 and project 7 is the shared isolation level within the tenant, and the resource isolation level corresponding to project 8 is the exclusive isolation level within the tenant. The cluster management module, resource scheduling module, tenant management module, application management module, resource management module, and extended scheduling module deployed on the control node allocate computing nodes corresponding to the resource isolation level according to the correspondence between the project priority and the resource isolation level. Computing node 1 is allocated to project 1, computing node 2 and computing node 3 are allocated to project 2 and project 3, computing node 4, computing node 5, and computing node 6 are allocated to project 4 and project 5, computing node 7 and computing node 8 are allocated to project 6 and project 7, and computing node 9 is allocated to project 8.

[0098] Optionally, in this embodiment, a cluster operation and maintenance role is created for the tenant, and the tenant has the authority to view his own exclusive computing nodes and global shared nodes, so as to view the usage of node resources that he can use. For example, using the role-based access control (RBAC) mechanism in Kubernetes, a role (ClusterRole) is created and bound to the user corresponding to the tenant, and the computing node corresponding to the ClusterRole is dynamically adjusted according to the exclusive nodes that the tenant can view.

[0099] Through the above steps, computing nodes are allocated according to the correspondence between the project priority and the resource isolation level for use in the scheduling phase. Without any modification to the container application, it can automatically sense and schedule to the corresponding computing node.

[0100] As an optional embodiment, the method further includes:

[0101] A downgrade flag is set for the project, wherein the downgrade flag is used to determine whether to allow the project to be allocated a computing node corresponding to a second isolation level when the computing node corresponding to the first isolation level to be used by the project does not meet the actual needs of the project, and the first isolation level is higher than the second isolation level.

[0102] Optionally, in this embodiment, when the project has insufficient resources, computing nodes are allocated to the project according to whether the project allows automatic downgrade. As shown in Table 3, taking projects Project1, Project2, Project3 and Project4 as examples, downgrade flags are set for them. The priority of project Project1 is high, and the resource isolation level of the computing nodes it uses is the exclusive isolation level within the tenant. When the computing nodes it needs to use do not meet the project requirements, it is allowed to allocate computing nodes corresponding to the exclusive isolation level within the tenant to project Project1. When the computing nodes corresponding to the exclusive isolation level within the tenant do not meet the project requirements, it is allowed to allocate computing nodes corresponding to the global shared isolation level to project Project1; the priority of project Project2 is medium, and the resource isolation level of the computing nodes it uses is the shared isolation level within the tenant. When the computing nodes it needs to use do not meet the project requirements, it is not allowed to allocate computing nodes of other resource isolation levels to project Project2; the priority of project Project3 is low, and the resource isolation level of the computing nodes it uses is the global shared isolation level. When the computing nodes it needs to use do not meet the project requirements, it is not allowed to allocate computing nodes of other resource isolation levels to project Project3; the priority of project Project4 is low, and the resource isolation level of the computing nodes it uses is the global shared isolation level. When the computing nodes it needs to use do not meet the project requirements, it is not allowed to allocate computing nodes of other resource isolation levels to project Project4.

[0103] Optionally, in this embodiment, when the computing node resources corresponding to the project priority are insufficient, if the project allows automatic downgrade, the computing nodes corresponding to the project priority are scheduled by gradually reducing the level of resource isolation. For example, a project with a high priority will give priority to scheduling computing nodes with exclusive isolation levels within the tenant. If the computing node resources are insufficient, then try to schedule computing nodes with shared isolation levels within the tenant. If the computing node resources are still insufficient, then try to schedule computing nodes with global shared isolation levels. When the computing node resources corresponding to the project priority are sufficient, rescheduling is performed, and the computing nodes that do not correspond to the resource isolation level are rescheduled. The timing of rescheduling is based on the time period or the load. For example, choose to reschedule at night or choose to reschedule when there are low requests. At the same time, in order to improve scheduling efficiency, the extended scheduling module will check the information changes of the resource management module and the application management module in real time to update the local cache.

[0104] Table 3 Downgrade marks corresponding to items

[0105] Project Name Priority Is downgrade allowed? Project1 high yes Project2 middle no Project3 Low no Project4 Low no

[0106] Through the above steps, when the project has insufficient resources, computing nodes are allocated to it according to whether the project allows automatic downgrade, thereby improving the allocation efficiency of computing nodes.

[0107] As an optional embodiment, before allocating the computing node corresponding to the resource isolation level to the target tenant, the method further includes:

[0108] Based on the node availability status and resource utilization of the multiple computing nodes in the container cluster, filtering the multiple computing nodes in the container cluster to obtain a filtering result;

[0109] Allocating a computing node corresponding to the resource isolation level to the target tenant includes:

[0110] According to the filtering result, the computing node corresponding to the resource isolation level is allocated to the target tenant.

[0111] Optionally, in this embodiment, the scheduling module is implemented based on the built-in scheduling module of the cluster management application. For example, the built-in scheduling module in Kubernetes. Before allocating the computing nodes corresponding to the resource isolation level to the target tenant, the scheduling module performs scheduling based on basic filtering conditions such as the available status of the computing nodes and resource utilization. On top of the basic scheduling strategy, an extended scheduling module is added, wherein the extended scheduling module performs scheduling based on the resource isolation level. The computing nodes corresponding to the resource isolation level are allocated to the target tenant using the extended scheduling module.

[0112] Optionally, in this embodiment, after filtering according to the basic conditions, the scheduling module sends the computing node list to the extended scheduling module. The extended scheduling module queries the computing nodes of the corresponding resource isolation level in the resource management module in real time according to the priority of the project where the container application is located, and returns the schedulable computing nodes.

[0113] Through the above steps, by scheduling based on basic filtering conditions such as the available status of computing nodes and resource utilization, it is possible to ensure that the computing nodes allocated to the target tenants are available and have sufficient resources, avoiding the allocation of nodes with insufficient or unavailable resources to tenants, thereby improving the accuracy of resource allocation; the extended scheduling module performs scheduling based on the resource isolation level to ensure that resource usage between different tenants is isolated from each other, meet the tenants' requirements for resource isolation, and prevent resource contention and interference between different tenants.

[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0115] In this embodiment, a computing node allocation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0116] Figure 5 is a structural block diagram of a computing node allocation device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0117] A determination module 52 is used to determine a project to which a container application belongs in a target tenant, wherein the target tenant is provided with a plurality of projects, and the plurality of projects are respectively provided with corresponding priorities;

[0118] An acquisition module 54 is used to acquire a resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide multiple computing nodes deployed in the container cluster into different isolation levels;

[0119] The allocation module 56 is used to allocate the computing nodes corresponding to the resource isolation level to the target tenant.

[0120] Through the above-mentioned device, the project to which the container application in the target tenant belongs is first determined, and then the resource isolation level corresponding to the priority of the project is obtained. Finally, the computing node corresponding to the resource isolation level is allocated to the target tenant, and the priority is set for the project under the target tenant. The computing nodes are divided into different isolation levels, and the computing nodes are allocated according to the correspondence between the priority of the project and the resource isolation level. Without any modification to the container application, it can automatically sense and schedule to the corresponding computing node, which solves the problems of poor isolation, low security and high management complexity of container applications in a multi-tenant environment, realizes different levels of security isolation for container applications in multi-tenant scenarios, improves the utilization rate of computing nodes and the security of container applications, and reduces the complexity of operating computing nodes.

[0121] In an exemplary embodiment, the resource isolation level includes: an intra-tenant exclusive isolation level, which is used to determine the computing nodes unique to a single project under the target tenant; an intra-tenant shared isolation level, which is used to determine the computing nodes shared by different projects under the target tenant; and a global shared isolation level, which is used to determine the computing nodes shared by different tenants.

[0122] In an exemplary embodiment, the apparatus further comprises:

[0123] The processing module is used to initialize the multiple computing nodes in the container cluster as computing nodes of the global shared isolation level by default.

[0124] In an exemplary embodiment, the processing module is further configured to:

[0125] According to actual project requirements, the proportion of the number of computing nodes with different resource isolation levels in the multiple computing nodes deployed in the container cluster is set to obtain a set ratio; based on the set ratio, the multiple computing nodes in the container cluster are classified to obtain computing node groups with different resource isolation levels; according to the computing node groups with different resource isolation levels, the attribute information of the multiple computing nodes in the container cluster is stored in a target database table, wherein the target database table includes: multiple database table items, each of the multiple database table items includes: multiple database table fields, and the multiple database table fields include: a computing node name, a computing node network address, a computing node isolation level, and a tenant identifier corresponding to the computing node.

[0126] In an exemplary embodiment, the processing module is further configured to:

[0127] The contents of the target database table are cached to the memory in the form of a hash table, wherein the hash table form includes: multiple key-value pairs, each of the multiple key-value pairs includes: a key field and a value field, the key field is used to record the level identifiers of different resource isolation levels, and the value field is used to record the computing node name corresponding to the level identifier.

[0128] In an exemplary embodiment, the processing module comprises:

[0129] A detection unit, used to detect whether the computing node groups of different resource isolation levels are in a resource balanced state according to a preset period;

[0130] an acquisition unit, for acquiring, in response to the computing node groups of different resource isolation levels not being in the resource balancing state, the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running of the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated, wherein the computing node to be migrated is preferentially migrated between the computing node group of the exclusive isolation level and the computing node group of the shared isolation level in the same tenant, and then migrated from the computing node group of the global shared isolation level to the computing node group of the exclusive isolation level or the computing node group of the shared isolation level, and finally migrated from the computing node group in other tenants to the computing node group in the current tenant, and the remaining amount of resources includes: the remaining amount of processor and the remaining amount of memory;

[0131] A determination unit is used to perform weighted calculation on the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running on the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated, so as to obtain a score of the computing node to be migrated;

[0132] A migration unit is used to migrate the computing node to be migrated from the current computing node group to the target computing node group in response to the score of the computing node to be migrated meeting a preset score condition, wherein the number of remaining computing nodes in the target computing node group does not meet the current project requirements.

[0133] In an exemplary embodiment, the processing module is further configured to:

[0134] An association relationship is established between projects of different priorities set under the target tenant and computing nodes of different resource isolation levels.

[0135] In an exemplary embodiment, the processing module is further configured to:

[0136] A downgrade flag is set for the project, wherein the downgrade flag is used to determine whether to allow the project to be allocated a computing node corresponding to a second isolation level when the computing node corresponding to the first isolation level to be used by the project does not meet the actual needs of the project, and the first isolation level is higher than the second isolation level.

[0137] In an exemplary embodiment, the allocation module 56 is further configured to:

[0138] Based on the node availability status and resource utilization of the multiple computing nodes in the container cluster, filtering the multiple computing nodes in the container cluster to obtain a filtering result;

[0139] Allocating the computing nodes corresponding to the resource isolation level to the target tenant includes: allocating the computing nodes corresponding to the resource isolation level to the target tenant according to the filtering result.

[0140] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0141] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0142] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0143] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0144] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0145] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0146] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0147] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0148] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0149] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A computing node allocation method, It is characterized in that include: Determine a project to which the container application belongs in the target tenant, wherein the target tenant is provided with a plurality of projects, and the plurality of projects are respectively provided with corresponding priorities; Obtaining a resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide multiple computing nodes deployed in the container cluster into different isolation levels; Allocate the computing nodes corresponding to the resource isolation level to the target tenant.

2. The method according to claim 1, It is characterized in that The resource isolation levels include: The exclusive isolation level within a tenant is used to determine the computing nodes unique to a single project under the target tenant; The intra-tenant shared isolation level is used to determine the computing nodes shared by different projects under the target tenant; The global shared isolation level is used to determine the computing nodes shared by different tenants.

3. The method according to claim 2, It is characterized in that The method further comprises: Initialize multiple computing nodes in the container cluster as computing nodes of the global shared isolation level by default.

4. The method according to claim 2, It is characterized in that The method further comprises: According to actual project requirements, the proportion of computing nodes with different resource isolation levels in the multiple computing nodes deployed in the container cluster is set to obtain a set ratio; Classifying the multiple computing nodes in the container cluster based on the set ratio to obtain computing node groups with different resource isolation levels; According to the computing nodes of different resource isolation levels, the attribute information of multiple computing nodes in the container cluster is stored in a target database table, wherein the target database table includes: multiple database table items, each of the multiple database table items includes: multiple database table fields, and the multiple database table fields include: computing node name, computing node network address, computing node isolation level and tenant identifier corresponding to the computing node.

5. The method according to claim 4, It is characterized in that The method further comprises: The contents of the target database table are cached to the memory in the form of a hash table, wherein the hash table form includes: multiple key-value pairs, each of the multiple key-value pairs includes: a key field and a value field, the key field is used to record the level identifiers of different resource isolation levels, and the value field is used to record the computing node name corresponding to the level identifier.

6. The method according to claim 4, It is characterized in that The method further comprises: Check whether the computing node groups with different resource isolation levels are in a resource-balanced state according to a preset period; In response to the computing node groups of different resource isolation levels not being in the resource balancing state, the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running of the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated are obtained, wherein the computing node to be migrated is preferentially migrated between the computing node group of the exclusive isolation level and the computing node group of the shared isolation level in the same tenant, and then migrated from the computing node group of the global shared isolation level to the computing node group of the exclusive isolation level or the computing node group of the shared isolation level, and finally migrated from the computing node group in other tenants to the computing node group in the current tenant, and the remaining amount of resources includes: the remaining amount of processor and the remaining amount of memory; Perform weighted calculation on the isolation level of the computing node to be migrated, the remaining amount of resources of the computing node to be migrated, the number of container applications running on the computing node to be migrated, the number of container image caches of the computing node to be migrated, and the last update time of the container image of the computing node to be migrated to obtain a score for the computing node to be migrated; In response to the score of the computing node to be migrated satisfying a preset score condition, the computing node to be migrated is migrated from a current computing node group to a target computing node group, wherein the number of remaining computing nodes in the target computing node group does not meet current project requirements.

7. The method according to claim 4, It is characterized in that The method further comprises: An association relationship is established between projects of different priorities set under the target tenant and computing nodes of different resource isolation levels.

8. The method according to claim 1, It is characterized in that The method further comprises: A downgrade flag is set for the project, wherein the downgrade flag is used to determine whether to allow the project to be allocated a computing node corresponding to a second isolation level when the computing node corresponding to the first isolation level to be used by the project does not meet the actual needs of the project, and the first isolation level is higher than the second isolation level.

9. The method according to claim 4, It is characterized in that Before allocating the computing node corresponding to the resource isolation level to the target tenant, the method further includes: Based on the node availability status and resource utilization of the multiple computing nodes in the container cluster, filtering the multiple computing nodes in the container cluster to obtain a filtering result; Allocating a computing node corresponding to the resource isolation level to the target tenant includes: According to the filtering result, the computing node corresponding to the resource isolation level is allocated to the target tenant.

10. A computing node allocation device, It is characterized in that include: A determination module, used to determine the project to which the container application belongs in the target tenant, wherein the target tenant is provided with a plurality of projects, and the plurality of projects are respectively provided with corresponding priorities; An acquisition module, used to acquire a resource isolation level corresponding to the priority of the project, wherein the resource isolation level is used to divide multiple computing nodes deployed in the container cluster into different isolation levels; An allocation module is used to allocate the computing nodes corresponding to the resource isolation level to the target tenant.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 9 when executed by a processor.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method described in any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Multi-cluster hybrid deployment system for heterogeneous models

    CN120407213A

  • Multi-cluster hybrid deployment system of heterogeneous models

    CN120407213B

  • Request processing method and device, equipment and storage medium

    CN121037454A