Cluster management method, apparatus, electronic equipment, and storage medium
The meta-cluster system addresses the limitations of single Kubernetes clusters by dynamically adding and removing work clusters and nodes, enhancing management efficiency and resource utilization for large enterprises.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2026-04-03
AI Technical Summary
The management efficiency and load capacity of a single Kubernetes cluster are limited, restricting the number of worker nodes that can be managed, which affects its applicability, especially for large enterprises with high demand capacity.
A cluster management method that utilizes a meta-cluster to initiate work cluster addition and deletion tasks, enabling the meta-cluster to manage and control multiple Kubernetes clusters, including the deployment and removal of work clusters and nodes, with features like passwordless interworking, remote execution engines, and domain name resolution across clusters.
This approach enhances the management efficiency and applicability of the cluster system by allowing dynamic scaling of work clusters and nodes, improving resource utilization and management accuracy through real-time updates and efficient component cleaning.
Smart Images

Figure 0007840370000001 
Figure 0007840370000002 
Figure 0007840370000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computers, and specifically, to a cluster management method, apparatus, electronic device, and storage medium.
Background Art
[0002] Kubernetes (abbreviated as K8S) is a portable and extensible container orchestration platform used to manage containerized workloads and services. By containerizing and improving operations and deploying them on Kubernetes, functions such as rapid deployment of business applications and self-healing of failures can be realized. At the same time, through the orchestration and scheduling functions of Kubernetes, flexible expansion and contraction of business services can be achieved to cope with business pressures under different loads.
[0003] Generally, one Kubernetes cluster is divided into a management control node (also called a master node) and worker nodes. The management control node is used to manage the metadata of the entire cluster, container scheduling, orchestration, etc. However, since the management control efficiency and load capacity of a single Kubernetes cluster are limited, the number of worker nodes managed within a single cluster is restricted, which further affects the usage experience of the Kubernetes cluster.
Summary of the Invention
Problems to be Solved by the Invention
[0004] Embodiments of the present disclosure provide at least a cluster management method, apparatus, electronic device, and storage medium, which can initiate cluster addition and deletion tasks via a meta-cluster according to actual needs, and can further amplify and scale down the cluster system, which is advantageous for improving the applicability of the cluster system.
Means for Solving the Problems
[0005] The embodiments of this disclosure provide a cluster management method. Steps include: initiating a work cluster add / delete task to instruct a cluster system to add a specified work cluster via a metacluster, or to instruct a cluster system to delete a specified work cluster, wherein the cluster system includes at least one cluster, at least one cluster includes one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes the work cluster add / delete process, and the work cluster is responsible for business containers and executes business tasks; The process includes the step of controlling a specified work cluster to achieve the placement or removal of a corresponding cluster in a cluster system, based on instruction information for an addition or deletion task.
[0006] In embodiments of this disclosure, when a large number of nodes are required, the corresponding number of work clusters can be increased by initiating a corresponding cluster addition task via the metacluster according to the actual needs, and when it is necessary to reduce the cluster size, the corresponding number of work clusters can be reduced by initiating a cluster reduction task via the metacluster, which is advantageous in improving the management control efficiency of the cluster system and the applicability of the cluster system.
[0007] In a possible embodiment, the method is Steps to initialize the bootstrap environment for deploying the metacluster, The steps include deploying a database for storing domain names across clusters, deploying a domain name parsing server for providing domain name parsing services across clusters, and deploying automated operation and maintenance tools and a remote execution engine. This further includes the step of running the metacluster itself.
[0008] In the embodiments of this disclosure, by deploying a database for storing domain names between clusters, a domain name analysis server for providing domain name analysis services between clusters, and automated operation and maintenance tools and a remote execution engine, inter-cluster management of other clusters and inter-cluster domain name analysis can be realized by the metacluster, which is advantageous in improving the efficiency and performance of operation, maintenance, and management control of the metacluster.
[0009] In a possible embodiment, the instruction information for an add / delete task includes cluster add instruction information, which is used to instruct the addition of a new first work cluster, and the step of controlling the specified work cluster to achieve the placement or removal of the corresponding cluster in the cluster system based on the instruction information for an add / delete task is: The steps include: achieving passwordless interworking between the first work cluster and the meta cluster by performing a pre-placement operation based on cluster addition instruction information; The first work cluster serves as the basis for building a remote execution engine for subsequent remote operation and maintenance, This includes the step of performing a bootstrap deployment of the first work cluster itself.
[0010] In the embodiments of this disclosure, passwordless interworking between the first work cluster and the meta cluster can be achieved through pre-placement operations, which is advantageous for subsequent automated placement. Furthermore, by constructing a remote execution engine, the meta cluster can easily manage and control the first work cluster.
[0011] In a possible embodiment, the instruction information for an add / delete task includes cluster deletion instruction information, which is used to instruct the deletion of a second work cluster, and the step of controlling the specified work cluster to achieve the placement or removal of the corresponding cluster in the cluster system based on the instruction information for an add / delete task is: Based on the cluster deletion instruction information, the process involves cleaning all components of the second work cluster by remotely executing a cleaning program, and The steps include: generating cleaning result feedback information via the second work cluster in response to the completion of cleaning all components, and sending the cleaning result feedback information to the meta cluster; The process includes the step of controlling the metacluster to delete the metadata of the second work cluster from the metacluster based on cleaning result feedback information.
[0012] In the embodiments of this disclosure, the efficiency of component clearing can be improved by cleaning all components in the second work cluster by remotely executing a cleaning program. The meta cluster further deletes the metadata of the second work cluster from the meta cluster based on the cleaning result feedback information fed back by the second work cluster, thus enabling real-time updates of management information within the meta cluster, which is advantageous in improving the accuracy of system management.
[0013] In a possible embodiment, each cluster includes multiple nodes, and the method is For each cluster, the step of dividing multiple nodes into at least one node pool based on the type of business task performed by each node in the cluster, further comprising the step of each node pool containing at least one node.
[0014] In the embodiments of this disclosure, by dividing multiple nodes into at least one node pool based on the type of business task performed by each node in the cluster, it is easier to share the cluster management control node between different business operations and to achieve effective resource isolation and allocation.
[0015] In a possible embodiment, the method is The steps include: initiating a node addition task via the metacluster to instruct the first target work cluster to add a first work node to the cluster system; The further step includes realizing the placement of a first work node in a first target work cluster by controlling the target work cluster to perform pre-inspection, pre-positioning, automated operation and maintenance, and remote execution engine expansion and cluster expansion based on instruction information for node addition tasks.
[0016] In the embodiments of this disclosure, the metacluster enables amplification of nodes within each work cluster, which is advantageous in further improving the applicability of the cluster system.
[0017] In a possible embodiment, the method is The steps include: initiating a node deletion task via the metacluster to instruct the second target work cluster to delete the second work node in the cluster system; The further step includes controlling the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction and second work node reduction based on the instruction information for the node deletion task.
[0018] In the embodiments of this disclosure, the metacluster can eliminate nodes within the work cluster, and furthermore, when the workload decreases, the number of nodes in the cluster system can be reduced accordingly, which is advantageous in improving resource utilization.
[0019] In a possible embodiment, the method includes receiving a domain name resolution request sent by any work cluster via a 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 to transfer the domain name resolution request to the analysis work cluster; and 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 work cluster via the meta-cluster.
[0020] In an embodiment of the present disclosure, when domain name resolution cannot be realized inside any work cluster, a domain name resolution request can be generated and sent to a corresponding analysis work cluster via a meta-cluster. After analyzing the domain name resolution request, the analysis work cluster generates a corresponding domain name resolution result and sends the domain name resolution result to any work cluster via the meta-cluster. In this way, domain name resolution between clusters is realized, providing the possibility to realize subsequent access between clusters.
[0021] Embodiments of the present disclosure provide a cluster management device, a task start module for starting an add / delete task of a work cluster to instruct to add a specified work cluster in a cluster system via a meta-cluster or to instruct to delete a specified work cluster in the cluster system. The cluster system includes at least one cluster, at least one cluster includes one meta-cluster and at least one work cluster, the meta-cluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes the add / delete process of the work cluster, and the work cluster is responsible for carrying a service container and executing a service task. A cluster addition / removal module, which controls the placement or removal of a corresponding cluster in a cluster system based on the instruction information of an additional deletion task.
[0022] In a possible embodiment, the cluster addition / removal module is further used to initialize a bootstrap environment for placing a meta-cluster, place a database for storing domain names between clusters, place a domain name resolution server for providing a domain name resolution service between clusters, and place an automated operation and maintenance tool and a remote execution engine. and execute the bootstrap placement of the meta-cluster itself.
[0023] In a possible embodiment, the instruction information of the additional deletion task includes cluster addition instruction information, and the cluster addition instruction information is used to instruct the newly added first work cluster. Specifically, the cluster addition / removal module realizes password-free interworking between the first work cluster and the meta-cluster by performing a pre-placement operation based on the cluster addition instruction information, constructs a remote execution engine for subsequent remote operation and maintenance based on the first work cluster, and executes the bootstrap placement of the first work cluster itself.
[0024] In a possible embodiment, the instruction information of the additional deletion task includes cluster deletion instruction information, and the cluster deletion instruction information is used to instruct the deletion of the second work cluster. Specifically, the cluster addition / removal module cleans all components of the second work cluster by remotely executing a cleaning program based on the cluster deletion instruction information. In response to the completion of cleaning all components, cleaning result feedback information is generated via the second work cluster, and the cleaning result feedback information is sent to the meta cluster. This is used to control the metacluster to delete the metadata of the second work cluster from the metacluster based on cleaning result feedback information.
[0025] In possible embodiments, each cluster includes multiple nodes, and the device is A node processing module for dividing multiple nodes into at least one node pool based on the type of business task performed by each node in the cluster, for each cluster, further comprising a node processing module, each node pool containing at least one node.
[0026] In a possible embodiment, the task initiation module is: It is further used via the metacluster to initiate a node addition task to instruct the first target work cluster to add a first work node to the cluster system. The node processing module is, Based on the instruction information for the node addition task, this is further used to achieve the placement of the first work node in the first target work cluster by controlling the target work cluster to perform pre-inspection, pre-positioning, automated operation and maintenance, and expansion of the remote execution engine and cluster expansion.
[0027] In a possible embodiment, the task initiation module is: It is further used via the metacluster to initiate a node deletion task to instruct the second target work cluster to delete the second work node in the cluster system. The node processing module is, Based on the instruction information for the node deletion task, it is further used to control the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reductions, as well as the reduction of the second work node.
[0028] In a possible embodiment, the apparatus further comprises a domain name processing module, the domain name processing module, Receiving domain name parsing requests sent by any work cluster via the metacluster, The metacluster searches for an analysis work cluster that matches the domain name analysis request based on the domain name analysis server where it is located, and controls the forwarding of the domain name analysis request to the analysis work cluster. This is used to control the analysis work cluster to analyze a domain name analysis request, generate the corresponding domain name analysis result, and send the domain name analysis result to any work cluster via the meta cluster.
[0029] Embodiments of the present disclosure provide an electronic device comprising a processor, memory, and a bus, wherein machine-readable instructions executable by the processor are stored in the memory, and when the electronic device is operating, the processor and the memory communicate 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] Embodiments of this disclosure provide a computer-readable storage medium in which a computer program is stored and a cluster management method described in any of the above embodiments is performed when the computer program is run by a processor.
[0031] To make the above-mentioned objectives, features, and advantages of this disclosure clearer and easier to understand, preferred embodiments will be described below in detail with reference to the accompanying drawings. [Brief explanation of the drawing]
[0032] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the following drawings, which are necessary for use in the embodiments, are briefly described below. These drawings are incorporated into the specification and constitute part of this specification. These drawings illustrate embodiments that are applicable to this disclosure and, together with the specification, illustrate the technical solutions of this disclosure. It should be understood that the following drawings only illustrate a few embodiments of this disclosure and should not be considered as limitations on the scope. Those skilled in the art can, without creative work, derive other relevant drawings based on these drawings.
[0033] [Figure 1] Figure 1 shows a flowchart of a cluster management method according to some embodiments of this disclosure. [Figure 2] Figure 2 shows schematic diagrams of the architecture of a cluster system according to some embodiments of this disclosure. [Figure 3] Figure 3 shows a flowchart of the metacluster bootstrap method according to an embodiment of this disclosure. [Figure 4] Figure 4 shows a schematic diagram of the node configuration after bootstrapping of a metacluster according to an embodiment of the present disclosure. [Figure 5] Figure 5 shows a schematic diagram of a node pool in a cluster according to some embodiments of the present disclosure. [Figure 6] Figure 6 shows a schematic diagram of the node addition process according to some embodiments of this disclosure. [Figure 7] Figure 7 shows a schematic diagram of the node deletion process according to some embodiments of this disclosure. [Figure 8] Figure 8 shows a flowchart of a domain name processing method according to some embodiments of this disclosure. [Figure 9] Figure 9 shows a schematic diagram of the domain name analysis process according to some embodiments of this disclosure. [Figure 10] Figure 10 shows a schematic diagram of the structure of a cluster management device according to some embodiments of this disclosure. [Figure 11] Figure 11 shows a schematic diagram of the structure of another cluster management device according to some embodiments of the present disclosure. [Figure 12] Figure 12 shows schematic diagrams of electronic devices according to some embodiments of the present disclosure. [Modes for carrying out the invention]
[0034] To clarify the purpose, technical solutions and advantages of the embodiments of this disclosure, the following descriptions, together with the drawings of the embodiments, clearly and completely explain the technical solutions of the embodiments of this disclosure. It is clear that the embodiments described are part of, but not all, of the embodiments of this disclosure. Typically, the components of the embodiments of this disclosure described and shown in the drawings can be installed and designed in a variety of different configurations. Therefore, the detailed descriptions of the embodiments of this disclosure provided in the drawings below are not intended to limit the scope of the claims of this disclosure, but merely represent specific embodiments of this disclosure. All other embodiments derived from the embodiments of this disclosure, without creative work by a person skilled in the art, are all within the scope of protection of this disclosure.
[0035] Furthermore, similar symbols and letters represent the same items in the following drawings; therefore, once an item is defined in one drawing, it is not necessary to further define and interpret it in subsequent drawings.
[0036] The terms "and / or" and similar terms used herein are merely for describing relationships and indicate that three relationships are possible. For example, A and / or B can indicate three situations: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the terms "at least one" and similar terms used herein indicate any combination of one or at least two of a group. For example, including at least one of A, B, and C means including one or more elements selected from the set consisting of A, B, and C.
[0037] To ensure understanding, before using any of the technical solutions disclosed in each embodiment of this disclosure, the user must be notified in an appropriate manner in accordance with applicable laws and regulations regarding the type, scope, and usage scenarios of personal information relating to this disclosure, and the user's permission must be obtained.
[0038] Research indicates that a Kubernetes cluster typically includes a management / control node and work nodes. The management / control node is used to manage cluster-wide metadata, container scheduling, and orchestration. Specifically, each node has 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 container application lifecycle, including adding / removing / modifying containers. The service agent is used to proxy cluster services, allowing client terminals to communicate with containers via the service domain name, thereby blocking the underlying container resource architecture (e.g., the number of containers, their location, etc.).
[0039] However, the management efficiency and load capacity of a single Kubernetes cluster are limited, restricting the number of managed work nodes within a single cluster (for example, typically not exceeding 5,000). This limits the use cases for Kubernetes and makes it unsuitable for large enterprises with high demand capacity.
[0040] Based on the above research, embodiments of the present disclosure provide a cluster management method that can initiate work cluster addition / deletion tasks via a metacluster, the work cluster addition / deletion task is used to instruct a cluster system to add a specified work cluster or to instruct a cluster system to delete a specified work cluster, the cluster system comprises at least one cluster, the at least one cluster comprises one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes work cluster addition / deletion processing, the work cluster is responsible for business containers and executes business tasks, and then, based on the instruction information of the addition / deletion task, controls the specified work cluster to realize the placement or removal of the corresponding cluster in the cluster system.
[0041] Thus, even when a large number of nodes are required, the number of work clusters can be increased by initiating a corresponding cluster addition task via the metacluster according to actual needs, and when it is necessary to reduce the cluster size, the corresponding number of work clusters can be reduced by initiating a cluster reduction task via the metacluster. This is advantageous in improving the management and control efficiency of the cluster system and the applicability of the cluster system.
[0042] To facilitate understanding of this embodiment, the implementing entity of the cluster management method according to the embodiment of this disclosure will first be described in detail. The implementing entity of the cluster management method according to the embodiment of this disclosure is an electronic device. In the embodiment of this disclosure, the electronic device is a server. Here, the server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or 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 other embodiments, the electronic device may be a terminal device, which includes mobile devices, computing devices, in-vehicle devices, wearable devices, etc. Furthermore, the cluster management method may be implemented by the processor calling computer-readable instructions stored in memory.
[0044] The cluster management method according to an embodiment of the present invention will be described in detail below with reference to the drawings. As shown in Figure 1, this is a flowchart of the cluster management method according to an embodiment of the present disclosure, and the cluster management method includes the following S101 to S102.
[0045] S101, via a metacluster, initiates a work cluster add / delete task to instruct the cluster system to add a specified work cluster or to instruct the cluster system to delete a specified work cluster, wherein the cluster system includes at least one cluster, the at least one cluster includes one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes the work cluster add / delete process, and the work cluster is responsible for business containers and executes business tasks.
[0046] Referring to Figure 2, Figure 2 is a schematic diagram of the architecture of a cluster system according to an embodiment of the present disclosure. As shown in Figure 2, the 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, this operation, maintenance, and management control includes, but is not limited to, adding or removing designated work clusters, increasing or decreasing the number of nodes within a work cluster, and installing business components. Each work cluster is used to carry out specific business containers and execute corresponding business tasks.
[0047] The clusters in the embodiments of this disclosure are Kubernetes clusters, also commonly known as K8S clusters, and each cluster includes at least one master node and at least one worker node that communicates with and connects to each master node.
[0048] What needs to be understood is that a metacluster can also handle business containers, and in some embodiments, when the number of required nodes is small, the cluster system 1000 may consist only of a metacluster, in which case the metacluster 100 is both a metacluster and a work cluster.
[0049] In the cluster system architecture shown in Figure 2, the meta-cluster 100 contains global information for the entire cluster system 1000. Therefore, the bootstrapping of the meta-cluster 100 itself is also very important, and the bootstrapping process of the meta-cluster 100 will be described in detail below.
[0050] Referring to Figure 3, we have a flowchart of a bootstrap method for a metacluster according to an embodiment of the present disclosure, which includes the following steps S301 to S303.
[0051] S301, Initialize the bootstrap environment for deploying the metacluster.
[0052] The process of initializing the bootstrap environment for deploying the aforementioned metacluster is the standard initialization of the bootstrap environment (InitEnv), which specifically includes downloading the installation package (binary), initializing the virtual standard operating environment, eliminating the need for passwords between nodes, and deploying the Ansible automated operation and maintenance tool. Considering the requirements for disaster resilience, the bootstrap environment generally consists of multiple physical nodes, and therefore, it is necessary to implement passwordless deployment between multiple nodes.
[0053] In the embodiments of this disclosure, passwordless login can be achieved using 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 passwordless login between nodes using the OpenSSH tool, while single sign-on refers to achieving passwordless login in the bootstrap environment using an authentication certificate applied for in advance at an authentication center.
[0054] S302 houses a database for storing domain names across clusters, a domain name parsing server for providing domain name parsing services across clusters, and automated operation and maintenance tools and a remote execution engine.
[0055] The database that stores inter-cluster domain names may be deployed in a Region Etcd configuration. Region Etcd is a distributed KV database used to store inter-cluster domain names and inter-cluster parsing domain names.
[0056] The domain name parsing server may be deployed in a Region DNS (Domain Name System) configuration, specifically using Region Etcd as the base memory to provide domain name parsing services across clusters in the entire network.
[0057] The automated operation and maintenance tools and remote execution engine can be deployed using SaltStack. SaltStack is a large-scale automated operation and maintenance tool and remote execution engine with a C / S architecture. Unlike Ansible, when its Server side (salt-master) receives an authentication public key from a remote host computer (salt-minion), it can perform remote operation and maintenance using the public key, eliminating the need to apply for machine-related permissions or SSO login permissions.
[0058] S303, the bootstrap deployment of the metacluster itself is performed.
[0059] Specifically, the bootstrap deployment of the meta-cluster itself includes the deployment of components such as kubelet, kubectl, and kubeadm. Here, Kubelet is the node agent in the K8S cluster, responsible for maintaining Pods on the nodes and ensuring the normal operation of containers, with one kubelet process running on each node, kubectl is the command-line tool for the K8S cluster, installed on the K8S master node, and Kubeadm is the K8S deployment tool.
[0060] In some embodiments, other deployments are possible, such as underlying basic services deployed on K8S, including, but not limited to, Container Network Interface (CNI), Zookeeper, MySQL®, and infrastructure service programs.
[0061] Referring to Figure 4, which is a schematic diagram of the node arrangement after bootstrapping of a metacluster according to an embodiment of this disclosure, in the cluster system all bootstrap nodes are cluster master nodes (K8S-master), ensuring high availability of the cluster, and each cluster master node is a remote management node (master) of the saltstack remote execution engine, used to manage all nodes of the cluster, and 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. Subsequently added nodes extend this cluster based on their character (master or worker), and if it is a cluster worker node, it is similarly a salt-minion, and if it is a cluster master node, it is both a salt-minion and a salt-master.
[0062] S102, Based on the instruction information for the addition / deletion task, control the designated work cluster to implement the placement or removal of the corresponding cluster in the cluster system.
[0063] Specifically, the instruction information for the addition / deletion task includes cluster addition instruction information, and this cluster addition instruction information is used to instruct the addition of a new first work cluster. For example, the master node of a metacluster can generate the cluster addition instruction information, and the process of adding a new first work cluster is the process of deploying each operational component to bare metal.
[0064] In this embodiment, the process of adding a new first work cluster is similar to the bootstrap process of a metacluster, and the work cluster can be deployed by steps such as pre-install (pre-configuration, binary transfer), saltstack installation, and cluster installation.
[0065] Therefore, when controlling the designated work cluster to implement the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the addition or deletion task, the following (a) to (c) may be included: (a) Based on the cluster addition instruction information, password-free interworking between the first work cluster and the meta cluster is achieved by performing a pre-placement operation, (b) A remote execution engine for subsequent remote operation and maintenance is constructed based on the first work cluster, (c) Perform a bootstrap deployment of the first work cluster itself.
[0066] Specifically, the binary installation package can be obtained from the metacluster, meaning the installation package can be transferred to the target node of the first work cluster via the metacluster. Of course, the installation package can also be downloaded again, and this is not specifically limited. The main function of pre-deployment is to enable passwordless interworking between the metacluster and the target node of the first work cluster in order to facilitate automated deployment of Ansible. Next, a complete Saltstack remote execution engine is built based on the target node and used for subsequent remote operation and maintenance.
[0067] Optionally, after deploying the first work cluster, it is possible to register its own domain name in the meta cluster. In this way, when performing domain name parsing between clusters in the subsequent process, the meta cluster can accurately route and parse the domain name to the corresponding work cluster.
[0068] In a possible embodiment, the instruction information for the add / delete task includes cluster deletion instruction information, which is used to instruct the deletion of a second work cluster. Here, the second work cluster may be any designated work cluster in the cluster system. Therefore, when controlling the designated work cluster to achieve the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the add / delete task, it may specifically include (1) to (3) below: (1) Based on the cluster deletion instruction information, all components of the second work cluster are cleaned by remotely executing a cleaning program. (2) In response to the completion of cleaning all of the above components, cleaning result feedback information is generated via the second work cluster and transmitted the cleaning result feedback information to the meta cluster. (3) The metacluster controls itself to delete the metadata of the second work cluster from the metacluster based on the cleaning result feedback information.
[0069] To make it easier to understand, the deletion of a work cluster is the reverse of adding a work cluster, and through pre-configured, passwordless interworking, it is also initiated from the metacluster. This involves remotely running a cleaning program (SSH) to clean all components in the second work cluster and then feeding the results back to the metacluster to instruct subsequent processes to clean the metadata.
[0070] In the embodiments of this disclosure, the efficiency of component clearing can be improved by cleaning all components in the second work cluster by remotely executing a cleaning program. Furthermore, the meta cluster can delete the metadata of the second work cluster from the meta cluster based on the cleaning result feedback information fed back by the second work cluster, thus updating the management information within the meta cluster in real time, which is advantageous in improving the accuracy of system management.
[0071] To make it clear, when adding a new work cluster, the domain name must be registered in the meta cluster, and therefore, when deleting a work cluster, in addition to deleting the metadata of the second work cluster from the meta cluster, the domain name of the second work cluster must also be logged off the meta cluster.
[0072] In a possible embodiment, referring to Figure 5, for each cluster, the plurality of nodes can be further divided into at least one node pool based on the type of business task performed by each node in the cluster, where each node pool includes at least one node.
[0073] Specifically, for each work cluster, different node logic within the work cluster can be divided into different node pools. For example, when adding a new node, a node identifier can be set for that node, and in this way, each node with the same node identifier is divided into the same node pool. Furthermore, the metacluster itself is also a work cluster, and therefore, the nodes within that cluster may be divided into different node pools (see Figure 4).
[0074] In this embodiment, each node in the cluster is divided into different node pools according to different business logic types, thereby satisfying the mixed placement and isolation of different business containers, and enabling different services to share the same cluster management control node without competing for resources. Furthermore, node pool information may be stored in the meta-database of the meta-cluster for each node pool. 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 associated with the node pool, the available region, the creation time, etc., and the business type can specifically include, but is not limited to, storage services, database services, and middleware.
[0075] To further improve the applicability of the cluster system, in addition to being able to add and delete specified work clusters, it is also possible to expand and decrease the number of nodes by adding or deleting work nodes in each work cluster. Therefore, in some embodiments, the method further includes (I) to (II) below, (I) A node addition task is initiated via the metacluster to instruct the first target work cluster to add a first work node in the cluster system, (II) Based on the instruction information for the node addition task, the target work cluster is controlled to perform pre-inspection, pre-placement, automated operation and maintenance, and expansion of the remote execution engine and cluster, thereby realizing the placement of the first work node in the first target work cluster.
[0076] The first target work cluster may be any work cluster located within the cluster system. Specifically, referring to Figure 6, an infrastructure service in the metacluster (e.g., a management and control service in the metacluster) can initiate a node addition task, perform an operation to add a new node pool, and send a salt-api command to the salt-master, the remote management node of the first target work cluster. Then, the node addition can be completed in processes such as pre-inspection, pre-placement, saltstack expansion, and K8S expansion of the first target work cluster.
[0077] Pre-checks include verifying whether the software is installed on the machine, whether the kernel version is correct, and the configuration of the operating system, while pre-deployment includes adding new node download and installation packages, enabling password-free Ansible, and preparing a Python virtual environment.
[0078] The method may optionally include the following (m) to (n): (m) via the metacluster, a node deletion task is initiated to instruct the second target work cluster to delete the second work node in the cluster system, (n) Based on the instruction information for the node deletion task, the second target cluster is controlled to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction and second work node reduction.
[0079] The second target work cluster may be any work cluster located within the cluster system. Specifically, referring to Figure 7, a node deletion task can be initiated by the infrastructure service in the metacluster, similar to node addition, by performing a corresponding node pool clearing operation and sending a salt-api command to the salt-master remote management node of the second target work cluster via a pre-configured saltstack architecture, and then a reduction operation can be performed in the second target work cluster, which includes steps such as pre-checking, removal of service modules (if any), and reduction of saltstack work nodes and cluster nodes.
[0080] In this way, nodes within each work cluster can be removed via the meta-cluster, and the number of nodes in the cluster system can be reduced accordingly when workload decreases, which is advantageous in improving resource utilization.
[0081] What needs to be understood is that the metacluster has a domain name parsing server deployed during bootstrapping, so when a new work cluster is added, each work cluster can register its domain name by sending it to the metacluster. Therefore, in the architecture of the cluster system, if domain name parsing cannot be performed within any of the work clusters, the metacluster can perform domain name parsing by generating a domain name parsing request and sending it to the metacluster. Accordingly, referring to Figure 8, in this embodiment, the method further includes the following S801 to S803.
[0082] S801 receives a domain name parsing request sent by any of the work clusters via the metacluster.
[0083] S802 controls the search for an analysis work cluster that matches the domain name analysis request based on the domain name analysis server on which the meta cluster is located, and forwards the domain name analysis request to the analysis work cluster.
[0084] S803, the analysis work cluster analyzes the domain name analysis request, generates a corresponding domain name analysis result, and controls the work cluster to transmit the domain name analysis result to any of the work clusters via the meta cluster.
[0085] Specifically, referring to Figure 9, when work cluster a parses the current domain name parsing request, the DNS deployed by work cluster a can send the domain name parsing request to the DNS of the meta cluster, that is, it can receive domain name parsing requests sent by any work cluster via the meta cluster. The meta cluster then searches for parsing work cluster b that matches the domain name parsing request based on the domain name parsing server and can forward the domain name parsing request to parsing work cluster b. Subsequently, parsing work cluster b generates a corresponding domain name parsing result based on the domain name parsing request and can send the domain name parsing result to the meta cluster. Finally, the domain name parsing result is forwarded to work cluster a via the meta cluster, and the domain name parsing is completed.
[0086] In this way, the deployment architecture of region DNS and region ETCD in the meta-cluster enables domain name parsing for all K8S clusters across the entire network, overcoming the problem that natively only domain names within a cluster can be parsed.
[0087] As those skilled in the art will understand, in the above-described method of a specific embodiment, the order in which each step is described does not imply a strict order of execution, nor does it constitute any limitation on the implementation process, and the specific order of execution of each step should be determined by its function and possible unique logic.
[0088] Based on a similar technical concept, embodiments of the present disclosure further provide cluster management devices corresponding to cluster management methods, and since the problem-solving principle of the devices of embodiments of the present disclosure is the same as that of the cluster management methods of embodiments of the present disclosure, implementation of the devices can refer to implementation of the methods, and explanations of overlapping parts are omitted.
[0089] Referring to Figure 10, which is a schematic diagram of a cluster management device 1010 according to an embodiment of the present disclosure, the device is A task initiation module 1011 for initiating a work cluster addition / deletion task to instruct a cluster system to add a specified work cluster via a metacluster, wherein the cluster system includes at least one cluster, the at least one cluster includes one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes work cluster addition / deletion processing, and the work cluster is responsible for business containers and executes business tasks, The system includes a cluster addition / deletion module 1012 for controlling the designated work cluster to implement the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the addition / deletion task.
[0090] In a possible embodiment, the cluster add / delete module 1012 further: Initializing the bootstrap environment for deploying the aforementioned metacluster, This involves deploying a database to store domain names across clusters, deploying a domain name parsing server to provide domain name parsing services across clusters, and deploying automated operation and maintenance tools and a remote execution engine. It is used to perform the bootstrap deployment of the metacluster itself.
[0091] In a possible embodiment, the instruction information for the add / delete task includes cluster add instruction information, which is used to instruct the addition of a new first work cluster, and the cluster add / delete module 1012 specifically, Based on the cluster addition instruction information, password-free interworking between the first work cluster and the meta cluster is achieved by performing a pre-placement operation, Based on the aforementioned first work cluster, a remote execution engine for subsequent remote operation and maintenance will be constructed, It is used to perform the bootstrap deployment of the first work cluster itself.
[0092] In a possible embodiment, the instruction information for the add / delete task includes cluster deletion instruction information, which is used to instruct the deletion of the second work cluster, and the cluster add / delete module 1012 specifically, Based on the cluster deletion instruction information, all components of the second work cluster are cleaned by remotely executing a cleaning program. In response to the completion of cleaning all of the above components, cleaning result feedback information is generated via the second work cluster and transmitted to the meta cluster. This is used to control the metacluster to delete the metadata of the second work cluster from the metacluster based on the cleaning result feedback information.
[0093] In a possible embodiment, each cluster includes multiple nodes, and referring to Figure 11, the device is A node processing module 1013 for each cluster, for dividing the plurality of nodes into at least one node pool based on the type of business task performed by each node in the cluster, wherein each node pool includes at least one node.
[0094] In a possible embodiment, the task initiation module 1011 is The metacluster is further used to initiate 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 is, Based on the instruction information for the node addition task, the system is further used to realize the placement of the first work node in the first target work cluster by controlling the target work cluster to perform pre-inspection, pre-positioning, automated operation and maintenance, and expansion of the remote execution engine and cluster expansion.
[0095] In a possible embodiment, the task initiation module 1011 is The metacluster is further used to initiate a node deletion task to instruct the second target work cluster to delete the second work node in the cluster system, The node processing module 1013 is, Based on the instruction information for the node deletion task, the second target cluster is further used to control the reduction of work nodes for pre-inspection, automated operation and maintenance, and remote execution engines, as well as the reduction of the second work node.
[0096] In a possible embodiment, the apparatus further comprises a domain name processing module 1014, the domain name processing module 1014 is Receiving a domain name parsing request sent by any work cluster via the aforementioned metacluster, The metacluster searches for an analysis work cluster that matches the domain name analysis request based on the domain name analysis server on which the metacluster is located, and controls the forwarding of the domain name analysis request to the analysis work cluster. This is used to control 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 of the work clusters via the metacluster.
[0097] For a description of the processing processes of each module in the device, and the interaction processes between each module, please refer to the relevant descriptions in the above-mentioned method embodiment; a detailed explanation is omitted here.
[0098] Based on a similar technical concept, embodiments of the present disclosure further provide electronic devices. Referring to Figure 12, a schematic diagram of the structure of an electronic device 1200 according to an embodiment of the present disclosure, comprising a processor 1210, a memory 1220, and a bus 1230. Here, the memory 1220 is used to store execution instructions and comprises a memory 1221 and an external memory 1222, where the memory 1221 is also called internal memory and is used to temporarily store calculation data in 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 via the memory 1221.
[0099] In the embodiments of the present invention, the memory 1220 is specifically used to store application program code that executes the solution of the present invention, and its execution is controlled by the processor 1210. That is, when the electronic device 1200 is operating, the processor 1210 and the memory 1220 communicate via the bus 1230, so that the processor 1210 executes the application program code stored in the memory 1220 and further executes the method described in any of the embodiments described above.
[0100] 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), or electrically erasable programmable read-only memory (EEPROM).
[0101] The processor 1210 may be an integrated circuit chip and has signal processing capabilities. The processor may be a general-purpose processor and may include a central processing unit (CPU), a network processor (NP), 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 implemented or executed. The general-purpose processor may be a microprocessor or any general-purpose processor, etc.
[0102] To ensure that it is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation of the electronic device 1200. In some other embodiments of this application, the electronic device 1200 may include more or fewer components than those shown, or some components may be combined, or some components may be divided, or different component configurations may be included. The illustrated components may be implemented by hardware, software, or a combination of software and hardware.
[0103] Embodiments of the present disclosure further provide a computer-readable storage medium in which a computer program is stored and the steps of the cluster management method of the above embodiment are performed when the computer program is run by a processor. The storage medium may be volatile or non-volatile computer-readable storage medium.
[0104] Embodiments of the present disclosure further provide a computer program product into which program code is loaded, and instructions contained in the program code can be used to perform the steps of the cluster management method of the above-described embodiment, specifically referencing the above-described embodiment, for which a detailed description is omitted here.
[0105] The above-described computer program product may be implemented in the form of hardware, software, or a combination thereof. In one selectable embodiment, the computer program product is specifically implemented as a computer storage medium, and in another selectable embodiment, the computer program product is specifically implemented as a software product, such as a software development kit (SDK).
[0106] For the sake of clarity and ease of explanation, and so that those skilled in the art can clearly understand, the specific working processes of the systems and apparatus described above can be referenced to the corresponding processes in the method embodiments described above, and detailed explanations are omitted here. It should be understood that in some embodiments of this disclosure, the disclosed systems, apparatus and methods can be implemented in other ways. The embodiments of the apparatus described above are merely illustrative; for example, the division of the units is merely a division of logic functions, and in actual implementation, there may be other division methods, and furthermore, for example, multiple units or components may be combined, or integrated into another system, or some features may be ignored or not performed. On the other hand, the coupling or direct coupling or communication connection between the indicated or mentioned entities may be indirect coupling or communication connection via some communication interface, apparatus or unit, and may be electrical, mechanical or otherwise.
[0107] The units described as separation members may or may not be physically separated, and the members indicated as units may or may not be physical units; that is, they may be located in one place or distributed among multiple network units. Depending on the actual needs, some or all of these units can be selected to achieve the objectives of the solution of this 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 independently, or two or more units may be integrated into a single unit.
[0109] The aforementioned functions can be implemented in the form of a software function unit and, when sold or used as an independent product, can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solutions of the present disclosure, in essence or in part with respect to the prior art, or parts thereof, can be embodied in the form of a software product, the computer software product of which is stored in a single storage medium and includes a number of instructions for causing a single computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present disclosure. The storage medium includes a variety of media capable of storing program code, such as U disks, mobile hard disks, read-only memory, random access memory, magnetic disks, or optical disks.
[0110] Finally, it should be noted that the above embodiments are merely specific embodiments of the Disclosure and are intended only to illustrate the technical solutions of the Disclosure, and do not limit them, and the scope of protection of the Disclosure is not limited thereto. Although the Disclosure has been described in detail with reference to the above embodiments, those skilled in the art will understand that within the scope of the art disclosed, it is still possible to easily conceive of modifications or changes to the technical solutions described in the above embodiments, or to make equivalent substitutions to some of their technical features, and that 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 the Disclosure, and that they should all be included within the scope of protection of the Disclosure. Accordingly, the scope of protection of the Disclosure should be the same as the scope of protection of the claims.
Claims
1. A cluster management method performed by electronic equipment, Steps to initiate a work cluster add / delete task to instruct a cluster system to add a specified work cluster via a metacluster, or to instruct a cluster system to delete a specified work cluster, wherein the cluster system includes at least one cluster, the at least one cluster includes one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes work cluster add / delete processing, and the work cluster is responsible for business containers and executes business tasks; The step includes controlling the designated work cluster to implement the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the addition or deletion task, Each cluster includes multiple nodes, The cluster management method is: For each cluster, the step of dividing the plurality of nodes into at least one node pool based on the type of business task performed by each node in the cluster, wherein each node pool includes at least one node, and different node pools correspond to different business types, is characterized by further comprising the dividing step. Cluster management methods.
2. The steps include initializing a bootstrap environment for deploying the aforementioned metacluster, The steps include deploying a database for storing domain names across clusters, deploying a domain name parsing server for providing domain name parsing services across clusters, and deploying automated operation and maintenance tools and a remote execution engine. The further step is to perform a bootstrap configuration of the metacluster itself, characterized in that The cluster management method according to claim 1.
3. The instruction information for the addition / deletion task includes cluster addition instruction information, the cluster addition instruction information is used to instruct the addition of a new 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 based on the instruction information for the addition / deletion task is as follows: The steps include: realizing password-free interworking between the first work cluster and the meta cluster by performing a pre-placement operation based on the cluster addition instruction information; The steps include: constructing a remote execution engine for subsequent remote operation and maintenance based on the first work cluster; The features include the step of performing a bootstrap deployment of the first work cluster itself, The cluster management method according to claim 1.
4. The instruction information for the addition / deletion task includes cluster deletion instruction information, the cluster deletion instruction information is used to instruct the deletion of the second work cluster, and the step of controlling the designated work cluster to achieve the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the addition / deletion task is as follows: The steps include: cleaning all components of the second work cluster by remotely executing a cleaning program based on the cluster deletion instruction information; In response to the completion of cleaning all of the above components, the steps include generating cleaning result feedback information via the second work cluster and transmitting the cleaning result feedback information to the meta cluster, The metacluster is characterized by including the step of controlling the metacluster to delete the metadata of the second work cluster from the metacluster based on the cleaning result feedback information, The cluster management method according to claim 1.
5. The steps include: initiating a node addition task via the metacluster to instruct the first target work cluster to add a first work node in the cluster system; The present invention further includes the step of realizing the placement of the first work node in the first target work cluster by controlling the first target work cluster to perform pre-inspection, pre-positioning, automated operation and maintenance, and remote execution engine expansion and cluster expansion based on the instruction information for the node addition task, The cluster management method according to claim 1.
6. The steps include: initiating a node deletion task via the metacluster to instruct the second target work cluster to delete the second work node in the cluster system; The further step is to control the second target cluster to perform pre-inspection, automated operation and maintenance, and remote execution engine work node reduction and second work node reduction based on the instruction information for the node deletion task, The cluster management method according to claim 1.
7. The steps include receiving a domain name parsing request sent by any work cluster via the aforementioned metacluster, The steps include: searching for an analysis work cluster that matches the domain name analysis request based on the domain name analysis server on which the metacluster is located, and controlling the forwarding of the domain name analysis request to the analysis work cluster; The further step of 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 of the work clusters via the metacluster is characterized by comprising the steps of: The cluster management method according to claim 2.
8. A cluster management device applicable to electronic equipment, A task initiation module for initiating a work cluster addition / deletion task to instruct a cluster system to add a specified work cluster via a metacluster, wherein the cluster system includes at least one cluster, the at least one cluster includes one metacluster and at least one work cluster, the metacluster is responsible for the operation, maintenance and management control of the cluster system, the operation, maintenance and management control includes work cluster addition / deletion processing, and the work cluster is responsible for business containers and executes business tasks; The cluster addition / deletion module controls the designated work cluster to implement the placement or removal of the corresponding cluster in the cluster system based on the instruction information for the addition / deletion task, Each cluster includes multiple nodes, The cluster addition / deletion module is further configured to divide the plurality of nodes into at least one node pool for each cluster, based on the type of business task performed by each node in the cluster, wherein each node pool contains at least one node, and different node pools correspond to different business types. Cluster management device.
9. An electronic device comprising a processor, memory, and a bus, The memory stores machine-readable instructions that can be executed by the processor, and when the electronic device is operating, the processor and the memory communicate via a bus, and the cluster management method described in claim 1 is executed when the machine-readable instructions are executed by the processor. electronic equipment.
10. A computer-readable storage medium, The cluster management method described in claim 1 is performed when a computer program is stored in the computer-readable storage medium and the computer program is operated by the processor. Computer-readable storage medium.
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