CN116521307A - Cluster management method, electronic device and storage medium - Google Patents

Cluster management method, electronic device and storage medium Download PDF

Info

Publication number
CN116521307A
CN116521307A CN202310325660.6A CN202310325660A CN116521307A CN 116521307 A CN116521307 A CN 116521307A CN 202310325660 A CN202310325660 A CN 202310325660A CN 116521307 A CN116521307 A CN 116521307A
Authority
CN
China
Prior art keywords
node
resource
resources
change information
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310325660.6A
Other languages
Chinese (zh)
Inventor
柯浩雄
叶贇
高伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310325660.6A priority Critical patent/CN116521307A/en
Publication of CN116521307A publication Critical patent/CN116521307A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a cluster management method, electronic equipment and a storage medium, wherein the cluster management method comprises the following steps: responding to the obtained change information of the node pool resources of the system level in the cluster, and updating the change information into the node pool reference resources of the item level corresponding to the node pool resources; monitoring the node pool reference resource to enable the container group in the items in the cluster to obtain change information; wherein the node pool reference resource is correspondingly created under the namespace of the item based on the node pool resource and the item level of the container group. By the method, the container group of the project can sense the change of the node pool resources in real time, and scheduling management of multi-architecture resources is facilitated.

Description

Cluster management method, electronic device and storage medium
Technical Field
The present invention relates to the field of cloud native and container cloud, and in particular, to a cluster management method, an electronic device, and a storage medium.
Background
Container technology plays an important role in cloud computing and container cloud domain as an emerging virtualization technology derived from the cloud primary domain.
The rise of container technology has led to a series of application orchestration management systems, typically kubernetes clusters, docker swarm clusters, and Mesosphere clusters, among others.
However, how to schedule and manage multi-architecture resources becomes a fast and urgent problem to be solved by the advanced cloud native scheme.
Disclosure of Invention
The invention provides a cluster management method, electronic equipment and a storage medium, which are used for solving the problem of scheduling management of multi-architecture resources.
In order to solve the above technical problems, the present invention provides a cluster management method, including: responding to the obtained change information of the node pool resources of the system level in the cluster, and updating the change information into the node pool reference resources of the item level corresponding to the node pool resources; monitoring the node pool reference resource to enable the container group in the items in the cluster to obtain change information; wherein the node pool reference resource is created correspondingly under the namespace of the item based on the node pool resource and the item level of the container group.
The method for updating the change information into the node pool reference resource of the item level corresponding to the node pool resource comprises the following steps of: and in response to the obtained change information of the node resources in the cluster, updating the node pool resources corresponding to the node resources based on the change information, and synchronizing the node pool resources to the node pool reference resources so as to update the change information into the node pool reference resources.
The method comprises the steps of responding to the obtained change information of node resources in a cluster, updating node pool resources corresponding to the node resources based on the change information, synchronizing the node pool resources to node pool reference resources, updating the change information into the node pool reference resources, and then further comprising: marking synchronous time stamp on the reference resource of the node pool; monitoring the node pool reference resource to enable the container group in the items in the cluster to obtain the change information, wherein the method comprises the following steps: and responding to the node pool reference resource to mark a synchronous time stamp, and monitoring the change information from the node pool reference resource by calling a gateway interface so as to enable the container group in the project to obtain the change information.
The method comprises the steps of responding to the obtained change information of node pool resources of a system level in a cluster, updating the change information into node pool reference resources of an item level corresponding to the node pool resources, and the steps of: in response to monitoring that the initial node resource of the new node is created, invoking a node proxy to perform node nano-tube on the new node; acquiring the processor model of the new node through the node agent, and performing the grouping classification processing on the processor model based on the processor classification pattern and the classification pattern to obtain the processor classification result of the new node; and writing the classification result of the processor into a label of the initial node resource of the new node to obtain the node resource.
The method comprises the steps of responding to the obtained change information of the node resources in the cluster, updating the change information into the node pool reference resources of the item level corresponding to the node pool resources, and further comprising: and when the labels of the node resources change and/or the classification rules of the classification pattern of the processor change, determining to acquire the change information of the node resources.
Wherein, in response to monitoring that the initial node resource of the new node is created, invoking the node proxy to perform node nano-tube on the new node comprises: in response to receiving an add instruction of a new node, creating an initial node resource of the new node; judging whether the new node meets the creation condition; and when the initial node resources of the new node meet the creation conditions, calling the node proxy to add the new node and the corresponding initial node resources into the cluster so as to perform node nano-management.
Wherein determining whether the new node satisfies the creation condition includes: judging whether the number of the authorized nodes in the cluster exceeds the authorized number, and determining that the new node meets the creation condition when the number of the authorized nodes does not exceed the authorized number; or judging whether the new node has the authorization certificate, and if the new node has the authorization certificate, determining that the new node meets the creation condition.
The method for creating the node pool reference resource comprises the following steps: in response to a node pool of the cluster weighting an item, a node pool reference resource is created under a namespace of the item based on node pool resources of the node pool.
In order to solve the technical problem, the present invention further provides an electronic device, including: the memory and the processor are coupled to each other, and the processor is configured to execute program instructions stored in the memory, so as to implement any one of the cluster management methods.
To solve the above technical problem, the present invention also provides a computer readable storage medium storing program data that can be executed to implement the cluster management method as any one of the above.
The beneficial effects of the invention are as follows: compared with the prior art, the method and the device have the advantages that the node pool reference resources of the project level are created under the naming space of the project based on the node pool resources, so that when the change information of the node pool resources of the system level is acquired, the change information is updated into the node pool reference resources of the project level corresponding to the node pool resources, so that a container group in the project has permission to access the node pool reference resources of the project level, further the change information of the node pool resources of the system level is acquired, the real-time dynamic perception of the node pool resources of the system level is realized, the scheduling management of the multi-architecture resources is facilitated, and the quick landing of a big data cloud primary scheme is promoted.
Drawings
FIG. 1 is a flow chart of an embodiment of a cluster management method according to the present invention;
FIG. 2 is a schematic diagram of the relationship of clusters, nodes, and container groups;
FIG. 3 is a flowchart illustrating another embodiment of a cluster management method according to the present invention;
FIG. 4 is a schematic diagram of a framework of an embodiment of a cluster;
FIG. 5 is a schematic architecture diagram of another embodiment of a cluster;
FIG. 6 is a flow diagram of one embodiment of joining a new node;
FIG. 7 is a schematic diagram of an embodiment of an electronic device according to the present invention;
fig. 8 is a schematic structural diagram of an embodiment of a computer readable storage medium provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of an embodiment of a cluster management method according to the present invention.
Step S11: and in response to the obtained change information of the node pool resources of the system level in the cluster, updating the change information into the node pool reference resources of the item level corresponding to the node pool resources.
Referring to fig. 2, fig. 2 is a schematic diagram of a relationship among clusters, nodes, and container groups.
The cluster 20 has a plurality of nodes 21. One node 21 may include a plurality of container groups 22, and the container groups 22 may include one or more containers 23.
While a node pool (nodunit) represents a collection of multiple nodes 21, a user may add different nodes 21 to the same node pool. The node pool has authority binding relation with the project. I.e. one and the same item corresponds to one node pool and to several nodes 21 as needed. The node pool can assign rights to the items and de-assign rights to the items; a group of containers (pod) deployed in an item can only be dispatched to nodes in the authorized node pool. The node pool includes the resource details of the current node pool, namely node pool resources (NodeUnit resources), and the node pool resources can include details of the number of nodes, the processor model number of the nodes, the working state of the nodes and the like.
And node pool reference resources (NodeUnitClaim) are references to node pool resources that are created under the project's namespace based on the node pool resources and the project level of the container group. The resource content of the node pool reference resource corresponds to the node pool resource, and the item level of the node pool reference resource corresponds to the item level of the container group, so that the container group can acquire the resource content of the node pool reference resource with the same level or a low level.
Wherein in a cluster, for example: kubernetes clusters, all operations are spread around a single namespace, while items are collections of a set of namespaces, each item containing a default namespace.
After the node pool reference resource of the item level is created, when the change information of the node pool resource of the system level is obtained, the change information is updated into the node pool reference resource, so that the node pool reference resource contains the change information of the node pool resource.
In a specific application scenario, the change information of the node pool resource may include information about node addition, unloading, disabling, upgrading, or cleaning in the node resources in the corresponding node pool. When the state change conditions such as new addition, unloading, forbidden, upgrading or cleaning occur to the nodes, the change information of the node pool resources is obtained.
In another specific application scenario, the change information of the node pool resource may further include that the classification rule of the processor classification pattern of the node changes. The classification rule of the processor classification pattern can be classified based on the rules of the model, frequency, performance and the like of the processor; for example: processors corresponding to nodes may be classified into a high frequency processor, a low frequency processor, an over frequency processor, and an intermediate frequency processor based on frequency. The specific classification rules are not limited herein, and the processor of the node in this embodiment may include a central processing unit (CPU, central processing unit) or other processor, which is not limited herein.
Step S12: and monitoring the node pool reference resource so as to obtain the change information of the container group in the items in the cluster.
Because the node pool belongs to the system-level resource, the container group under the project does not have permission to directly acquire the resource details in the node pool, the embodiment creates the project-level node pool reference resource based on the project level of the node pool resource and the container group under the project naming space, so that the project level of the project-level container group of the node pool reference resource corresponds, further, the change information of the node resource can be acquired directly through accessing the node pool reference resource, the real-time dynamic perception of the node resource is realized, and the scheduling management of the multi-architecture resource is facilitated to promote the quick landing of the big data cloud primary scheme.
Through the steps, the node pool reference resource of the project level is created under the naming space of the project based on the node pool resource, so that when the change information of the node pool resource of the system level is obtained, the change information is updated into the node pool reference resource of the project level corresponding to the node pool resource, so that a container group in the project has permission to access the node pool reference resource of the project level, further the change information of the node pool resource of the system level is obtained, the real-time dynamic perception of the node pool resource is realized, the scheduling management of the multi-architecture resource is facilitated, and the big data cloud native scheme is promoted to fall to the ground rapidly.
Referring to fig. 3, fig. 3 is a flowchart illustrating another embodiment of a cluster management method according to the present invention.
Step S31: and in response to the obtained change information of the node resources in the cluster, updating the node pool resources corresponding to the node resources based on the change information, and synchronizing the node pool resources to the node pool reference resources so as to update the change information into the node pool reference resources.
Node resources (NodeInfo resources) contain a summary of related resources of nodes (nodes) within the cluster, such as: the number of nodes, the version of the node, the number of connections, the memory utilization, the processor (central processing unit) utilization, bandwidth, etc.
When the change information of the node resource is obtained, the change information of the node resource can be updated to the node pool resource of the node pool to which the corresponding node belongs.
The change information of the node resources comprises the change of labels of the node resources and/or the change of classification rules of the processor classification pattern. And determining to acquire the change information of the node resources when the labels of the node resources change and/or the classification rules of the processor classification pattern. The label change of the node resource comprises information such as new addition, unloading, forbidden, upgrading or cleaning of the nodes in the cluster.
The steps of adding nodes in the cluster are shown in fig. 5-6.
When the change information of the node resources is obtained, which represents that the state of the node existing in the cluster is changed or the classification rule of the processor classification pattern is changed, all the node pool resources where the changed node is located need to be updated, and the node pool resources corresponding to the node resources are updated based on the change information. In particular, the update is to add change information to the node pool resources.
After the system level node pool resource updates the change information, synchronizing the node pool resource into the project level node pool reference resource to add the change information into the node pool reference resource.
When the node control monitors the node pool resource updating change information, the node control represents that the node resources in the current node pool are changed, and the change information needs to be synchronously updated to the node pool reference resources of all authorized items. The node pool reference resource is used as a reference of the node pool resource, and one synchronous update can be carried out whenever the node pool is correspondingly changed.
Wherein the node pool reference resource (NodeUnitClaim) is a reference to a node pool resource created under the project's namespace based on the node pool resource and the project level of the container group. Wherein in a cluster, for example: kubernetes clusters, all operations are spread around a single namespace, while items are collections of a set of namespaces, each item containing a default namespace.
Referring to fig. 4, fig. 4 is a schematic diagram of a framework of an embodiment of a cluster. The present schematic diagram only illustrates the modules required in the present embodiment, and does not limit the cluster structure.
The core component of cluster 40 is node control 41, around which all operations are run.
The node control 41 is communicatively connected to a client program 42 to receive various instructions from a user.
The node control 41 listens to each node, each node pool, and each node pool reference resource in the respective cluster 40 for changes. In a specific application scenario, when node label of node resource is changed, the classification rule representing that node joins cluster 40 or the processor classification pattern changes. At this time, all node pool resources where the node is located need to be updated.
The cluster 40 of this embodiment includes two node pools 43, one node-unit-default-dahuaac-loud and one node-unit-test-test.
The cluster 40 of the present embodiment includes two items 47, respectively: user item project1 and user item project 2. The namespace 44 of the user project1 is project1-default-ns, and two node pools 43 are respectively set in the namespace, and two node pool reference resources 441 are respectively set in the namespace. The two node pool reference resources 441 of the user item project1 are node-unit-default-dahuaac-class, respectively. And the namespace 44 of the user item project2 is project2-default-ns, in which a node pool 43 is provided, with a node pool reference resource 441. The node pool of user item project2 references resource 441 as node-unit-test-test-clip.
The set of containers 46 in the cluster 40 of the present embodiment are deployed on a resource scheduling platform, such as yarn. The container set 46 can correspondingly acquire the needed node pool reference resource 441 in the item 47 through a gateway interface (Apisix), so as to realize the classification result of the heterogeneous processor family processor of the authorized node pool 43 of the item 47 where the container set 46 is located.
In a specific application scenario, the node-unit-default-dahuac-clone node pool 43 authorizes the user project1, and then a node pool reference resource 441 (node-unit-default-dahuac-clone) of the node pool 43 is created under the project1-default-ns namespace 44, the node pool reference resource 441 belongs to the project-level resource and corresponds to the project level of the container group, so that the container group 46 deployed under the user project1 has access to the resource. The node pool resource and node pool reference resource 441 resources are exemplified as follows:
wherein the creation of the node pool application resource is performed before step S31. When a node pool of a cluster weights an item, node pool reference resources are correspondingly created under the naming space of the item based on node pool resources of the node pool and item levels of a container group.
In a specific application scenario, when the node control 41 obtains the change information of the node resource, the node-unit-default-dahuaac resource corresponding to the node resource is updated based on the change information. And synchronizing node pool resources node-unit-default-dahuaac to node pool reference resources 441 in project1-default-ns namespaces 44 of user projects project1 to realize updating. The present application scenario only illustrates, but is not limited to, the updating step of the node pool reference resource 441, and in other application scenarios, the node pool resource, and the node pool reference resource may be other types of content, which is not limited herein.
Step S32: the node pool reference resource is time stamped synchronously.
When the node control 41 monitors that the node pool reference resource changes, the node pool reference resource is marked with a synchronous timestamp (lastSyncTimeStamp) through the latch, and the updating of the whole change information is completed, so that all data sources are synchronous and ready.
Step S33: and responding to the node pool reference resource to mark a synchronous time stamp, and monitoring the change information from the node pool reference resource by calling a gateway interface so as to enable the container group in the project to obtain the change information.
When a node pool reference resource is synchronously time stamped, a container group deployed in the project can obtain change information from the node pool reference resource by calling a gateway interface.
Since the node pool references a resource created under the project's namespace, which belongs to the project-level resource, the container group deployed under the current project has access to that resource.
In one particular application scenario, the set of containers 46 deployed in the project need only be deployed by invoking the gateway interface (apisix) deployed in the cluster 40. Calling interface/apis/operator.dahuatech.com/v 1/node class switch=true, the gateway interface returns all node pool reference resources 441 of the current project according to the project of the user program 42, and continuously monitors the node pool resources and the node resources, thereby facilitating the dispatch management of multi-architecture resources and promoting the fast landing of the big data cloud native scheme.
Wherein when the container group accesses the node pool reference resource by calling the gateway interface, all information of the node pool reference resource, including but not limited to change information, can be acquired. However, when the node pool resource changes, the container group in the project can access the node pool reference resource through calling the gateway interface, and the unchanged information container group is acquired, so that the container group acquires the change information each time the change information is generated, and the information required by scheduling management can be ensured.
Through the steps, the node pool reference resource is created under the project naming space based on the node pool resource and the project level of the container group, so that when the change information of the node resource is obtained, the change information is updated into the node pool resource corresponding to the node resource, and then the change information is updated into the node pool reference resource under the project naming space, the monitoring of the node pool reference resource is realized, the container group deployed in the projects of the kubernetes cluster is authorized to obtain the change information, the real-time dynamic perception of the classification result of the processor family processor of the node of the project authorization node pool is realized, and therefore, a resource scheduling platform can conveniently schedule according to the processor selected by a user, the scheduling management of multi-architecture resources is realized, and the fast landing of the big data cloud primary scheme is promoted.
In a specific application scenario, when a new node joins the cluster, the node label of the node resource changes correspondingly, and change information is generated. Referring to fig. 5-6, fig. 5 is a schematic diagram illustrating an architecture of another embodiment of a cluster. The present schematic diagram only illustrates the modules required in the present embodiment, and does not limit the cluster structure. Figure 6 is a flow diagram of one embodiment of joining a new node.
The modules in the cluster 50 of the present embodiment that participate in the operation of joining a new node into the cluster 50 include: client program 54, node control 51, node proxy 52, processor model 53, initial node resources 55, and node resources 56. The client program 54 is communicatively connected to the node control 51, and the node control 51 is communicatively connected to the node agent 52, the processor model 53, the initial node resource 55, and the node resource 56, respectively.
The cluster 50 of the present embodiment may comprise a Kubernetes cluster.
The user-side program 54 (web-app) serves as an operation portal for a user, and may receive a series of operations of node management, application deployment, network management, resource management, system monitoring, and the like, by the user through an operation page. Node control 51 (Node-controller) acts as a custom controller module, merging Node and Node pool management related operations. The main functions are two: 1. node nanotubes, offloading, prohibiting scheduling, cleaning, and node upgrades; 2. related functions such as node pool adding, deleting, node pool adding and deleting, node pool and project authority related operation, node pool forbidden scheduling and the like.
The Node agent 52 (Node-agent) has the main functions of performing actual nanotube operation on the Node, feeding back and acquiring the hardware resource information of the Node. In kubernetes clusters, when a node needs to join the cluster, join operations need to be actively performed in the compute node.
The processor model 53 (processor-model) is a processor classification map configmap for the processor family classification preset by the container cloud, and when the node nanotubes are successful, the node can be initially classified according to the current processor classification map. The processor model 53 supports the dynamic addition of processor models and the modification of classification rules, as the processor classification pattern changes, the processor family labels of the corresponding nodes also change dynamically. An example yaml of the processor model 53 is as follows:
the functions of the above modules in cluster 50 may be implemented by software algorithms.
The steps of joining the cluster 50 by the new node are as follows:
step S61: in response to monitoring that the initial node resource of the new node is created, invoking a node proxy to perform node hosting on the new node.
In a specific application scenario, an initial node resource of a new node is created in response to receiving an addition instruction of the new node; judging whether the new node meets the creation condition; and when the initial node resources of the new node meet the creation conditions, calling the node proxy to add the new node and the corresponding initial node resources into the cluster so as to perform node nano-management.
Specifically, the user performs an operation of adding a new node from the client program 54, and the node control 51 creates an initial node resource 55 of the new node in response to receiving an addition instruction of the new node from the client program 54. Wherein the initial node resources 55 comprise custom resources CRD (Custom Resource Definition).
After the node control 51 monitors the creation of the initial node resource 55, it is determined whether the new node satisfies the creation condition.
In a specific application scenario, it may be determined whether the number of authorized nodes in the cluster 50 exceeds the authorized number, and if not, it is determined that the new node satisfies the creation condition. In another specific application scenario, it may be determined whether the new node has an authorization certificate, if so, it is determined that the new node meets the creation condition, and if not, it is determined that the new node does not meet the creation condition, and no subsequent operation is performed. In other application scenarios, the creation condition may also be set based on other constraints of the cluster 50, which is not limited herein.
When the new node satisfies the creation condition, the node control 51 invokes the node proxy 52 to add the new node and the corresponding initial node resource 55 to the cluster 50, and feeds back the operation result of adding to the cluster 50 to the node control 51 to perform node nano-tube.
Step S62: and obtaining the processor model of the new node through the node agent, and performing the grouping classification processing on the processor model based on the processor classification pattern and the classification pattern to obtain the processor classification result of the new node.
After the node nano-tube, the node control 51 obtains the processor model of the new node through the node proxy 52, and performs the grouping and classifying treatment on the processor model based on the processor classification pattern and the authentication so as to obtain the processor classification result of the new node.
Step S63: and writing the classification result of the processor into a label of the initial node resource of the new node to obtain the node resource.
The node control 51 writes the processor classification result into the label of the initial node resource 55 of the new node, resulting in node resource 56. The tag, taking fig. 5 as an example, may be: node.cube.dahuatech.com/node-spec lfc. In other application scenarios, the tag may be other content, which is not limited herein.
Because of the addition of the new node, the classification result of the processor is written into the label of the initial node resource of the new node, so that the node resource is changed, and further the change information of the node resource is obtained.
After obtaining the change information of the node resource, executing the steps of the embodiment of any cluster management method.
The steps can finish the addition of the new node. In addition, the embodiment performs the grouping classification on the processors of the nodes in the process of adding the nodes, can improve the management specification of the cluster nodes, and is convenient for scheduling and managing the multi-architecture resources. And the nodes of the clusters can comprise heterogeneous processor nodes, so that the heterogeneous processor nodes are added into the same cluster, the heterogeneous processor nodes are scheduled and migrated in the same container cluster, the platform software does not limit the selection of hardware by a user any more, and the resource waste of management nodes caused by the deployment of multiple sets of clusters can be saved.
According to the cluster management method, after the nodes are managed to kubernetes clusters, the processors of the nodes are classified in a family mode according to the classification pattern of the processors, and then the classification results of the processors are marked on the node resources in the form of labels, so that the resources of the authorized node pools can be counted in the project later. And the node pool reference resource of the node pool resource is constructed under the naming space of the project, so that when the container group deployed under the project calls an apiserver interface through the apisix of the container cloud built-in gateway, the resource of all authorized node pools in the current project can be obtained through the node pool reference resource, the change of the resource is continuously monitored, the real-time perception of the node resource is realized, the scheduling management of the multi-architecture resource is facilitated, and the quick landing of the big data cloud original scheme is promoted.
Based on the same inventive concept, the present invention also provides an electronic device capable of being executed to implement the cluster management method of any of the above embodiments, referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of the electronic device provided by the present invention, where the electronic device includes a processor 71 and a memory 72.
The processor 71 is configured to execute program instructions stored in the memory 72 to implement the steps of any of the cluster management methods described above. In one particular implementation scenario, an electronic device may include, but is not limited to: the microcomputer and the server, and the electronic device may also include mobile devices such as a notebook computer and a tablet computer, which are not limited herein.
In particular, the processor 71 is operative to control itself and the memory 72 to implement the steps of any of the embodiments described above. The processor 71 may also be referred to as a processor (Central Processing Unit ). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 71 may be commonly implemented by an integrated circuit chip.
By the scheme, the container group of the project can sense the change of the node pool resources in real time, and scheduling management of multi-architecture resources is facilitated.
Based on the same inventive concept, the present invention also provides a computer readable storage medium, please refer to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of the computer readable storage medium provided by the present invention. At least one program data 81 is stored in the computer readable storage medium 80, the program data 81 being used to implement any of the methods described above. In one embodiment, the computer-readable storage medium 80 includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the several embodiments provided in the present invention, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the invention, in essence or a part contributing to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium.
The foregoing description is only of embodiments of the present invention, and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the present invention.

Claims (10)

1. A cluster management method, comprising:
responding to the obtained change information of node pool resources of a system level in a cluster, and updating the change information into node pool reference resources of a project level corresponding to the node pool resources;
monitoring the node pool reference resource so as to enable a container group in the items in the cluster to acquire the change information;
wherein the node pool reference resource is created correspondingly under a namespace of the item based on the node pool resource and the item level of the container group.
2. The cluster management method according to claim 1, wherein the updating the change information into the node pool reference resource of the item level corresponding to the node pool resource in response to obtaining the change information of the node pool resource of the system level in the cluster includes:
and in response to obtaining the change information of the node resources in the cluster, updating the node pool resources corresponding to the node resources based on the change information, and synchronizing the node pool resources to the node pool reference resources so as to update the change information into the node pool reference resources.
3. The cluster management method according to claim 2, wherein in response to obtaining the change information of the node resources in the cluster, updating the node pool resources corresponding to the node resources based on the change information, and synchronizing the node pool resources to the node pool reference resources, so as to update the change information into the node pool reference resources, further comprising:
marking the node pool reference resource with a synchronous time stamp;
the monitoring of the node pool reference resource to enable the container group in the items in the cluster to obtain the change information comprises the following steps:
and responding to the node pool reference resource to mark the synchronous time stamp, and monitoring the change information from the node pool reference resource by calling a gateway interface so as to enable the container group in the project to obtain the change information.
4. The cluster management method according to claim 2, wherein the updating the change information into the node pool reference resource of the item level corresponding to the node pool resource in response to obtaining the change information of the node pool resource of the system level in the cluster comprises:
in response to monitoring that an initial node resource of a new node is created, invoking a node proxy to perform node nano-tube on the new node;
acquiring the processor model of the new node through a node agent, and performing a family classification treatment on the processor model based on a processor classification pattern and an identification to obtain a processor classification result of the new node;
and writing the classification result of the processor into a label of the initial node resource of the new node to obtain the node resource.
5. The cluster management method according to claim 4, wherein in response to obtaining the change information of the node pool resource at the system level in the cluster, updating the change information into the node pool reference resource at the item level corresponding to the node pool resource, further comprising:
and when the label of the node resource changes and/or the classification rule of the processor classification pattern is changed, determining to acquire the change information of the node resource.
6. The cluster management method of claim 4, wherein the invoking the node proxy to node-nanotube the new node in response to listening to the creation of the initial node resource for the new node comprises:
in response to receiving an add instruction of the new node, creating an initial node resource of the new node;
judging whether the new node meets the creation condition or not;
and when the initial node resources of the new node meet the creation condition, calling a node proxy to add the new node and the corresponding initial node resources into a cluster so as to perform the node nano-tube.
7. The cluster management method according to claim 6, wherein the determining whether the new node satisfies a creation condition includes:
judging whether the number of the authorized nodes in the cluster exceeds the authorized number, and determining that a new node meets the creation condition when the number of the authorized nodes does not exceed the authorized number; or (b)
Judging whether the new node has an authorization certificate, and if the new node has the authorization certificate, determining that the new node meets the creation condition.
8. The cluster management method according to claim 1, wherein the method for creating the node pool reference resource includes:
in response to the node pool of the cluster weighting the project, creating the node pool reference resource under a namespace of the project based on node pool resources of the node pool.
9. An electronic device, the electronic device comprising: a memory and a processor coupled to each other for executing program instructions stored in the memory to implement the cluster management method of any one of claims 1 to 8.
10. A computer readable storage medium storing program data executable to implement the cluster management method of any one of claims 1 to 8.
CN202310325660.6A 2023-03-27 2023-03-27 Cluster management method, electronic device and storage medium Pending CN116521307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310325660.6A CN116521307A (en) 2023-03-27 2023-03-27 Cluster management method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310325660.6A CN116521307A (en) 2023-03-27 2023-03-27 Cluster management method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN116521307A true CN116521307A (en) 2023-08-01

Family

ID=87403741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310325660.6A Pending CN116521307A (en) 2023-03-27 2023-03-27 Cluster management method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN116521307A (en)

Similar Documents

Publication Publication Date Title
CN109032796B (en) Data processing method and device
CN105119966A (en) Official account management method and device
CN105786603B (en) Distributed high-concurrency service processing system and method
CN110806928A (en) Job submitting method and system
US20240160488A1 (en) Dynamic microservices allocation mechanism
CN111324667B (en) Data synchronization method and device, electronic equipment and storage medium
CN113722114A (en) Data service processing method and device, computing equipment and storage medium
CN114840222A (en) Gray scale publishing method based on ESOP system and related equipment
WO2018188607A1 (en) Stream processing method and device
CN113204425A (en) Method and device for process management internal thread, electronic equipment and storage medium
CN116560803B (en) Resource management method and related device based on SR-IOV
CN117076096A (en) Task flow execution method and device, computer readable medium and electronic equipment
CN105933136B (en) A kind of resource regulating method and system
WO2022267646A1 (en) Pod deployment method and apparatus
CN116521307A (en) Cluster management method, electronic device and storage medium
CN115811481A (en) Interactive service testing method and device, computer equipment and storage medium
CN110119300A (en) The load-balancing method and device of dummy unit cluster
CN111767345B (en) Modeling data synchronization method, modeling data synchronization device, computer equipment and readable storage medium
CN108696550A (en) Rapid build and the system and method for replicating cloud
CN105187244A (en) Access management system of digital communication equipment supporting multiple management modes
CN112114931A (en) Deep learning program configuration method and device, electronic equipment and storage medium
CN117251297B (en) Equipment distribution method, electronic equipment and storage medium
CN115858087B (en) Method, device, equipment and medium for deploying multiple processes in cloud computing system
CN110321335B (en) Modeling data downloading method and device, electronic equipment and computer storage medium
CN108762929B (en) Method and device for managing number of processor cores under SQL database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination