Cluster management method and device, electronic equipment and storage medium

By employing a meta-cluster management approach, the problem of efficiency limitations in Kubernetes cluster management is solved, enabling dynamic expansion and contraction of working clusters, improving the applicability and resource utilization of the cluster system, and supporting cross-cluster domain name resolution and resource isolation.

CN117155948BActive Publication Date: 2026-04-28BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING VOLCANO ENGINE TECH CO LTD
Filing Date
2023-08-29
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The limited management efficiency and load capacity of a single Kubernetes cluster result in a limited number of manageable worker nodes, impacting the user experience, especially in large enterprise applications with high demands.

Method used

The meta-cluster initiates tasks to add or delete work clusters, including initializing the bootstrap environment, deploying cross-cluster domain name databases and resolution servers, automated operation and maintenance tools, and remote execution engines, enabling passwordless communication and bootstrap deployment of work clusters, and supporting the addition, deletion, expansion, and reduction of work clusters and nodes.

Benefits of technology

It improves the management efficiency and applicability of the cluster system, supports the needs of large enterprise applications, realizes cross-cluster domain name resolution and resource isolation, and improves resource utilization and management accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117155948B_ABST
    Figure CN117155948B_ABST
Patent Text Reader

Abstract

The present disclosure provides a cluster management method, device, electronic equipment and storage medium. The cluster management method comprises: initiating a work cluster addition and deletion task by a meta cluster, the work cluster addition and deletion task being used to instruct to add a specified work cluster in a cluster system or to instruct to delete the specified work cluster in the cluster system; wherein the cluster system comprises at least one cluster, the at least one cluster comprising one meta cluster and at least one work cluster, the meta cluster carrying operation and maintenance control of the cluster system, the operation and maintenance control comprising work cluster addition and deletion processing, and the work cluster carrying a business container to execute a business task; and according to indication information of the addition and deletion task, controlling the specified work cluster to implement corresponding cluster deployment or removal in the cluster system. According to the present application, the work cluster can be expanded or deleted according to actual needs through the meta cluster, thereby helping to improve the applicability of the cluster system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a cluster management method, apparatus, electronic device, and storage medium. Background Technology

[0002] Kubernetes (K8S) is a portable and scalable container orchestration platform for managing containerized workloads and services. By containerizing business applications and deploying them on Kubernetes, rapid deployment and fault-healing capabilities can be achieved. Furthermore, leveraging Kubernetes' orchestration and scheduling capabilities, business services can be elastically scaled up and down to handle varying workloads.

[0003] Typically, a Kubernetes cluster consists of management nodes (also called master nodes) and worker nodes. Management nodes are used to manage the metadata, container scheduling, and orchestration of the entire cluster. However, due to the limited management efficiency and load capacity of a single Kubernetes cluster, the number of worker nodes managed within a single cluster is limited, which in turn affects the user experience of the Kubernetes cluster. Summary of the Invention

[0004] This disclosure provides at least one cluster management method, apparatus, electronic device, and storage medium, which can initiate cluster addition and deletion tasks through meta-cluster according to actual needs, thereby expanding and shrinking the cluster system and helping to improve the applicability of the cluster system.

[0005] This disclosure provides a cluster management method, including:

[0006] The task of adding or deleting a work cluster is initiated through the meta-cluster. The task of adding or deleting a work cluster is used to instruct the addition of a specified work cluster in the cluster system or to instruct the deletion of a specified work cluster in the cluster system. The cluster system includes at least one cluster, and the at least one cluster includes a meta-cluster and at least one work cluster. The meta-cluster carries the operation and maintenance management of the cluster system. The operation and maintenance management includes the addition and deletion processing of work clusters. The work cluster carries business containers to execute business tasks.

[0007] Based on the instructions for adding or deleting tasks, control the designated work cluster to implement the corresponding cluster deployment or removal in the cluster system.

[0008] In this embodiment of the disclosure, when the number of nodes required is large, a corresponding cluster increase task can be initiated through the meta-cluster to expand the corresponding number of working clusters according to the actual needs. When it is necessary to reduce the cluster size, a cluster reduction task can be initiated through the meta-cluster to reduce the corresponding working clusters, thereby helping to improve the management efficiency of the cluster system and the applicability of the cluster system.

[0009] In one possible implementation, the method further includes:

[0010] Initialize the bootstrap environment used to deploy the meta-cluster;

[0011] Deploy a database to store domain names across the cluster, deploy a domain name resolution server to provide domain name resolution services across the cluster, and deploy automated operation and maintenance tools and a remote execution engine;

[0012] Perform the bootstrapping deployment of the meta-cluster itself.

[0013] In this embodiment of the disclosure, by deploying a database for storing domain names across clusters, a domain name resolution server that provides domain name resolution services across clusters, as well as automated operation and maintenance tools and a remote execution engine, cross-cluster management of other clusters and cross-cluster domain name resolution can be achieved through the meta-cluster, which helps to improve the operation and maintenance management efficiency and performance of the meta-cluster.

[0014] In one possible implementation, the instruction information for adding or deleting tasks includes cluster addition instruction information, which indicates the addition of a first working cluster; the step of controlling the specified working cluster to perform corresponding cluster deployment or removal in the cluster system according to the instruction information for adding or deleting tasks includes:

[0015] Based on the cluster addition instruction information, perform a pre-deployment operation to achieve passwordless communication between the first working cluster and the meta-cluster;

[0016] A remote execution engine for subsequent remote operation and maintenance is built based on the first working cluster;

[0017] Perform the bootstrap deployment of the first working cluster itself.

[0018] In this embodiment, passwordless communication between the first working cluster and the meta-cluster can be achieved through pre-deployment, which facilitates subsequent automated deployment. Furthermore, a remote execution engine is built to facilitate the meta-cluster's management and control of the first working cluster.

[0019] In one possible implementation, the instruction information for the add / delete task includes cluster deletion instruction information, which is used to indicate the deletion of a second working cluster; the step of controlling the specified working cluster to perform corresponding cluster deployment or removal in the cluster system according to the instruction information for the add / delete task includes:

[0020] Based on the cluster deletion instruction information, all components of the second working cluster are cleaned up by remotely executing a cleanup program;

[0021] In response to the completion of the cleanup of all components, a cleanup result feedback message is generated through the second working cluster and sent to the meta cluster;

[0022] Based on the cleanup result feedback information, the control group deletes the metadata of the second working cluster from the metadata cluster.

[0023] In this embodiment of the disclosure, the efficiency of component removal can be improved by remotely executing a cleanup program to clean up all components on the second working cluster. The meta-cluster also deletes the meta-information of the second working cluster from the meta-cluster based on the cleanup result feedback information from the second working cluster. This allows for timely updates of management information within the meta-cluster, contributing to improved accuracy of system management.

[0024] In one possible implementation, each cluster includes multiple nodes, and the method further includes:

[0025] For each cluster, based on the type of business task performed by each node in the cluster, the multiple nodes are divided into at least one node pool, wherein each node pool includes at least one node.

[0026] In this embodiment of the disclosure, since the multiple nodes are divided into at least one node pool according to the type of business task performed by each node in the cluster, it is convenient to achieve effective resource isolation and deployment between different services when sharing the cluster management node.

[0027] In one possible implementation, the method further includes:

[0028] The node addition task is initiated through the meta-cluster, and the node addition task is used to instruct the first target working cluster to add a first working node in the cluster system.

[0029] Based on the instruction information for adding tasks to the node, the target work cluster is controlled to perform pre-checks, pre-deployments, automated operation and maintenance, remote execution engine expansion, and cluster expansion, so as to realize the deployment of the first work node in the first target work cluster.

[0030] In this embodiment of the disclosure, the expansion of nodes within each working cluster can be achieved through meta-clustering, thereby helping to further improve the applicability of the cluster system.

[0031] In one possible implementation, the method further includes:

[0032] The node deletion task is initiated through the meta-cluster, and the node deletion task is used to instruct the second target working cluster to delete the second working node in the cluster system.

[0033] Based on the instruction information for reducing tasks at the nodes, the second target cluster is controlled to perform pre-checks, reduce the number of automated operation and maintenance and remote execution engine worker nodes, and reduce the number of the second worker nodes.

[0034] In this embodiment of the disclosure, nodes within the working cluster can be deleted through the meta-cluster, thereby reducing the number of nodes in the cluster system when business decreases, which helps to improve resource utilization.

[0035] In one possible implementation, the method further includes:

[0036] The meta-cluster receives domain name resolution requests sent by any working cluster;

[0037] The meta-cluster is controlled to find the resolution working cluster that matches the domain name resolution request based on the deployed domain name resolution server, and forward the domain name resolution request to the resolution working cluster;

[0038] The DNS resolution cluster is controlled to parse the domain name resolution request, generate the corresponding domain name resolution result, and send the domain name resolution result to any of the working clusters through the meta cluster.

[0039] In this embodiment of the disclosure, if domain name resolution cannot be achieved within any working cluster, a domain name resolution request can be generated and sent to the corresponding resolution working cluster through the meta cluster. The resolution working cluster resolves the domain name resolution request, generates the corresponding domain name resolution result, and sends the domain name resolution result to the any working cluster through the meta cluster. In this way, cross-cluster domain name resolution is achieved, providing the possibility for subsequent cross-cluster access.

[0040] This disclosure provides a cluster management device, including:

[0041] The task initiation module is used to initiate work cluster addition / deletion tasks through the meta-cluster. The work cluster addition / deletion tasks are used to instruct the addition of a specified work cluster in the cluster system or to instruct the deletion of a specified work cluster in the cluster system. The cluster system includes at least one cluster, and the at least one cluster includes a meta-cluster and at least one work cluster. The meta-cluster carries the operation and maintenance management of the cluster system. The operation and maintenance management includes the addition / deletion processing of work clusters. The work cluster carries business containers to execute business tasks.

[0042] The cluster addition / removal module is used to control the specified working cluster to be deployed or removed in the cluster system according to the instruction information of the addition / removal task.

[0043] In one possible implementation, the cluster addition / deletion module is further configured to:

[0044] Initialize the bootstrap environment used to deploy the meta-cluster;

[0045] Deploy a database to store domain names across the cluster, deploy a domain name resolution server to provide domain name resolution services across the cluster, and deploy automated operation and maintenance tools and a remote execution engine;

[0046] Perform the bootstrapping deployment of the meta-cluster itself.

[0047] In one possible implementation, the instruction information for adding or deleting tasks includes cluster addition instruction information, which is used to indicate the addition of a first working cluster; the cluster addition / deletion module is specifically used for:

[0048] Based on the cluster addition instruction information, perform a pre-deployment operation to achieve passwordless communication between the first working cluster and the meta-cluster;

[0049] A remote execution engine for subsequent remote operation and maintenance is built based on the first working cluster;

[0050] Perform the bootstrap deployment of the first working cluster itself.

[0051] In one possible implementation, the instruction information for adding or deleting tasks includes cluster deletion instruction information, which is used to indicate the deletion of a second working cluster; the cluster addition / deletion module is specifically used for:

[0052] Based on the cluster deletion instruction information, all components of the second working cluster are cleaned up by remotely executing a cleanup program;

[0053] In response to the completion of the cleanup of all components, a cleanup result feedback message is generated through the second working cluster and sent to the meta cluster;

[0054] Based on the cleanup result feedback information, the control group deletes the metadata of the second working cluster from the metadata cluster.

[0055] In one possible implementation, each cluster includes multiple nodes, and the apparatus further includes:

[0056] The node processing module is used to divide the multiple nodes into at least one node pool for each cluster according to the type of business task performed by each node in the cluster, wherein each node pool includes at least one node.

[0057] In one possible implementation, the task initiation module is further configured to:

[0058] The node addition task is initiated through the meta-cluster, and the node addition task is used to instruct the first target working cluster to add a first working node in the cluster system.

[0059] The node processing module is also used for:

[0060] Based on the instruction information for adding tasks to the node, the target work cluster is controlled to perform pre-checks, pre-deployments, automated operation and maintenance, remote execution engine expansion, and cluster expansion, so as to realize the deployment of the first work node in the first target work cluster.

[0061] In one possible implementation, the task initiation module is further configured to:

[0062] The node deletion task is initiated through the meta-cluster, and the node deletion task is used to instruct the second target working cluster to delete the second working node in the cluster system.

[0063] The node processing module is also used for:

[0064] Based on the instruction information for reducing tasks at the nodes, the second target cluster is controlled to perform pre-checks, reduce the number of automated operation and maintenance and remote execution engine worker nodes, and reduce the number of the second worker nodes.

[0065] In one possible implementation, the apparatus further includes a domain name processing module, the domain name processing module being used for:

[0066] The meta-cluster receives domain name resolution requests sent by any working cluster;

[0067] The meta-cluster is controlled to find the resolution working cluster that matches the domain name resolution request based on the deployed domain name resolution server, and forward the domain name resolution request to the resolution working cluster;

[0068] The DNS resolution cluster is controlled to parse the domain name resolution request, generate the corresponding domain name resolution result, and send the domain name resolution result to any of the working clusters through the meta cluster.

[0069] This disclosure provides an electronic device, including a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the cluster management method described in any of the above embodiments is executed.

[0070] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the cluster management method described in any of the above embodiments.

[0071] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0072] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0073] Figure 1 A flowchart of a cluster management method provided by some embodiments of this disclosure is shown;

[0074] Figure 2 This illustration shows a schematic diagram of the architecture of a cluster system provided by some embodiments of the present disclosure;

[0075] Figure 3 A flowchart of a bootstrapping method for a meta-cluster provided in an embodiment of this disclosure is shown;

[0076] Figure 4 This illustration shows a schematic diagram of the deployment status of nodes after a meta-cluster bootstrapping, as provided in an embodiment of this disclosure.

[0077] Figure 5 A schematic diagram of a node pool within a cluster provided by some embodiments of this disclosure is shown;

[0078] Figure 6This illustration shows a process for adding nodes provided by some embodiments of the present disclosure;

[0079] Figure 7 This illustration shows a schematic diagram of a node deletion process provided by some embodiments of the present disclosure;

[0080] Figure 8 A flowchart of a domain name processing method provided by some embodiments of this disclosure is shown;

[0081] Figure 9 A schematic diagram illustrating a domain name resolution process provided by some embodiments of this disclosure is shown;

[0082] Figure 10 The diagram shows a schematic representation of the cluster management apparatus provided in some embodiments of this disclosure;

[0083] Figure 11 This diagram illustrates the structure of another cluster management device provided in some embodiments of the present disclosure;

[0084] Figure 12 A schematic diagram of an electronic device provided in some embodiments of the present disclosure is shown. Detailed Implementation

[0085] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0086] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0087] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0088] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0089] Research has shown that a Kubernetes cluster typically consists of management nodes and worker nodes. Management nodes manage the entire cluster's metadata, container scheduling, and orchestration. Specifically, each node deploys a node agent (such as kubelet) and a service agent (such as kube-proxy). The node agent communicates with the management components and is responsible for the entire lifecycle of container applications, including adding, deleting, and modifying containers. The service agent proxies cluster services, allowing clients to communicate with containers via service domain names, thus shielding them from the underlying container resource architecture (such as the number of containers and their deployment locations).

[0090] However, due to the limited management efficiency and load capacity of a single Kubernetes cluster, the number of worker nodes managed within a single cluster is limited (e.g., usually not exceeding 5,000), which restricts the use cases of Kubernetes, such as large enterprise applications with high demand.

[0091] Based on the above research, this disclosure provides a cluster management method that can initiate work cluster addition / deletion tasks through a meta-cluster. These work cluster addition / deletion tasks are used to instruct the addition of a specified work cluster in the cluster system or to instruct the deletion of a specified work cluster in the cluster system. The cluster system includes at least one cluster, which includes a meta-cluster and at least one work cluster. The meta-cluster carries the operation and maintenance management of the cluster system, including the addition / deletion processing of work clusters. Each work cluster carries business containers that execute business tasks. Then, according to the instruction information of the addition / deletion task, the method controls the specified work cluster to be deployed or removed from the cluster system.

[0092] In this way, even when the number of nodes required is large, the corresponding cluster increase task can be initiated through the meta-cluster to expand the number of working clusters according to the actual needs. When it is necessary to reduce the cluster size, the cluster reduction task can be initiated through the meta-cluster to reduce the corresponding working clusters, thereby helping to improve the management efficiency and applicability of the cluster system.

[0093] To facilitate understanding of this embodiment, the executing entity of the cluster management method provided in this disclosure will first be described in detail. The executing entity of the cluster management method provided in this disclosure is an electronic device. In this embodiment, the electronic device is a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.

[0094] In other embodiments, the electronic device can also be a terminal device, including mobile devices, computing devices, in-vehicle devices, wearable devices, etc. Furthermore, this cluster management method can also be implemented by the processor calling computer-readable instructions stored in memory.

[0095] The cluster management method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. See also Figure 1 The diagram shown is a flowchart of a cluster management method provided in an embodiment of this disclosure. The cluster management method includes the following steps S101 to S102:

[0096] S101, initiate a task to add or delete a work cluster through the meta cluster. The task is used to instruct the addition of a specified work cluster in the cluster system or to instruct the deletion of a specified work cluster in the cluster system. The cluster system includes at least one cluster, and the at least one cluster includes a meta cluster and at least one work cluster. The meta cluster carries the operation and maintenance management of the cluster system. The operation and maintenance management includes the addition and deletion processing of work clusters. The work cluster carries business containers to execute business tasks.

[0097] Please see Figure 2 , Figure 2 This is a schematic diagram of the architecture of a cluster system provided in an embodiment of this disclosure. Figure 2 As shown, the cluster system 1000 includes a meta-cluster 100 and at least one working cluster 200. The meta-cluster 100 is used for operation and maintenance management of the cluster system 1000. Specifically, this operation and maintenance management includes, but is not limited to, adding or deleting specified working clusters, adding or removing nodes within working clusters, and installing and deploying business components. Each working cluster is used to host specific business containers to execute corresponding business tasks.

[0098] In this embodiment of the disclosure, the cluster is a Kubernetes cluster, also commonly referred to as a K8S cluster. Each cluster includes at least one master node and at least one worker node that communicates with each master node.

[0099] It should be understood that the meta cluster can also host business containers. In some embodiments, when the number of nodes required is small, the cluster system 1000 may only include the meta cluster. In this case, the meta cluster 100 is both a meta cluster and a working cluster.

[0100] exist Figure 2 In the cluster system architecture shown, since the meta-cluster 100 includes global information of the entire cluster system 1000, the self-booting of the meta-cluster 100 itself is also crucial. The self-booting process of the meta-cluster 100 will be described in detail below.

[0101] See Figure 3 The diagram shows a flowchart of a bootstrapping method for a meta-cluster provided in this embodiment of the present disclosure. The bootstrapping method includes the following steps S301 to S303:

[0102] S301, Initialize the bootstrap environment used to deploy the meta-cluster;

[0103] The initialization process for the bootstrap environment used to deploy the meta-cluster, also known as the standard initialization (InitEnv) of the bootstrap environment, includes: downloading the installation package (binary), initializing the virtual standard runtime environment, enabling passwordless configuration between nodes, and deploying Ansible automated operation and maintenance tools. Due to disaster recovery requirements, the bootstrap environment typically consists of multiple physical nodes, thus requiring passwordless configuration across these nodes.

[0104] In this embodiment, passwordless login can be achieved through two methods: password login and Single Sign-On (SSO). Password login refers to configuring passwordless login between nodes using the OpenSSH tool by pre-setting the machine login password in the configuration file; Single Sign-On refers to achieving passwordless login in the bootstrap environment by obtaining a certificate from a certification authority in advance.

[0105] S302 deploys a database for storing domain names across clusters, a domain name resolution server for providing domain name resolution services across clusters, and automated operation and maintenance tools and a remote execution engine.

[0106] The database that stores cross-cluster domain names can be deployed as Region Etcd, a distributed key-value database used to store cross-cluster domain names and cross-cluster resolved domain names.

[0107] The domain name resolution server can be deployed as a Region DNS (Domain Name System), specifically using Region Etcd as the underlying storage to provide services for cross-cluster domain name resolution across the entire network.

[0108] The deployment of automated operation and maintenance tools and remote execution engines can be done using SaltStack. SaltStack is a large-scale automated operation and maintenance tool and remote execution engine with a C / S architecture. Unlike Ansible, its server (salt-master) can perform remote operation and maintenance operations after receiving the authentication public key of the remote host (salt-minion) without having to apply for machine-related permissions or SSO login permissions.

[0109] S303, execute the bootstrap deployment of the meta-cluster itself.

[0110] Specifically, the self-bootstrapping deployment of the meta cluster itself includes deploying components such as kubelet, kubectl, and kubeadm. Among them, kubelet is the node agent in the Kubernetes cluster, which is responsible for maintaining the Pods on the nodes and ensuring the healthy operation of containers. One kubelet process runs on each node; kubectl is the command-line tool for the Kubernetes cluster, which is installed on the Kubernetes master node; and kubeadm is the Kubernetes deployment tool.

[0111] In some embodiments, other deployments may also be made, such as underlying infrastructure services deployed based on Kubernetes, such as Container Network Interface (CNI), Zookeeper, MySQL, infrastructure service programs, etc., which are not specifically limited here.

[0112] See Figure 4The diagram illustrates the deployment status of nodes after bootstrapping a meta-cluster, as provided in this embodiment of the disclosure. In the cluster system, all bootstrapping nodes are cluster master nodes (K8S-master) to ensure high availability. Each cluster master node is a remote management node (master) of the SaltStack remote execution engine, used to manage all nodes in the cluster. Each cluster master node is also a remote execution node (minion) of the SaltStack remote execution engine and can be remotely managed by the remote management node. Subsequently added nodes extend the cluster based on their roles (master or worker). If a node is a cluster worker node, it is also a Salt minion; if it is a cluster master node, it is both a Salt minion and a Salt master.

[0113] S102, according to the instruction information for adding or deleting tasks, control the designated work cluster to implement the corresponding cluster deployment or removal in the cluster system.

[0114] Specifically, the instruction information for adding or deleting tasks includes cluster addition instruction information, which is used to indicate the addition of a first working cluster. For example, the cluster addition instruction information can be generated by the master node of the meta-cluster, where the process of adding a first working cluster is the process of deploying various running components on bare metal.

[0115] In this embodiment, the process of adding a new first working cluster is similar to the meta-cluster bootstrapping process. The deployment of the working cluster can be completed through steps such as pre_install (pre-deployment, binary transfer), installing SaltStack, and installing the cluster.

[0116] Therefore, when controlling the designated work cluster to implement corresponding cluster deployment or removal in the cluster system according to the instruction information of the added or deleted tasks, the following (a) to (c) may be included:

[0117] (a) Based on the cluster addition instruction information, perform a pre-deployment operation to achieve passwordless communication between the first working cluster and the meta-cluster;

[0118] (b) Build a remote execution engine for subsequent remote operation and maintenance based on the first working cluster;

[0119] (c) Perform the bootstrap deployment of the first working cluster itself.

[0120] Specifically, a binary installation package can be obtained from the meta-cluster. That is, the installation package can be transferred to the deployment node of the first working cluster via the meta-cluster. Alternatively, the installation package can be downloaded again; there are no specific limitations. The main function of pre-deployment is to establish passwordless communication between the meta-cluster and the first working cluster node to be installed, facilitating automated deployment by Ansible. Then, a complete SaltStack remote execution engine is built based on the deployment node for subsequent remote operation and maintenance.

[0121] Optionally, after the first working cluster is deployed, the domain name can also be registered with the meta cluster. In this way, when performing cross-cluster domain name resolution in the future, the meta cluster can accurately route the domain name to the corresponding working cluster for resolution.

[0122] In one possible implementation, the instruction information for the add / delete task includes cluster deletion instruction information, which is used to indicate the deletion of a second working cluster. The second working cluster can be any designated working cluster in the cluster system. Therefore, when controlling the designated working cluster to perform corresponding cluster deployment or removal in the cluster system according to the instruction information for the add / delete task, the following (1) to (3) may be specifically included:

[0123] (1) Based on the cluster deletion instruction information, clean up all components of the second working cluster by remotely executing the cleanup program;

[0124] (2) In response to the completion of the cleanup of all components, a cleanup result feedback message is generated through the second working cluster, and the cleanup result feedback message is sent to the meta cluster;

[0125] (3) Control the meta-cluster to delete the meta-information of the second working cluster from the meta-cluster based on the cleanup result feedback information.

[0126] Understandably, in contrast to adding a worker cluster, deleting a worker cluster also originates from the meta cluster, thanks to pre-deployed passwordless communication. This involves remotely executing a cleanup process (SSH) to clean up all components on the second worker cluster and feeding the results back to the meta cluster to instruct it to clean up subsequent meta information.

[0127] In this embodiment, the efficiency of component removal can be improved by remotely executing a cleanup program to clean up all components on the second working cluster. Furthermore, based on the cleanup result feedback from the second working cluster, the meta-cluster deletes the meta-information of the second working cluster from the meta-cluster. This allows for timely updates of management information within the meta-cluster, contributing to improved accuracy in system management.

[0128] It is understandable that, since a domain name is registered with the meta cluster when a new working cluster is added, when a working cluster is deleted, in addition to deleting the meta information of the second working cluster from the meta cluster, the domain name of the second working cluster also needs to be deregistered with the meta cluster.

[0129] In one possible implementation, see Figure 5 As shown, for each cluster, the multiple nodes can be divided into at least one node pool according to the type of business task performed by each node in the cluster, wherein each node pool includes at least one node.

[0130] Specifically, for each working cluster, different nodes can be logically divided into different node pools within the cluster. For example, when adding a new node, a corresponding node identifier can be configured for it, so nodes with the same identifier are grouped into the same node pool. Furthermore, since the meta-cluster itself is also a working cluster, its nodes can also be divided into different node pools (e.g., Figure 4 (As shown).

[0131] In this implementation, by dividing the nodes within the cluster into different node pools according to different business logic types, it not only satisfies the mixed deployment and isolation of different business containers, but also enables different businesses to share the same set of cluster management nodes without competing for resources. Furthermore, for each node pool, node pool information can be stored in the meta-database of the meta-cluster. This node pool information includes the cluster to which the node pool belongs, the number of nodes included in the node pool, the business type associated with the node pool, the available region, and the creation time; the business type can specifically include storage services, database services, and middleware, without specific limitations.

[0132] It is understandable that, in order to further improve the applicability of the cluster system, in addition to adding and deleting specified work clusters, it is also possible to add and delete work nodes in each work cluster to achieve node expansion and reduction. Therefore, in some embodiments, the method further includes the following (I) to (II):

[0133] (I) Initiate a node addition task through the meta-cluster, the node addition task being used to instruct the first target working cluster to add a first working node in the cluster system;

[0134] (II) Based on the instruction information for adding tasks to the node, control the target work cluster to perform pre-checks, pre-deployments, automated operation and maintenance, and remote execution engine expansion and cluster expansion, so as to realize the deployment of the first work node in the first target work cluster.

[0135] The first target working cluster can be any working cluster already deployed in the cluster system. See details below. Figure 6 As shown, a node addition task can be initiated through the infrastructure service in the meta cluster (such as the management service in the meta cluster), which will execute the corresponding node pool addition operation and send the salt-api command to the remote management node salt-master of the first target working cluster. Then, the node addition will be completed by going through the pre-check, pre-deployment, saltstack expansion, and Kubernetes expansion processes in the first target working cluster.

[0136] The pre-checks include checking whether the machine has already installed the software, whether the kernel version is correct, and the operating system configuration; the pre-deployment includes adding nodes, downloading and installing packages, enabling passwordless access to Ansible, and preparing the Python virtual environment.

[0137] Optionally, the method may further include the following (m) to (n):

[0138] (m) Initiate a node deletion task through the meta-cluster, the node deletion task being used to instruct the second target working cluster to delete the second working node in the cluster system;

[0139] (n) Based on the instruction information for reducing tasks in the node, control the second target cluster to perform pre-checks, reduce the number of automated operation and maintenance and remote execution engine worker nodes, and reduce the number of the second worker nodes.

[0140] The second target working cluster can be any working cluster already deployed in the cluster system. See details below. Figure 7 As shown, similar to adding nodes, a node deletion task can be initiated through the infrastructure service in the meta cluster, the corresponding node pool deletion operation can be executed, and the salt-api command can be sent to the remote management node salt-master of the second target working cluster through the pre-deployed saltstack architecture. Then, a reduction operation is performed in the second target working cluster, which includes steps such as pre-check, removal of business modules (if any), and reduction of saltstack working nodes and cluster nodes.

[0141] In this way, nodes within each work cluster can be deleted through the meta-cluster, thereby reducing the number of nodes in the cluster system when business activity decreases, which helps improve resource utilization.

[0142] It should be understood that, because the meta-cluster deploys a domain name resolution server during bootstrapping, each worker cluster can send its own domain name to the meta-cluster to register the domain name when a new worker cluster is added. Therefore, under this cluster system architecture, if domain name resolution cannot be achieved within any worker cluster, a domain name resolution request can be generated and sent to the meta-cluster to achieve domain name resolution through the meta-cluster. Therefore, see [link to relevant documentation]. Figure 8 As shown, in this embodiment, the method further includes the following steps S801 to S803:

[0143] S801, receive a domain name resolution request sent by any working cluster through the meta cluster;

[0144] S802, control the meta cluster to find the resolution working cluster that matches the domain name resolution request based on the deployed domain name resolution server, and forward the domain name resolution request to the resolution working cluster;

[0145] S803, control the DNS resolution work cluster to parse the domain name resolution request, generate the corresponding domain name resolution result, and send the domain name resolution result to any of the work clusters through the meta cluster.

[0146] Specifically, see Figure 9 As shown, when worker cluster a sends a DNS resolution request for the current domain name, it can send the DNS resolution request to the DNS of the meta cluster through the DNS deployed on worker cluster a. That is, the meta cluster can receive DNS resolution requests sent by any worker cluster. Then, the meta cluster can find the DNS resolution worker cluster b that matches the DNS resolution request based on the DNS resolution server, and forward the DNS resolution request to the DNS resolution worker cluster b. Next, the DNS resolution worker cluster b can generate the corresponding DNS resolution result according to the DNS resolution request, and send the DNS resolution result to the meta cluster. Finally, the meta cluster forwards the DNS resolution result to worker cluster a, thereby realizing the resolution of the domain name.

[0147] In this way, the deployment architecture based on region DNS and region ETCD in the meta cluster can realize domain name resolution for all K8S clusters across the entire network, breaking through the problem that the native architecture can only resolve domain names within the cluster.

[0148] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0149] Based on the same technical concept, this disclosure also provides a cluster management device corresponding to the cluster management method. Since the principle of the device in this disclosure for solving the problem is similar to the above-mentioned cluster management method in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0150] Reference Figure 10 The diagram shown is a schematic of a cluster management device 1010 provided in an embodiment of this disclosure. The device includes:

[0151] The task initiation module 1011 is used to initiate work cluster addition / deletion tasks through the meta-cluster. The work cluster addition / deletion tasks are used to instruct the addition of a specified work cluster in the cluster system or to instruct the deletion of a specified work cluster in the cluster system. The cluster system includes at least one cluster, and the at least one cluster includes a meta-cluster and at least one work cluster. The meta-cluster carries the operation and maintenance management of the cluster system. The operation and maintenance management includes the addition / deletion processing of work clusters. The work cluster carries business containers to execute business tasks.

[0152] The cluster addition / deletion module 1012 is used to control the specified working cluster to implement the corresponding cluster deployment or removal in the cluster system according to the instruction information of the addition / deletion task.

[0153] In one possible implementation, the cluster addition / deletion module 1012 is further configured to:

[0154] Initialize the bootstrap environment used to deploy the meta-cluster;

[0155] Deploy a database to store domain names across the cluster, deploy a domain name resolution server to provide domain name resolution services across the cluster, and deploy automated operation and maintenance tools and a remote execution engine;

[0156] Perform the bootstrapping deployment of the meta-cluster itself.

[0157] In one possible implementation, the instruction information for adding or deleting tasks includes cluster addition instruction information, which is used to indicate the addition of a first working cluster; the cluster addition / deletion module 1012 is specifically used for:

[0158] Based on the cluster addition instruction information, perform a pre-deployment operation to achieve passwordless communication between the first working cluster and the meta-cluster;

[0159] A remote execution engine for subsequent remote operation and maintenance is built based on the first working cluster;

[0160] Perform the bootstrap deployment of the first working cluster itself.

[0161] In one possible implementation, the instruction information for adding or deleting tasks includes cluster deletion instruction information, which is used to indicate the deletion of a second working cluster; the cluster addition / deletion module 1012 is specifically used for:

[0162] Based on the cluster deletion instruction information, all components of the second working cluster are cleaned up by remotely executing a cleanup program;

[0163] In response to the completion of the cleanup of all components, a cleanup result feedback message is generated through the second working cluster and sent to the meta cluster;

[0164] Based on the cleanup result feedback information, the control group deletes the metadata of the second working cluster from the metadata cluster.

[0165] In one possible implementation, each cluster comprises multiple nodes, see [link to relevant documentation]. Figure 11 As shown, the device further includes:

[0166] The node processing module 1013 is used to divide the multiple nodes into at least one node pool for each cluster according to the type of business task performed by each node in the cluster, wherein each node pool includes at least one node.

[0167] In one possible implementation, the task initiation module 1011 is further configured to:

[0168] The node addition task is initiated through the meta-cluster, and the node addition task is used to instruct the first target working cluster to add a first working node in the cluster system.

[0169] The node processing module 1013 is also used for:

[0170] Based on the instruction information for adding tasks to the node, the target work cluster is controlled to perform pre-checks, pre-deployments, automated operation and maintenance, remote execution engine expansion, and cluster expansion, so as to realize the deployment of the first work node in the first target work cluster.

[0171] In one possible implementation, the task initiation module 1011 is further configured to:

[0172] The node deletion task is initiated through the meta-cluster, and the node deletion task is used to instruct the second target working cluster to delete the second working node in the cluster system.

[0173] The node processing module 1013 is also used for:

[0174] Based on the instruction information for reducing tasks at the nodes, the second target cluster is controlled to perform pre-checks, reduce the number of automated operation and maintenance and remote execution engine worker nodes, and reduce the number of the second worker nodes.

[0175] In one possible implementation, the apparatus further includes a domain name processing module 1014, the domain name processing module 1014 being configured to:

[0176] The meta-cluster receives domain name resolution requests sent by any working cluster;

[0177] The meta-cluster is controlled to find the resolution working cluster that matches the domain name resolution request based on the deployed domain name resolution server, and forward the domain name resolution request to the resolution working cluster;

[0178] The DNS resolution cluster is controlled to parse the domain name resolution request, generate the corresponding domain name resolution result, and send the domain name resolution result to any of the working clusters through the meta cluster.

[0179] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0180] Based on the same technical concept, this disclosure also provides an electronic device. (See also...) Figure 12 The diagram shown is a structural schematic of an electronic device 1200 provided in an embodiment of this disclosure, including a processor 1210, a memory 1220, and a bus 1230. The memory 1220 stores execution instructions and includes a main memory 1221 and an external memory 1222. The main memory 1221, also called internal memory, is used to temporarily store computational data in the processor 1210, as well as data exchanged with external memory such as a hard disk. The processor 1210 exchanges data with the external memory 1222 through the main memory 1221.

[0181] In this embodiment, the memory 1220 is specifically used to store application code that executes the solution of this application, and its execution is controlled by the processor 1210. That is, when the electronic device 1200 is running, the processor 1210 communicates with the memory 1220 through the bus 1230, so that the processor 1210 executes the application code stored in the memory 1220, and then executes the method described in any of the foregoing embodiments.

[0182] The memory 1220 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0183] Processor 1210 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0184] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 1200. In other embodiments of this application, the electronic device 1200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0185] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the cluster management method described in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0186] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the cluster management method in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0187] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0188] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

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

[0190] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0191] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0192] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A cluster management method, characterized in that, The method includes: The meta-cluster initiates worker cluster addition / deletion tasks, which are used to instruct the addition or deletion of a specified worker cluster in the cluster system; wherein, the cluster system includes at least one cluster, each cluster includes multiple nodes, and each cluster includes a master node and at least one worker node communicatively connected to each master node, wherein... In the case where the at least one cluster includes a meta-cluster and at least one worker cluster, the meta-cluster carries out the operation and maintenance management of the cluster system, and the operation and maintenance management includes the addition and deletion processing of worker clusters, wherein the worker cluster carries business containers to execute business tasks; and In the case where the at least one cluster includes a meta-cluster, the meta-cluster carries the operation and maintenance management of the cluster system and carries the business container to execute the business task; according to the instruction information for adding or deleting tasks in the work cluster, the specified work cluster is controlled to realize the corresponding cluster deployment or removal in the cluster system; The method further includes: For each cluster, based on the type of business task executed by each node in the cluster, the multiple nodes are divided into at least one node pool, wherein each node pool includes at least one node, and different node pools correspond to different business logic types.

2. The method according to claim 1, characterized in that, The method further includes: Initialize the bootstrap environment used to deploy the meta-cluster; Deploy a database to store domain names across the cluster, deploy a domain name resolution server to provide domain name resolution services across the cluster, and deploy automated operation and maintenance tools and a remote execution engine; Perform the bootstrapping deployment of the meta-cluster itself.

3. The method according to claim 1, characterized in that, The instruction information for adding or deleting work clusters includes instructions for adding a cluster, which indicates the addition of a first work cluster; the step of controlling the specified work cluster to perform corresponding cluster deployment or removal in the cluster system based on the instructions for adding or deleting work clusters includes: Based on the cluster addition instruction information, perform a pre-deployment operation to achieve passwordless communication between the first working cluster and the meta-cluster; A remote execution engine for subsequent remote operation and maintenance is built based on the first working cluster; Perform the bootstrap deployment of the first working cluster itself.

4. The method according to claim 1, characterized in that, The instruction information for adding or deleting work clusters includes cluster deletion instruction information, which is used to indicate the deletion of a second work cluster; the step of controlling the specified work cluster to perform corresponding cluster deployment or removal in the cluster system according to the instruction information for adding or deleting work clusters includes: Based on the cluster deletion instruction information, all components of the second working cluster are cleaned up by remotely executing a cleanup program; In response to the completion of the cleanup of all components, a cleanup result feedback message is generated through the second working cluster and sent to the meta cluster; Based on the cleanup result feedback information, the control group deletes the metadata of the second working cluster from the metadata cluster.

5. The method according to claim 1, characterized in that, The method further includes: The node addition task is initiated through the meta-cluster, and the node addition task is used to instruct the first target working cluster to add a first working node in the cluster system. Based on the instruction information for adding tasks to the node, the first target work cluster is controlled to perform pre-checks, pre-deployments, automated operation and maintenance, remote execution engine expansion, and cluster expansion to achieve the deployment of the first work node in the first target work cluster.

6. The method according to claim 1, characterized in that, The method further includes: The node deletion task is initiated through the meta-cluster, and the node deletion task is used to instruct the second target working cluster to delete the second working node in the cluster system. Based on the instruction information for reducing tasks at the nodes, the second target work cluster is controlled to perform pre-checks, reduce the number of automated operation and maintenance and remote execution engine work nodes, and reduce the number of the second work nodes.

7. The method according to claim 2, characterized in that, The method further includes: The meta-cluster receives domain name resolution requests sent by any working cluster; The meta-cluster is controlled to find the resolution working cluster that matches the domain name resolution request based on the deployed domain name resolution server, and forward the domain name resolution request to the resolution working cluster; The DNS resolution cluster is controlled to parse the domain name resolution request, generate the corresponding domain name resolution result, and send the domain name resolution result to any of the working clusters through the meta cluster.

8. A cluster management device, characterized in that, include: The task initiation module is used to initiate tasks for adding or deleting work clusters through a meta-cluster. These tasks instruct the addition or deletion of a specified work cluster within the cluster system. The cluster system includes at least one cluster, each cluster comprising multiple nodes, and each cluster includes a master node and at least one work node communicatively connected to each master node. When the at least one cluster includes a meta-cluster and at least one work cluster, the meta-cluster handles the operation and maintenance management of the cluster system, including the addition and deletion of work clusters. The work clusters carry business containers that execute business tasks. Furthermore, when the at least one cluster includes a meta-cluster, the meta-cluster handles the operation and maintenance management of the cluster system and carries the business containers that execute the business tasks. The cluster addition / removal module is used to control the specified work cluster to be deployed or removed in the cluster system according to the instruction information of the work cluster addition / removal task. The cluster management device further includes: The node processing module is used to divide the multiple nodes into at least one node pool for each cluster according to the type of business task executed by each node in the cluster. Each node pool includes at least one node, and different node pools correspond to different business logic types.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the cluster management method as described in any one of claims 1-7 is performed.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the cluster management method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • High-availability cluster architecture artificial intelligence experiment cloud platform data processing method and system

    CN116192885A