Cluster management method, apparatus, electronic device, and storage medium

JP2025036164AActive Publication Date: 2025-03-14BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024129673
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-29
Filing Date
2024-08-06
Publication Date
2025-03-14
Estimated Expiration
2044-08-06

AI Technical Summary

Benefits of technology

【0031】 本開示の上記目的、特徴及び利点をより明確且つ理解しやすくするために、以下、好ましい実施例を挙げ、且つ添付される図面を参照しながら、詳細に説明する。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025036164000001_ABST
    Figure 2025036164000001_ABST
Patent Text Reader

Abstract

To provide a cluster management method, an apparatus, an electronic device, and storage medium for improving the applicability of a cluster system through a meta cluster according to actual needs.SOLUTION: A cluster management method comprises: a step for initiating, via a meta cluster, a work cluster adding / deleting task that instructs adding / deleting a work cluster designated in a cluster system, wherein the cluster system includes one or more clusters that include one meta cluster and one or more work clusters, wherein the meta cluster is responsible for operation maintenance and management control for the cluster system, and the operation maintenance and management control include work cluster adding / deleting processing, wherein the work cluster is responsible for a business container and executes a business task; and a step for controlling the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system based on the instruction information of the adding / deleting task.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the field of computer technology, and more particularly to a cluster management method, device, electronic device, and storage medium. [Background technology]

[0002] Kubernetes (abbreviated as K8S) is a portable and extensible container orchestration platform used to manage containerized workloads and services. By containerizing and upgrading business processes and deploying them on Kubernetes, it is possible to realize functions such as rapid deployment of business applications and self-healing from failures. At the same time, the orchestration and scheduling functions of Kubernetes can realize flexible expansion and contraction of business services to cope with business pressures of different loads.

[0003] Typically, a Kubernetes cluster is divided into a management and control node (also called a master node) and a worker node, and the management and control node is used to manage the metadata of the entire cluster, container scheduling, orchestration, etc. However, due to the limited management and control efficiency and load capacity of a single Kubernetes cluster, the number of worker nodes managed in a single cluster is limited, which further affects the use experience of a Kubernetes cluster. Summary of the Invention [Problem to be solved by the invention]

[0004] The embodiments of the present disclosure provide at least a cluster management method, device, electronic device and storage medium, which can initiate cluster addition and deletion tasks via a meta cluster according to actual needs, and further can expand and shrink the cluster system, which is advantageous in improving the applicability of the cluster system. [Means for solving the problem]

[0005] An embodiment of the present disclosure provides a cluster management method, Initiating a work cluster addition / deletion task via a meta cluster to instruct to add a designated work cluster in the cluster system or to instruct to delete a designated work cluster in the cluster system, in which the cluster system includes at least one cluster, the at least one cluster includes one meta cluster and at least one work cluster, the meta cluster is responsible for operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes a work cluster addition / deletion process, and the work cluster is responsible for a business container to execute a business task; and controlling, based on the instruction information of the adding / removing task, the designated work cluster to realize the placement or removal of the corresponding cluster in the cluster system.

[0006] In the embodiments of the present disclosure, when a large number of nodes are required, a corresponding number of work clusters can be amplified by initiating a corresponding cluster addition task via the meta cluster according to actual needs, and when it is necessary to reduce the cluster size, a corresponding work cluster can be reduced by initiating a cluster reduction task via the meta cluster, which is further advantageous in improving the management and control efficiency of the cluster system and the applicability of the cluster system.

[0007] In a possible embodiment, the method comprises the steps of: initializing a bootstrap environment for deploying a metacluster; disposing a database for storing domain names between clusters, disposing a domain name resolution server for providing domain name resolution services between clusters, and disposing an automated operation and maintenance tool and a remote execution engine; and performing the meta-cluster itself.

[0008] In an embodiment of the present disclosure, by disposing a database for storing inter-cluster domain names, a domain name analysis server for providing inter-cluster domain name analysis services, and an automated operation and maintenance tool and a remote execution engine, it is possible to realize inter-cluster management of other clusters by a meta cluster and inter-cluster domain name analysis, which is advantageous to improving the operation and maintenance and management control efficiency and performance of the meta cluster.

[0009] In a possible embodiment, the instruction information of the adding / deleting task includes cluster adding instruction information, and the cluster adding instruction information is used to instruct the newly adding of the first work cluster, and the step of controlling the designated work cluster to realize the placement or removal of the corresponding cluster in the cluster system according to the instruction information of the adding / deleting task includes: According to the cluster addition instruction information, performing a pre-configuration operation to realize password-free interworking between the first work cluster and the meta cluster; Building a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; and performing a bootstrap placement of the first work cluster itself.

[0010] In the embodiment of the present disclosure, the pre-configuration operation can realize password-free interworking between the first work cluster and the meta cluster, which is more convenient for subsequent automated configuration, and the remote execution engine can be established to facilitate the meta cluster to manage and control the first work cluster.

[0011] In a possible embodiment, the instruction information of the adding and deleting task includes cluster deletion instruction information, and the cluster deletion instruction information is used to instruct to erase the second work cluster, and the step of controlling the designated work cluster to realize the placement or removal of the corresponding cluster in the cluster system according to the instruction information of the adding and deleting task includes: cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster removal instruction information; generating cleaning result feedback information through a second work cluster in response to completing cleaning of all components, and sending the cleaning result feedback information to the meta cluster; and controlling the meta cluster to erase the meta information of the second work cluster from the meta cluster based on the cleaning result feedback information.

[0012] In the embodiment of the present disclosure, the cleaning program is remotely executed to clean all the components in the second work cluster, thereby improving the component clearing efficiency. The meta cluster further erases the meta information of the second work cluster from the meta cluster according to the cleaning result feedback information fed back by the second work cluster, thus updating the management information in the meta cluster in real time, which is advantageous to improving the accuracy of system management.

[0013] In a possible embodiment, each cluster comprises a plurality of nodes, and the method comprises: For each cluster, the method further includes dividing the plurality of nodes into at least one node pool based on a type of business task performed by each node in the cluster, each node pool including at least one node.

[0014] In an embodiment of the present disclosure, multiple nodes are divided into at least one node pool based on the type of business tasks performed by each node in the cluster, which facilitates sharing of cluster management control nodes between different businesses and achieving effective resource isolation and allocation.

[0015] In a possible embodiment, the method comprises the steps of: Initiating a node addition task via a meta cluster to instruct a first target work cluster to add a first work node in the cluster system; The method further includes a step of controlling the target work cluster to perform pre-inspection, pre-configuration, expansion of the automated operation and maintenance and remote execution engine, and cluster expansion based on the instruction information of the node addition task, thereby realizing configuration of the first work node in the first target work cluster.

[0016] In the embodiments of the present disclosure, the meta-cluster can realize the amplification of nodes in each work cluster, which is advantageous to further improve the applicability of the cluster system.

[0017] In a possible embodiment, the method comprises the steps of: Initiating a node removal task via a meta cluster to instruct a second target work cluster to remove a second work node in the cluster system; The method further includes controlling the second target cluster to perform pre-inspection, reduction of work nodes of the automated operation and maintenance and remote execution engine, and reduction of second work nodes based on the instruction information of the node removal task.

[0018] In an embodiment of the present disclosure, the meta cluster can eliminate nodes in a work cluster, and when the workload decreases, the nodes in the cluster system can be correspondingly reduced, which is advantageous to improving resource utilization.

[0019] In a possible embodiment, the method comprises the steps of: receiving a domain name resolution request sent by any of the work clusters via a meta cluster; Searching for an analysis work cluster that matches the domain name resolution request according to the domain name resolution server where the meta cluster is located, and controlling to transfer the domain name resolution request to the analysis work cluster; The method further includes controlling the analysis work cluster to analyze the domain name resolution request, generate a corresponding domain name resolution result, and send the domain name resolution result to any of the work clusters via the meta cluster.

[0020] In an embodiment of the present disclosure, when domain name resolution cannot be realized within any work cluster, a domain name resolution request can be generated and the domain name resolution request can be sent to a corresponding analysis work cluster via a meta cluster, and the analysis work cluster generates a corresponding domain name resolution result after analyzing the domain name resolution request, and sends the domain name resolution result to any work cluster via the meta cluster, thus providing the possibility of realizing inter-cluster domain name resolution and subsequent inter-cluster access.

[0021] An embodiment of the present disclosure provides a cluster management device, a task initiation module for instructing to add a designated work cluster in the cluster system or instructing to delete a designated work cluster in the cluster system via a meta cluster, the cluster system including at least one cluster, the at least one cluster including one meta cluster and at least one work cluster, the meta cluster is responsible for operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes a process of adding and deleting the work cluster, and the work cluster is responsible for a business container to execute a business task; and a cluster addition / deletion module for controlling a designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system according to the instruction information of the addition / deletion task.

[0022] In a possible embodiment, the cluster addition / deletion module comprises: initializing a bootstrap environment for deploying a metacluster; disposing a database for storing domain names between clusters, disposing a domain name analysis server for providing domain name analysis services between clusters, and disposing an automated operation and maintenance tool and a remote execution engine; It is further used to perform a bootstrap placement of the metacluster itself.

[0023] In one possible embodiment, the instruction information of the adding / deleting task includes cluster adding instruction information, and the cluster adding instruction information is used to instruct the first work cluster to be newly added. The cluster adding / deleting module specifically includes: According to the cluster addition instruction information, performing a pre-configuration operation to realize password-free interworking between the first work cluster and the meta cluster; Building a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; and performing a bootstrap placement of the first work cluster itself.

[0024] In one possible embodiment, the instruction information of the adding and deleting task includes cluster deletion instruction information, and the cluster deletion instruction information is used to instruct to erase the second work cluster. The cluster adding and deleting module specifically includes: cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster removal instruction information; In response to completing cleaning of all the components, generating cleaning result feedback information via the second work cluster and sending the cleaning result feedback information to the meta cluster; The meta cluster is used to control, based on the cleaning result feedback information, to erase the meta information of the second work cluster from the meta cluster.

[0025] In a possible embodiment, each cluster includes a plurality of nodes, and the apparatus comprises: The system further includes a node processing module for each cluster to divide the plurality of nodes into at least one node pool based on a type of business task performed by each node in the cluster, each node pool including at least one node.

[0026] In a possible embodiment, the task initiation module: The method is further used for initiating, via the meta cluster, a node addition task to instruct the first target work cluster to add a first work node in the cluster system; The node processing module is It is further used to realize the configuration of the first work node in the first target work cluster by controlling the target work cluster to perform pre-inspection, pre-configuration, expansion of the automated operation and maintenance and remote execution engine, and cluster expansion based on the instruction information of the node addition task.

[0027] In a possible embodiment, the task initiation module: Further used for initiating, via the meta cluster, a node removal task to instruct a second target work cluster to remove a second work node in the cluster system; The node processing module is It is further used for controlling the second target cluster to perform pre-inspection, automatic operation and maintenance, and remote execution engine work node reduction, and second work node reduction according to the instruction information of the node removal task.

[0028] In a possible embodiment, the device further comprises a domain name processing module, the domain name processing module comprising: receiving a domain name resolution request sent by any of the work clusters via a meta cluster; Searching for an analysis work cluster that matches the domain name analysis request based on the domain name analysis server in which the meta cluster is located, and controlling to transfer the domain name analysis request to the analysis work cluster; The analysis work cluster analyzes the domain name analysis request, generates a corresponding domain name analysis result, and controls the domain name analysis result to be sent to any of the work clusters via the meta cluster.

[0029] An embodiment of the present disclosure provides an electronic device comprising a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is operating, communication occurs between the processor and the memory via the bus, and when the machine-readable instructions are executed by the processor, the cluster management method described in any of the above embodiments is performed.

[0030] An embodiment of the present disclosure provides a computer-readable storage medium, and a computer program is stored in the computer-readable storage medium, and the computer program executes the cluster management method according to any one of the above embodiments when run by a processor.

[0031] In order to make the above objects, features and advantages of the present disclosure clearer and easier to understand, preferred embodiments are given below in detail with reference to the accompanying drawings. [Brief description of the drawings]

[0032] In order to more clearly explain the technical solutions of the embodiments of the present disclosure, the following will briefly describe the drawings that need to be used in the embodiments, and the drawings herein are incorporated into the specification and form a part of this specification, these drawings show the embodiments corresponding to the present disclosure, and together with the specification, explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and should not be considered as limiting the scope, and those skilled in the art can obtain other related drawings based on these drawings without creative labor.

[0033] [Figure 1] FIG. 1 shows a flow chart of a cluster management method according to some embodiments of the present disclosure. [Diagram 2] FIG. 2 illustrates an architecture diagram of a cluster system according to some embodiments of the present disclosure. [Diagram 3] FIG. 3 shows a flowchart of a method for bootstrapping a metacluster according to an embodiment of the present disclosure. [Figure 4] FIG. 4 shows a schematic diagram of node placement state after bootstrapping of a metacluster according to an embodiment of the present disclosure. [Diagram 5] FIG. 5 illustrates a schematic diagram of a node pool in a cluster according to some embodiments of the present disclosure. [Figure 6] FIG. 6 illustrates a process diagram of adding a node according to some embodiments of the present disclosure. [Figure 7] FIG. 7 illustrates a process diagram of a node deletion according to some embodiments of the present disclosure. [Figure 8] FIG. 8 illustrates a flowchart of a domain name processing method according to some embodiments of the present disclosure. [Figure 9] FIG. 9 illustrates a schematic diagram of a domain name resolution process according to some embodiments of the present disclosure. [Figure 10] FIG. 10 shows a structural diagram of a cluster management device according to some embodiments of the present disclosure. [Figure 11] FIG. 11 illustrates a structural diagram of another cluster management device according to some embodiments of the present disclosure. [Figure 12] FIG. 12 illustrates a schematic diagram of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0034] In order to make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the drawings in the embodiments of the present disclosure, so that it is clear that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. Usually, the components of the embodiments of the present disclosure described and shown in the drawings herein can be installed and designed in various different configurations. Therefore, the detailed description of the embodiments of the present disclosure provided in the drawings below is not intended to limit the scope of the present disclosure of the protection claims, but only represents a specific embodiment of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present disclosure.

[0035] It should be noted that like symbols and letters represent like items in the following drawings, and thus, once an item is defined in one drawing, it does not need to be further defined and interpreted in subsequent drawings.

[0036] Terms such as "and / or" in this specification are merely for describing a relation and indicate that three relations can exist, for example, A and / or B can indicate three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, terms such as "at least one" in this specification indicate any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, and C means including any one or more elements selected from the group consisting of A, B, and C.

[0037] As can be understood, before using the technical solutions disclosed in each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of personal information related to the present disclosure should be notified to users in an appropriate manner in accordance with relevant laws and regulations, and their permission should be obtained.

[0038] According to research, a Kubernetes cluster usually includes a management control node and a worker node. Here, the management control node is used to manage the metadata, container scheduling and orchestration of the entire cluster. Specifically, each node is configured with a node agent (e.g., kubelet) and a service agent (e.g., kube-proxy). The node agent is used to communicate with the management control component and is responsible for the entire life cycle of the container application, including adding / removing / changing containers, and the service agent is used to proxy the cluster service, allowing the client terminal to communicate with the container through the service domain name, thereby blocking the underlying container resource architecture (e.g., the number of containers, the placement location of the container, etc.).

[0039] However, due to the limited management control efficiency and load capacity of a single Kubernetes cluster, the number of managed work nodes in a single cluster is limited (for example, generally cannot exceed 5,000), which limits the usage scenarios of Kubernetes, such as in large enterprises with high demand capacity.

[0040] Based on the above research, an embodiment of the present disclosure provides a cluster management method, which can initiate a work cluster addition / deletion task via a meta cluster, and the work cluster addition / deletion task is used to instruct adding a specified work cluster in a cluster system or instructing deleting a specified work cluster in a cluster system, the cluster system includes at least one cluster, the at least one cluster includes one meta cluster and at least one work cluster, the meta cluster is responsible for operation, maintenance, and management control of the cluster system, the operation, maintenance, and management control includes adding and deleting processing of work clusters, the work cluster is responsible for a business container to execute a business task, and then based on the instruction information of the addition / deletion task, controls the specified work cluster to realize the allocation or removal of a corresponding cluster in the cluster system.

[0041] In this way, even if a large number of nodes are required, the corresponding number of work clusters can be amplified by initiating a corresponding cluster addition task via the meta cluster according to actual needs, and when it is necessary to reduce the cluster size, the corresponding work clusters can be reduced by initiating a cluster reduction task via the meta cluster, which is further advantageous in improving the management and control efficiency of the cluster system and the applicability of the cluster system.

[0042] In order to facilitate understanding of this embodiment, the execution entity of the cluster management method according to the embodiment of the present disclosure will be described in detail first. The execution entity of the cluster management method according to the embodiment of the present disclosure is an electronic device. In the embodiment of the present disclosure, the electronic device is a server. Here, the server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or even a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data and artificial intelligence platforms.

[0043] In another embodiment, the electronic device may be a terminal device, including a mobile device, a computing device, an in-vehicle device, a wearable device, etc. The cluster management method may also be implemented by a processor invoking computer-readable instructions stored in the memory.

[0044] The cluster management method according to the embodiment of the present disclosure will be described in detail below with reference to the drawings. As shown in Figure 1, which is a flowchart of the cluster management method according to the embodiment of the present disclosure, the cluster management method includes the following steps S101 to S102.

[0045] S101: via a meta cluster, initiate a work cluster adding / deleting task to instruct adding a specified work cluster in a cluster system or to instruct deleting a specified work cluster in a cluster system, the cluster system includes at least one cluster, the at least one cluster includes one of the meta clusters and at least one work cluster, the meta cluster is responsible for operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes adding / deleting processing of work clusters, and the work cluster is responsible for a business container to execute a business task.

[0046] Referring to Fig. 2, Fig. 2 is an architecture schematic diagram of a cluster system according to an embodiment of the present disclosure. As shown in Fig. 2, a cluster system 1000 includes a meta cluster 100 and at least one work cluster 200. Here, the meta cluster 100 is used to perform operation, maintenance, and management control of the cluster system 1000. Specifically, the operation, maintenance, and management control includes, but is not limited to, adding and deleting a specified work cluster, increasing and decreasing the number of nodes in a work cluster, installing a business component, etc., and each work cluster is used to carry out a specific business container to execute a corresponding business task.

[0047] The clusters in the embodiments of the present disclosure are Kubernetes clusters, commonly referred to as K8S clusters, and each cluster includes at least one master node (Master) and at least one worker node (Worker) connected in communication with each master node (Master).

[0048] It should be understood that the metacluster can also host a business container, and in some embodiments, when the number of nodes required is small, the cluster system 1000 may include only a metacluster, in which case the metacluster 100 is both a metacluster and a work cluster.

[0049] In the cluster system architecture shown in FIG. 2, the meta-cluster 100 contains global information of the entire cluster system 1000. Therefore, the bootstrap of the meta-cluster 100 itself is also very important. The bootstrap process of the meta-cluster 100 will be described in detail below.

[0050] Referring to FIG. 3, there is shown a flowchart of a metacluster bootstrap method according to an embodiment of the present disclosure, which includes the following steps S301 to S303.

[0051] S301, initialize a bootstrap environment for arranging the metacluster.

[0052] The process of initializing the bootstrap environment for deploying the meta cluster is the standard initialization (InitEnv) of the bootstrap environment, and specifically includes downloading the installation package (binary), initializing the virtual standard operating environment, eliminating the need for passwords between nodes, deploying the ansible automated operation and maintenance tool, etc. In order to take disaster resistance requirements into account, the bootstrap environment is generally multiple physical nodes, and therefore, it is necessary to perform a password-free deployment between multiple nodes.

[0053] In the embodiment of the present disclosure, password-free login can be realized by two methods: password login and single sign-on (SSO). Here, password login refers to creating a machine login password in advance in a configuration file and configuring password-free login between nodes using an OpenSSH tool, and single sign-on refers to realizing password-free in a bootstrap environment by using an authentication certificate applied for in advance at an authentication center.

[0054] S302, disposing a database for storing domain names between the clusters, disposing a domain name resolution server for providing domain name resolution services between the clusters, and disposing an automated operation and maintenance tool and a remote execution engine.

[0055] The layout of the database storing inter-cluster domain names may be a Region Etcd layout, where Region Etcd is a distributed KV database used for storing inter-cluster domain names and inter-cluster analysis domain names.

[0056] The domain name resolution server may be arranged as a Region DNS (Domain Name System) arrangement, specifically, it uses Region Etcd as the basic storage and provides domain name resolution services between clusters in the entire network.

[0057] The deployment of the automated operation and maintenance tool and remote execution engine may be a SaltStack deployment. SaltStack is a large-scale automated operation and maintenance tool and remote execution engine based on C / S architecture. It differs from ansible in that when the server side (salt-master) receives an authentication public key from a remote host computer (salt-minion), it can execute remote operation and maintenance using the public key, eliminating the need to apply for machine-related authority or SSO login authority.

[0058] S303, performing a bootstrap placement of the metacluster itself.

[0059] Specifically, the bootstrap configuration of the meta cluster itself includes the configuration of components such as kubelet, kubectl, and kubeadm, where Kubelet is the node agent in the K8S cluster, which is responsible for maintaining pods on the node and ensuring the normal operation of containers, there is one kubelet process running on each node, kubectl is the command line tool of the k8s cluster and is installed on the K8S master node, and Kubeadm is the K8S configuration tool.

[0060] In some embodiments, other deployments may be made, such as the Container Network Interface (CNI), Zookeeper, MySQL, infrastructure services programs, and other underlying services deployed based on K8S, without being specifically limited herein.

[0061] 4 is a schematic diagram of the node configuration state after the meta cluster according to the embodiment of the present disclosure is bootstrapped, in the cluster system, all the bootstrap nodes are cluster master nodes (K8S-master) to ensure high availability of the cluster, each cluster master node is a remote management node (master) of the saltstack remote execution engine, and is used to manage all the nodes of the cluster, each cluster master node itself is a remote execution node (minion) of the saltstack remote execution engine, and can be remotely managed by the remote management node. Subsequent added nodes expand the cluster based on the character (master or worker), if it 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.

[0062] S102, controlling the designated work cluster to realize the allocation or removal of a corresponding cluster in the cluster system according to the instruction information of the adding / removing task.

[0063] Specifically, the instruction information of the adding / removing task includes cluster adding instruction information, and the cluster adding instruction information is used to instruct adding a first work cluster. Exemplarily, the cluster adding instruction information can be generated by a master node of a meta cluster, and the process of adding a first work cluster is a process of disposing each operating component on a bare metal.

[0064] In this embodiment, the process of adding a new first work cluster is similar to the bootstrap process of the meta cluster, and the configuration of the work cluster can be completed through steps such as pre_install (pre-configuration, binary transfer), saltstack installation, and cluster installation.

[0065] Therefore, when controlling the designated work cluster to realize the placement or removal of the corresponding cluster in the cluster system according to the instruction information of the adding / removing task, the following (a) to (c) can be included: (a) implementing a pre-configuration operation according to the cluster addition instruction information to realize password-free interworking between the first work cluster and the meta cluster; (b) building a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; (c) performing a bootstrap placement of the first work cluster itself;

[0066] Specifically, a binary installation package can be obtained from the meta cluster, that is, the installation package can be transferred to the target node of the first work cluster through the meta cluster, and of course, the installation package can be downloaded again, and is not specifically limited. The main function of pre-deployment is to enable password-free interworking between the meta cluster and the first work cluster node to be installed in order to facilitate the automated deployment of ansible, and then build a complete Saltstack remote execution engine based on the target node for subsequent remote operation and maintenance.

[0067] Optionally, after deploying the first work cluster, the domain name can further be registered in the meta cluster, so that when performing subsequent inter-cluster domain name resolution, the meta cluster can accurately route and resolve the domain name to the corresponding work cluster.

[0068] In a possible embodiment, the instruction information of the add / delete task includes cluster removal instruction information, and the cluster removal instruction information is used to instruct erasing a second work cluster. Here, the second work cluster may be any designated work cluster in a cluster system. Therefore, when controlling the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system based on the instruction information of the add / delete task, the following (1) to (3) can be specifically included: (1) cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster removal instruction information; (2) in response to completing cleaning of all the components, generating cleaning result feedback information via the second work cluster, and sending the cleaning result feedback information to the meta cluster; (3) Controlling the meta cluster to erase the meta information of the second work cluster from the meta cluster based on the cleaning result feedback information.

[0069] As can be seen, the opposite of adding a work cluster, with pre-arranged password-free interworking, the erasure of a work cluster is also initiated from the meta cluster, cleaning all components in the second work cluster by remotely executing a cleaning program (SSH), and feeding the result back to the meta cluster to instruct subsequent cleaning of meta information.

[0070] In the embodiment of the present disclosure, a cleaning program is remotely executed to clean all components in the second work cluster, thereby improving component clearing efficiency, and the meta cluster further erases meta information of the second work cluster from the meta cluster according to the cleaning result feedback information fed back by the second work cluster, thus updating the management information in the meta cluster in real time, which is advantageous to improving the accuracy of system management.

[0071] As can be understood, when a new work cluster is added, a domain name is registered in the meta cluster, and therefore, when a work cluster is deleted, not only does the meta information of the second work cluster need to be deleted from the meta cluster, but the domain name of the second work cluster also needs to be logged off to the meta cluster.

[0072] In a possible embodiment, referring to FIG. 5, for each cluster, the plurality of nodes can be divided into at least one node pool based on the type of business tasks performed by each node in the cluster, where each node pool includes at least one node.

[0073] Specifically, for each work cluster, different node logics in the work cluster can be divided into different node pools, for example, a node identifier corresponding to the node can be set when a node is newly added, and thus each node with the same node identifier is divided into the same node pool. In addition, a meta cluster itself is also a work cluster, and therefore the nodes in the cluster may be divided into different node pools (see FIG. 4).

[0074] In this embodiment, the nodes in the cluster are divided into different node pools according to different business logic types, so that the mixed placement and separation of different business containers can be met, and different services can share the same cluster management control node without competing for resources. In addition, for each node pool, node pool information may be further stored in the meta database of the meta cluster. Here, the node pool information includes the cluster to which the node pool belongs, the number of nodes included in the node pool, the business type related to the node pool, the available area, the creation time, etc., and the business type can specifically include, but is not limited to, a storage service, a database service, and middleware, etc.

[0075] As can be understood, in order to further improve the applicability of the cluster system, in addition to being able to add and delete designated work clusters, it is also possible to realize node expansion and reduction by adding and deleting new work nodes in each work cluster. Therefore, in some embodiments, the method further includes the following steps (I) to (II): (I) initiating, via the meta cluster, a node addition task to instruct a first target work cluster to add a first work node in the cluster system; (II) Based on the instruction information of the node addition task, the target work cluster is controlled to perform pre-inspection, pre-deployment, automated operation and maintenance, and remote execution engine expansion, and cluster expansion, thereby realizing the deployment of the first work node in the first target work cluster.

[0076] The first target work cluster may be any work cluster deployed in the cluster system. Specifically, referring to Figure 6, an infrastructure service (such as a management and control service in the meta cluster) in the meta cluster initiates a node addition task, performs an operation of newly adding a corresponding node pool, and sends a salt-api command to the remote management node salt-master of the first target work cluster, and then completes the node addition in the process of pre-inspection, pre-deployment, saltstack extension, K8S extension, etc. of the first target work cluster.

[0077] The pre-inspection includes checking whether it is installed on the machine, whether the kernel version is correct, the operating system configuration, etc., while the pre-deployment includes adding new node download installation packages, realizing the elimination of the need for ansible passwords, preparing a python virtual environment, etc.

[0078] Optionally, the method may include the following steps (m) to (n): (m) initiating, via the meta cluster, a node removal task to instruct a second target work cluster to remove a second work node in the cluster system; (n) Based on the instruction information of the node removal task, control the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction and the reduction of the second work node.

[0079] The second target work cluster may be any work cluster deployed in the cluster system. Specifically, referring to Fig. 7, similar to adding a node, a node removal task can be initiated by the infrastructure service in the meta cluster, a corresponding node pool deletion operation can be performed, and a salt-api command can be sent to the remote management node salt-master of the second target work cluster by the pre-deployed saltstack architecture, and then a reduction operation can be performed in the second target work cluster, the reduction operation includes steps such as pre-inspection, removal of service module (if there is a service module), reduction of saltstack work nodes and cluster nodes, etc.

[0080] In this way, nodes in each work cluster can be eliminated via the meta cluster, and when the workload decreases, the nodes in the cluster system can be correspondingly reduced, which is advantageous in improving resource utilization.

[0081] It should be understood that, since the meta cluster is configured with the domain name resolution server during bootstrap, when a new work cluster is added, each work cluster can realize domain name registration by sending its own domain name to the meta cluster; therefore, in the architecture of the cluster system, when domain name resolution cannot be realized within any work cluster, a domain name resolution request is generated and the domain name resolution request is sent to the meta cluster, thereby realizing domain name resolution by the meta cluster. Therefore, referring to FIG. 8, in this embodiment, the method further includes the following S801-S803.

[0082] S801, receiving a domain name resolution request sent by any one of the work clusters via the meta cluster.

[0083] S802, searching for an analysis work cluster that matches the domain name resolution request according to the domain name resolution server where the meta cluster is located, and controlling to transfer the domain name resolution request to the analysis work cluster.

[0084] S803, controlling the analysis work cluster to analyze the domain name resolution request, generate a corresponding domain name resolution result, and send the domain name resolution result to any one of the work clusters via the meta cluster.

[0085] Specifically, referring to FIG. 9, when work cluster a analyzes a current domain name resolution request, it can send the domain name resolution request to the DNS of the meta cluster by the DNS arranged by work cluster a, that is, it can receive the domain name resolution request sent by any work cluster through the meta cluster, and then the meta cluster can search for an analysis work cluster b that matches the domain name resolution request based on the domain name resolution server, and forward the domain name resolution request to the analysis work cluster b, and then the analysis work cluster b can generate a corresponding domain name analysis result based on the domain name resolution request, and send the domain name analysis result to the meta cluster, and finally forward the domain name analysis result to the work cluster a through the meta cluster to realize the analysis of the domain name.

[0086] In this way, the deployment architecture of region DNS and region ETCD in the meta cluster can realize domain name resolution for all K8S clusters across the entire network, overcoming the problem that only domain names within the cluster can be resolved natively.

[0087] As can be understood by those skilled in the art, in the above method of the specific embodiment, the described order of each step does not mean a strict execution order, and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined by its function and possible inherent logic.

[0088] Based on the same technical idea, the embodiments of the present disclosure further provide a cluster management device corresponding to the cluster management method, and since the problem-solving principle of the device of the embodiments of the present disclosure is similar to the above-mentioned cluster management method of the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the description of the overlapping parts will be omitted.

[0089] Referring to FIG. 10, there is shown a schematic diagram of a cluster management device 1010 according to an embodiment of the present disclosure, the device including: a task initiation module 1011 for instructing to add a designated work cluster in a cluster system or instructing to delete a designated work cluster in a cluster system via a meta cluster, the task initiation module 1011 being for initiating a work cluster addition / deletion task, the cluster system including at least one cluster, the at least one cluster including one of the meta clusters and at least one work cluster, the meta cluster being responsible for operation, maintenance and management control of the cluster system, the operation, maintenance and management control including a work cluster addition / deletion process, and the work cluster being responsible for a business container to execute a business task; and a cluster addition / deletion module 1012 for controlling the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system based on the instruction information of the addition / deletion task.

[0090] In a possible embodiment, the cluster addition / deletion module 1012 further comprises: initializing a bootstrap environment for deploying the metacluster; disposing a database for storing domain names between clusters, disposing a domain name analysis server for providing domain name analysis services between clusters, and disposing an automated operation and maintenance tool and a remote execution engine; and performing a bootstrap placement of the metacluster itself.

[0091] In one possible embodiment, the adding / deleting task instruction information includes cluster adding instruction information, and the cluster adding instruction information is used to instruct to newly add a first work cluster. The cluster adding / deleting module 1012 specifically includes: According to the cluster addition instruction information, performing a pre-configuration operation to realize password-free interworking between the first work cluster and the meta cluster; Building a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; and performing a bootstrap placement of the first work cluster itself.

[0092] In one possible embodiment, the instruction information of the adding and deleting task includes cluster deletion instruction information, and the cluster deletion instruction information is used to instruct to erase the second work cluster. The cluster adding and deleting module 1012 specifically includes: Cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster removal instruction information; generating cleaning result feedback information via the second work cluster in response to the cleaning of all the components being completed, and sending the cleaning result feedback information to the meta cluster; The meta cluster is used for controlling, based on the cleaning result feedback information, to erase the meta information of the second work cluster from the meta cluster.

[0093] In a possible embodiment, each cluster includes a plurality of nodes, and referring to FIG. 11, the device comprises: Further comprising: for each cluster, a node processing module 1013 for dividing the plurality of nodes into at least one node pool based on the type of business tasks performed by each node in the cluster, each node pool including at least one node.

[0094] In a possible embodiment, the task initiation module 1011: Further, the first target work cluster is further used for initiating, via the meta cluster, a node addition task to instruct the first target work cluster to add a first work node in the cluster system; The node processing module 1013 includes: It is further used to realize the configuration of the first work node in the first target work cluster by controlling the target work cluster to perform pre-inspection, pre-configuration, automated operation and maintenance, and remote execution engine expansion and cluster expansion based on the instruction information of the node addition task.

[0095] In a possible embodiment, the task initiation module 1011: Further, the second target work node is further used for initiating a node removal task to instruct a second target work node to remove a second work node in the cluster system via the meta cluster; The node processing module 1013 includes: The node removal task is further used to control the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction, and the second work node reduction, based on the instruction information of the node removal task.

[0096] In a possible embodiment, the device further comprises a domain name processing module 1014, the domain name processing module 1014 being: receiving a domain name resolution request sent by any of the work clusters via the meta cluster; Searching for an analysis work cluster that matches the domain name resolution request based on the domain name resolution server in which the meta cluster is located, and controlling to transfer the domain name resolution request to the analysis work cluster; and controlling the analysis work cluster to analyze the domain name analysis request, generate a corresponding domain name analysis result, and transmit the domain name analysis result to any one of the work clusters via the meta cluster.

[0097] For the description of the processing process of each module in the apparatus and the interaction process between each module, please refer to the relevant description of the above method embodiment, and detailed description will be omitted here.

[0098] Based on the same technical idea, an embodiment of the present disclosure further provides an electronic device. Referring to Fig. 12, there is shown a structural schematic diagram of an electronic device 1200 according to an embodiment of the present disclosure, which includes a processor 1210, a memory 1220, and a bus 1230. Here, the memory 1220 is used to store execution instructions, and includes a memory 1221 and an external memory 1222, where the memory 1221 is also called an internal memory, and is used to temporarily store data calculated by the processor 1210 and data to be exchanged with the external memory 1222 such as a hard disk, and the processor 1210 exchanges data with the external memory 1222 through the memory 1221.

[0099] In the embodiment of the present application, the memory 1220 is specifically used for storing application program code for implementing the solution of the present application, and the execution is controlled by the processor 1210. That is, when the electronic device 1200 operates, the processor 1210 and the memory 1220 communicate with each other via the bus 1230, so that the processor 1210 executes the application program code stored in the memory 1220, and further executes the method according to any of the above embodiments.

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

[0101] The processor 1210 may be an integrated circuit chip and has signal processing capabilities. The processor may be a general-purpose processor, including a central processor (CPU, Central Processing Unit), a network processor (NP, Network Processor), etc., and may be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. Each method, step, and logic block diagram disclosed in the embodiments of the present invention can be realized or executed. The general-purpose processor may be a microprocessor or any general processor, etc.

[0102] As can be understood, the structures illustrated in the embodiments of the present application do not constitute specific limitations of the electronic device 1200. In some other embodiments of the present application, the electronic device 1200 may include more or fewer components than those shown, may combine some components, may divide some components, or may include different component arrangements. The components shown in the figures may be realized by hardware, software, or a combination of software and hardware.

[0103] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, which performs the steps of the cluster management method of the above method embodiment when run by a processor, where the storage medium may be a volatile or non-volatile computer-readable storage medium.

[0104] An embodiment of the present disclosure further provides a computer program product, into which program code is loaded, and instructions contained in the program code can be used to perform steps of the cluster management method of the above method embodiment, for specific details, reference can be made to the above method embodiment, and detailed description will be omitted here.

[0105] The computer program product may be specifically implemented in the form of hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied as a computer storage medium, and in another alternative embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK).

[0106] For the sake of clarity and simplicity, the specific work processes of the above-described system and device may refer to the corresponding processes of the above-described method embodiments, and detailed descriptions will be omitted here. In some embodiments of the present disclosure, it should be understood that the disclosed system, device, and method can be realized in other ways. The above-described device embodiments are merely illustrative, for example, the division of the units is merely a division of logic functions, and may have other division methods when actually realized, and further, for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. On the other hand, the couplings or direct couplings or communication connections between the displayed or mentioned mutual couplings may be indirect couplings or communication connections through some communication interfaces, devices or units, and may be electrical, mechanical, or other forms.

[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed among multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of the present embodiment.

[0108] Furthermore, each functional unit in each embodiment of the present disclosure may be integrated into a single processing unit, each unit may exist physically alone, or two or more units may be integrated into a single unit.

[0109] The functions can be realized in the form of a software functional unit and stored in a non-volatile computer-readable storage medium executable by a processor when sold or used as an independent product. Based on this knowledge, the technical solution of the present disclosure can be essentially or a part that contributes to the prior art or a part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present disclosure. The above storage medium includes various media capable of storing program code, such as U disks, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical disks.

[0110] Finally, it should be noted that the above examples are merely specific embodiments of the present disclosure, and are merely for illustrating the technical solutions of the present disclosure, but are not intended to limit it, and the scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above examples, those skilled in the art may still modify or easily come up with changes to the technical solutions described in the above examples, or make equivalent substitutions for some of the technical features, within the technical scope disclosed in the present disclosure, and these modifications, changes or substitutions do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the examples of the present disclosure, and all of them should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be consistent with the scope of protection of the claims.

Claims

1. 1. A cluster management method, comprising: a step of initiating a work cluster addition / deletion task for instructing to add a designated work cluster in a cluster system or to instruct to delete a designated work cluster in a cluster system via a meta cluster, the cluster system including at least one cluster, the at least one cluster including one of the meta clusters and at least one work cluster, the meta cluster is responsible for operation / maintenance and management control of the cluster system, the operation / maintenance and management control includes a work cluster addition / deletion process, and the work cluster is responsible for a business container to execute a business task; and controlling the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system based on the instruction information of the adding / removing task. Cluster management methods.

2. initializing a bootstrap environment for deploying the metacluster; disposing a database for storing domain names between clusters, disposing a domain name resolution server for providing domain name resolution services between clusters, and disposing an automated operation and maintenance tool and a remote execution engine; and performing a bootstrap placement of the metacluster itself. The cluster management method according to claim 1 .

3. The instruction information of the adding / removing task includes cluster adding instruction information, and the cluster adding instruction information is used to instruct a new addition of a first work cluster. The step of controlling a designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system according to the instruction information of the adding / removing task includes: performing a pre-configuration operation according to the cluster addition instruction information to realize password-free interworking between the first work cluster and the meta cluster; building a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; and performing a bootstrap placement of the first work cluster itself. The cluster management method according to claim 1 .

4. The instruction information of the adding / deleting task includes cluster removal instruction information, and the cluster removal instruction information is used to instruct erasing a second work cluster. The step of controlling the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system according to the instruction information of the adding / deleting task includes: cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster removal instruction information; generating cleaning result feedback information via the second work cluster in response to the cleaning of all the components being completed, and transmitting the cleaning result feedback information to the meta cluster; and controlling the meta cluster to erase the meta information of the second work cluster from the meta cluster based on the cleaning result feedback information. The cluster management method according to claim 1 .

5. Each cluster includes a plurality of nodes, and the cluster management method includes: for each cluster, dividing the plurality of nodes into at least one node pool based on a type of business task performed by each node in the cluster, each node pool including at least one node. The cluster management method according to claim 1 .

6. Initiating a node addition task to instruct a first target work cluster to add a first work node in the cluster system via the meta cluster; According to the instruction information of the node addition task, the first target work cluster is controlled to perform pre-inspection, pre-configuration, automatic operation and maintenance, and remote execution engine expansion and cluster expansion, thereby realizing the configuration of the first work node in the first target work cluster. The cluster management method according to claim 1 .

7. Initiating a node removal task via the meta cluster to instruct a second target work cluster to remove a second work node in the cluster system; and controlling the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction and the second work node reduction according to the instruction information of the node removal task. The cluster management method according to claim 1 .

8. receiving a domain name resolution request sent by any of the work clusters via the meta cluster; Searching for an analysis work cluster that matches the domain name resolution request based on the domain name resolution server where the meta cluster is located, and controlling the domain name resolution request to be transferred to the analysis work cluster; and controlling the analysis work cluster to analyze the domain name resolution request, generate a corresponding domain name resolution result, and transmit the domain name resolution result to any one of the work clusters via the meta cluster. The cluster management method according to claim 2 .

9. a task initiation module for instructing to add a designated work cluster in a cluster system or instructing to delete a designated work cluster in a cluster system via a meta cluster, the cluster system including at least one cluster, the at least one cluster including one of the meta clusters and at least one work cluster, the meta cluster is responsible for operation, maintenance, and management control of the cluster system, the operation, maintenance, and management control including a process of adding and deleting a work cluster, and the work cluster is responsible for a business container to execute a business task; A cluster addition / deletion module controls the designated work cluster to realize the placement or removal of a corresponding cluster in the cluster system according to the instruction information of the addition / deletion task. Cluster management device.

10. An electronic device comprising a processor, a memory, and a bus, The memory stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor and the memory communicate with each other via a bus, and when the machine-readable instructions are executed by the processor, the cluster management method according to any one of claims 1 to 8 is executed. electronic equipment.

11. A computer-readable storage medium having a computer program stored therein, the computer program executing the cluster management method according to any one of claims 1 to 8 when run by a processor.

Citation Information

Patent Citations

  • SYSTEM AND METHOD FOR SUPPORTING ALGORITHM POLICY LANGUAGES IN A CLOUD I

    JP2022544927A

  • Container cluster management method and apparatus

    WO2022140945A1

  • Regional capability aware proxy testing

    WO2023154671A1