CN117424905A - Multi-K8 s cluster management system, application scheduling method, equipment and medium - Google Patents

Multi-K8 s cluster management system, application scheduling method, equipment and medium Download PDF

Info

Publication number
CN117424905A
CN117424905A CN202311570219.0A CN202311570219A CN117424905A CN 117424905 A CN117424905 A CN 117424905A CN 202311570219 A CN202311570219 A CN 202311570219A CN 117424905 A CN117424905 A CN 117424905A
Authority
CN
China
Prior art keywords
cluster
sub
clusters
scheduling
target
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
CN202311570219.0A
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.)
Network Communication and Security Zijinshan Laboratory
Original Assignee
Network Communication and Security Zijinshan Laboratory
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 Network Communication and Security Zijinshan Laboratory filed Critical Network Communication and Security Zijinshan Laboratory
Priority to CN202311570219.0A priority Critical patent/CN117424905A/en
Publication of CN117424905A publication Critical patent/CN117424905A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1042Peer-to-peer [P2P] networks using topology management mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention discloses a multi-K8 s cluster management system, an application scheduling method, equipment and a medium. The system comprises: at least one K8s cluster and a cluster manager; the cluster manager is used for acquiring the target description file and constructing a cluster topology architecture of at least one topology type for the cluster according to the target description file; wherein, the target description file includes: parent cluster access information and cluster relationship parameter information used for establishing relationship between clusters with other clusters. The relationship between clusters is described by using the object description file, and a topology framework is built for all clusters by the object description file. The method realizes flexible organization management of the clusters and construction of complex multi-cluster organization structures of at least one topology type. The scheduler can automatically adapt to the topological structure of the cluster to finish the scheduling task of the application.

Description

Multi-K8 s cluster management system, application scheduling method, equipment and medium
Technical Field
The invention relates to the field of cloud computing and multi-cluster management, in particular to a multi-K8 s cluster management system, an application scheduling method, equipment and a medium.
Background
In a heterogeneous multi-cloud environment, the problems of massive cluster access, cluster resource abstraction, authority management, application management, multi-cluster scheduling, service maintenance, multi-tenant and multi-cluster service discovery are solved, the complexity and difficulty of a multi-cluster scheme are greatly increased, at present, communities and industries are all based on a father-son two-layer architecture, a father cluster is used as a main control cluster, the other clusters are used as sub-clusters for bearing workload, and the management quantity is limited. There are four main flows, kubreffedderation federal regime, karmarda, clusternet and admiralty.
Where kubreffedderation and kardarda are generic configurations, proprietary configurations and scheduling policies that define loads through template, overseride, progration, etc. karman evolved from kubreffeederation to support the richer features of plug-in scheduling capability and Multi cluster service, both of which only support a central two-tier architecture. The child clusters of the clusterite project are accessed into the parent clusters through controlled token when the agent is started. The parent cluster performs escape on all native kubernetes resources in a AA (Aggregated API) mode to form a manifest file and pushes the manifest file to the child cluster, and the present clusterite can only support a two-layer architecture. The admiralty is a multi-layer scheduling model which achieves the same experience as a single cluster when a plurality of clusters are used, does not make any abstraction on applications, is native to kubernetes, has the characteristics of dependence on loads to follow scheduling according to pod and supports a very flexible organization architecture and can be defined by software.
The first three schemes cannot realize a multi-layer self-organizing architecture, which cannot meet the expansibility and the effect of actually achieving Global Super Computer, and the real organizing architecture must be layered. The last type of application is not abstract, but can only be modified based on a scheduling framework of kubernetes, and the minimum scheduling unit is still pod, so that the management is inefficient and complex in a heterogeneous cloud scene, and is difficult to apply to a production environment.
Disclosure of Invention
The invention provides a multi-K8 s cluster management system, an application scheduling method, equipment and a medium, so as to realize flexible management and scheduling of multiple clusters.
According to a first aspect of the present invention, there is provided a K8s cluster management system, comprising: at least one K8s cluster and a cluster manager;
the cluster manager is used for acquiring the target description file and constructing a cluster topology architecture of at least one topology type for the cluster according to the target description file;
wherein, the target description file includes: the parent cluster corresponding to the cluster is accessed with information and cluster relation parameter information used for establishing relation between clusters with other clusters.
According to a second aspect of the present invention, there is provided an application scheduling method applied to the system according to any embodiment of the present invention, the method being performed by a cluster as an executing node within at least one cluster topology constructed in the system, the method comprising:
when receiving an application scheduling task, judging whether a sub-group associated with the execution node exists according to architecture topology information of a target cluster topology architecture to which the application scheduling task belongs, and obtaining a judging result;
and determining a scheduling result according to the judging result and the application scheduling task.
According to a third aspect of the present invention, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the application scheduling method of any one of the embodiments of the present invention.
According to a fourth aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute an application scheduling method according to any one of the embodiments of the present invention.
The technical scheme of the embodiment of the invention comprises the following steps: at least one K8s cluster and a cluster manager; the cluster manager is used for acquiring the target description file and constructing a cluster topology architecture of at least one topology type for the cluster according to the target description file; wherein, the target description file includes: the method comprises the steps of accessing information of a parent cluster corresponding to a cluster, information interaction frequency of the cluster and cluster relation parameter information which is used for establishing relation between the clusters and other clusters. The relation between clusters is described by using the target description file, and a cluster topology framework is built for the clusters by using the target description file. The method realizes flexible organization management of the clusters and construction of complex multi-cluster organization structures of at least one topology type.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a K8s cluster management system according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a dispatch controller in a K8s cluster management system according to a first embodiment of the present invention;
fig. 3 is a flowchart of an application scheduling method according to a second embodiment of the present invention;
fig. 4 is a diagram illustrating an example of a configuration of an application scheduling method according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a K8s cluster management system according to an embodiment of the present invention, where the embodiment is applicable to a situation of managing K8s clusters in a multi-cloud heterogeneous scenario, as shown in fig. 1, the system includes: at least one K8s cluster 11 and a cluster manager 12.
A cluster manager 12, configured to obtain a target description file, and construct a cluster topology architecture of at least one topology type for the cluster 11 according to the target description file; wherein, the target description file includes: the parent cluster access information corresponding to the cluster 11 and cluster relationship parameter information used for establishing inter-cluster relationship with other clusters.
In this embodiment, the object description file may be understood as a file for describing the dependency relationship between the clusters 11, and also includes the access mode of the parent cluster and the bearer token required for joining the clusters. The relationship between clusters may be bidirectional or directed to itself. The topology types formed by the object description file may include: a center mode, a main and standby mode, a decentralization mode, a tree model and the like. The central mode has a father cluster as a main control cluster and hosts N sub-clusters, and the mode is suitable for medium-scale environments of infrastructures and is simple to manage. The target description file of the sub-cluster in the active-standby mode points to the parent cluster, and the target description file of the parent cluster points to the target description file of the sub-cluster, so that the mode can configure the application into 2 clusters 11, is a very simple high-availability mode, is suitable for environments with small scale, and is simple to configure. The decentralization mode refers to all clusters 11 being both parent and child clusters. In this de-centralized architecture, the clusters are point-to-point (peer-to-peer) relationships. The tree model refers to that clusters 11 form a hierarchical tree structure according to the direction of the target description file.
In this embodiment, the cluster topology architecture may be understood as an architecture formed by clusters according to relationships among clusters in the target description file. The parent cluster access information may be understood as information required for the subset group to access the parent cluster. The information interaction frequency can be understood as the frequency of information interaction between the subset group and the parent group, and can include a resource information reporting time interval, a resource information collecting time interval and the like. Cluster relationship parameter information may be understood as parameters related to the relationship between clusters.
By way of example, the object description file may include: apiVersion: version information; kined: a resource type; metadata: metadata; name: target object name; spec: detailed description of the reportFrequency: reporting the time interval of the father cluster; collectFrequency: a resource collection time interval; clusteriname: a subset group name; parenturl: a parent cluster access address; bootstrapping token: the cluster registers the boot token. Wherein, the subset group management comprises the access address parenturl of the parent group, and the guidance token (bootstraptoken) of the group registration; in the aspect of parent cluster management, the target description file provides the name clusteriname of the child cluster, the resource collection time interval collectionFrequency of the own cluster and the sub-cluster of the own cluster and the time interval reportFrequency of reporting the parent cluster.
The cluster 11 in the cluster topology architecture with different topology types is provided with a scheduling controller, and the cluster 11 performs resource allocation processing on the received application scheduling task through the scheduling controller.
In this embodiment, the scheduling controller may be understood as being used to implement the application scheduling and control functions. The application scheduling task may include application implementation requirements such as the sum of all prime numbers out of the calculation data. A cluster topology architecture can be understood as an architecture formed by clusters according to a cluster relationship.
For the sake of understanding the constitution of the schedule Controller, fig. 2 is a schematic diagram of the structure of the schedule Controller in a K8s cluster management system according to the first embodiment of the present invention, and as shown in fig. 2, the control plane of the schedule Controller Gaia is composed of two parts, namely a Scheduler and a Controller. The resources focused by each layer of clusters have two parts of input and output, wherein the input and output types of the scheduling controllers are the same and are CRD resources called APP, wherein the APP refers to web-form application and service or micro-service, and more detailed scheduling structure information is added in the App after scheduling. Wherein, scheduler: it will only schedule applications in its own registered subset, all scheduler inputs and outputs are App. Controller: the controllers include a cluster registration controller, a registration approval controller, a status report controller, an MCS controller (multi cluster service), and the like. Binder: only in the lowest cluster 11, when the binder finds the app scheduling result and there are no sub-clusters, the scheduling result is pushed to the present cluster.
Specifically, the cluster manager 12 may obtain, through a corresponding transmission manner or a corresponding storage medium, a target description file customized by a manager of the cloud resource, where a target description file template may be provided in advance, and the manager of the cloud resource may fill in the target description file template to obtain a customized target description file. And determining the relation of each cluster 11 in the cluster topology structure according to the cluster relation parameter information recorded in the target description file, such as a parent cluster, a child cluster or an independent cluster. And accessing the subset group to the parent cluster through the parent cluster access information recorded in the target description file, so as to construct a cluster topology structure of at least one topology type.
According to the technical scheme, at least one K8s cluster and a cluster manager are adopted; the cluster manager is used for acquiring the target description file and constructing a cluster topology architecture of at least one topology type for the cluster according to the target description file; wherein, the target description file includes: the method comprises the steps of accessing information of a parent cluster corresponding to a cluster, information interaction frequency of the cluster and cluster relation parameter information which is used for establishing relation between the clusters and other clusters. The relation between clusters is described by using the target description file, and a cluster topology framework is built for the clusters by using the target description file. The method realizes flexible organization management of the clusters and construction of complex multi-cluster organization structures of at least one topology type.
Further, the cluster manager 12 includes:
the cluster distinguishing module is used for acquiring a target description file and dividing the cluster 11 into a father cluster, a child cluster or an independent cluster according to cluster relation parameter information;
the information issuing module is used for generating target object deployment information of the sub-cluster according to the target description file and issuing the target object deployment information to the sub-cluster;
the node access module is used for controlling the access of the sub-cluster to the corresponding parent cluster according to the target object deployment information and the parent cluster access information to obtain the accessed sub-cluster;
and the architecture construction module is used for obtaining a cluster topology architecture of at least one topology type according to the accessed child clusters, parent clusters and independent clusters.
In this embodiment, a parent cluster may be understood as a node for application scheduling task allocation and management of child clusters. A child cluster may be understood as a cluster belonging to the parent cluster below, and may receive the scheduled task allocated by the parent cluster to issue again or bind directly. An independent cluster may be understood as a cluster in which no access or management of other clusters occurs (i.e. a cluster without a parent or child cluster), simply a kubernetes cluster. The target object deployment information may be understood as deployment information for determining a subset group access to a parent group.
Specifically, the cluster manager 12 may obtain the target description file through the cluster distinguishing module, and divide the cluster 11 into a parent cluster, a child cluster or an independent cluster according to the cluster relationship parameter information; and generating target object deployment information of the sub-cluster according to the target description file through an information issuing module and issuing the target object deployment information to the sub-cluster. The node access module is used for controlling the sub-clusters to be accessed to the corresponding parent clusters according to the target object deployment information and the parent cluster access information, and when the sub-clusters receive the target object deployment information, the corresponding parent clusters are determined, wherein the bottommost clusters are only used for bearing the workload and do not need to externally expose public network addresses, so that the clusters are actively accessed, and the resource synchronization adopts a Pull mode. The sub-clusters actively initiate a cluster registration process to the parent clusters, register as the sub-clusters under the corresponding parent clusters, perform cluster registration approval by the parent clusters, and approve the parent clusters according to the unique ID numbers of each accessed sub-cluster, so that repeated registration of the sub-clusters is avoided; creating a unique naming space (namespace), an access rule (rbac), an access account (sa), cluster management resources and the like for each sub-cluster, wherein the naming space is used for a parent cluster to issue a scheduling expected plan, the sub-cluster to report information such as an actual scheduling result and the like in an application scheduling process; the father cluster also provides a reporting resource use interface for supervising the resource use condition of the cluster and providing basis for application scheduling; the uppermost father cluster provides a plurality of external interfaces, including application issuing, resource use reporting, application use condition real-time reporting and some interactive interfaces; the sub-clusters continuously observe the approval results, and access rights of the corresponding parent clusters can be obtained after approval is passed, and the sub-clusters are registered as sub-clusters to obtain the accessed sub-clusters. And finally, constructing a cluster topology framework of at least one topology type according to the parent cluster and the independent cluster corresponding to the accessed subset group through a framework construction module.
Optionally, the cluster manager 12 further includes:
and the framework updating module is used for changing the cluster topology framework through the updated target description file when the updated target description file is received.
It should be noted that in the actual use process, the roles of the clusters may be changed, for example, the cluster that is the parent cluster is to be changed into the child cluster, the cluster that is the child cluster is to be changed into the parent cluster, or the child cluster is newly added, at this time, the target description file needs to be changed, and corresponding changes are performed on the parent cluster access information, the cluster relationship parameter information and the like corresponding to the cluster that needs to be changed in the target description file, so as to obtain the updated target description file.
Specifically, when the architecture updating module receives the updated target description file, the cluster 11 needing to be changed is determined through the updated target description file, and the cluster 11 is changed to obtain the changed cluster topology architecture.
The architecture updating module is specifically configured to:
determining a cluster to be changed and a corresponding cluster relation changing mode according to the updated target description file; and changing the cluster topology structure according to the cluster relation changing mode and the clusters to be changed.
In this embodiment, the cluster to be changed may be understood as a node that needs to change the cluster relationship. The cluster relationship changing method may be understood as a method for changing a relationship according to a changed cluster relationship corresponding to a cluster to be changed.
Specifically, the architecture updating module can find out the cluster to be changed and the corresponding cluster relation changing mode in the updated target description file; and determining corresponding cluster roles of the clusters to be changed after the change according to the cluster relation change mode, such as the clusters to be changed become a parent cluster, a child cluster or an independent cluster. And controlling the cluster to be changed to perform operations such as accessing the parent cluster or approving the child cluster through the determined cluster role, thereby finishing changing the cluster topology structure.
By such an arrangement of the present embodiment, a scheduling controller is added for each cluster, and hierarchical scheduling of idempotent is provided by the scheduling controller. No matter which topology model is adopted in the process of controlling the distributed cloud infrastructure, the scheduling controller does not distinguish the position of the controller, and the scheduling controller ensures the consistency of input and output. When the target description file is updated, the change of the cluster topology architecture is realized through the change of the cluster to be changed, the single cluster can realize the flexible transition of roles, the cluster topology architecture can be quickly accessed and exited, and the change of the infrastructure can be better dealt with. The method realizes the change and expansion of the structure among the clusters at any time, ensures the flexibility of the change of the topology architecture of the clusters, and realizes the lossless expansion and contraction capacity of the clusters.
Example two
Fig. 3 is a flowchart of an application scheduling method according to a second embodiment of the present invention, where the method may be performed by a cluster as an execution node in at least one cluster topology constructed in a K8s cluster management system, where the K8s cluster management system may be implemented in a hardware and/or software form, and where the K8s cluster management system may be configured in an electronic device. As shown in fig. 3, the method includes:
and S310, when receiving an application scheduling task, judging whether a sub-cluster associated with an execution node exists according to the architecture topology information of the target cluster topology architecture to which the application scheduling task belongs, and obtaining a judging result.
In this embodiment, the target cluster topology architecture may be understood as a cluster topology architecture in which the clusters are located. Architecture topology information can be understood as information describing the relationships between clusters.
Specifically, when the executing node receives the application scheduling task, whether a subset group belonging to the next level of the current executing node exists or not can be judged according to the architecture topology information of the target cluster topology architecture, if yes, the subset group exists as a judgment result, and if not, the subset group does not exist as a judgment result.
S320, determining a scheduling result according to the judging result and the application scheduling task.
In this embodiment, the scheduling result may be understood as a result for performing resource allocation or resource binding.
Specifically, the executing node may determine whether there are sub-clusters according to the determination result, determine a scheduling result issued to each sub-cluster according to the application scheduling task when there are sub-clusters, and determine a self-binding scheduling result when there are no sub-clusters.
According to the technical scheme, the scheduling controller is added for each cluster, whether the sub-cluster associated with the execution node exists or not is judged through the scheduling controller, and the scheduling result is determined through the judging result and the application scheduling task. Through the deployed multi-cluster, the advantages of different clusters are utilized, the maximization of resource utilization is realized, the special advantages of the different clusters are exerted, and the stability and the high availability of services provided by the cluster topology architecture are realized.
Further, on the basis of the above embodiment, the step of determining the scheduling result according to the determination result and the application scheduling task may be optimized as follows:
a1, when the judgment result is that the scheduling cache information reported by each sub-cluster exists, the scheduling cache information reported by each sub-cluster is obtained.
In this embodiment, the scheduling cache information may be understood as information for collecting resource usage of the sub-clusters and corresponding cluster feature labels, where the cluster feature labels are used to indicate processing features of applications in the clusters.
It should be noted that each child cluster may send respective scheduling cache information to the parent cluster according to the information interaction frequency in the target description file, and the parent cluster may collect the scheduling cache information of each child cluster according to the information interaction frequency.
Specifically, when the judgment result is that the sub-clusters exist, the execution node can acquire the scheduling cache information reported by each sub-cluster in each created naming space.
b1, determining a target sub-cluster and sub-application scheduling tasks distributed for the target sub-cluster from all sub-clusters according to the scheduling cache information and the application scheduling tasks.
In this embodiment, the target sub-cluster may be understood as a node that may issue a sub-application scheduling task. A sub-application scheduling task may be understood as an application scheduling task for issuing to each sub-cluster.
Specifically, as more resources may be used in the sub-clusters, and the sub-clusters of the application scheduling task cannot be accepted any more, the execution node may divide the application scheduling task according to each scheduling buffer information, and determine the target sub-cluster and the sub-application scheduling task allocated to the target sub-cluster from each sub-cluster, where the scheduling controller ensures that the input type and the output type are consistent, and are all CRD resources called App.
And c1, taking the target sub-cluster as a new execution node, sending a sub-application scheduling task to the new execution node, and re-executing the judging operation of the existence of the sub-cluster.
Specifically, the executing node may take the target sub-cluster as a new executing node, send the sub-application scheduling task to the new executing node, and re-execute the judging operation of the existence of the sub-cluster, that is, re-execute step S110 through the target sub-cluster, where the application scheduling task is changed into the sub-application scheduling task.
d1, determining a scheduling result and binding resources according to an application scheduling task when the judging result is nonexistent.
Specifically, when the judgment result is that the sub-cluster does not exist, the execution node can determine a scheduling result according to the application scheduling task, preset corresponding resources for application deployment, and finally bind the resources with the application through the binder.
The step of determining the target sub-cluster and the sub-application scheduling task allocated to the target sub-cluster from the sub-clusters according to the scheduling cache information and the application scheduling task may be further optimized as follows:
screening each sub-cluster according to the scheduling cache information and the application scheduling task through a preset screening plug-in unit, and determining an intermediate sub-cluster meeting the application scheduling condition; scoring each intermediate sub-cluster through a preset scoring plug-in, and determining scoring information of each intermediate sub-cluster; and determining a target sub-cluster meeting the scoring condition from the intermediate sub-clusters based on the scoring information, and determining a sub-application scheduling task corresponding to the target sub-cluster.
In this embodiment, the preset screening plug-in may be understood as a plug-in for screening sub-clusters according to requirements, such as filters. The application scheduling condition may be understood as a condition for determining whether or not the subset group can perform application scheduling. An intermediate sub-cluster may be understood as a screened sub-cluster that may be subjected to application scheduling. The preset scoring plugin may be understood as representing the degree of matching of each sub-cluster in numerical form. The score information may be understood as information including a score value of each intermediate sub-cluster.
Specifically, a scheduler in the scheduling controller comprises a preset screening plug-in Filter, a preset scoring plug-in Score, a preset plug-in Reverse and other plug-ins related to resource binding, and the preset screening plug-in screens scheduling cache information reported by sub-clusters according to application requirements in application scheduling tasks to determine intermediate sub-clusters and corresponding intermediate sub-scheduling tasks meeting application scheduling conditions; scoring the screened intermediate sub-clusters through a preset scoring plug-in to obtain score information, and further selecting one or more intermediate sub-clusters with highest scores as target sub-clusters, wherein the determination of sub-application scheduling tasks can be carried out on each target sub-cluster according to the application scheduling task in a set determination mode, and if the determination mode can be copy scheduling based on water level.
According to the technical scheme provided by the embodiment of the invention, the cluster feature labels and the timing reporting of the resource use condition are realized through the scheduling controller, the available application scheduling basis is provided for the application scheduling link, and the foundation is laid for the subsequent acquisition of the optimal scheduling scheme. Judging whether a sub-cluster associated with the execution node exists or not, determining the sub-application scheduling task allocated to the sub-cluster through a judging result, the application scheduling task, scheduling cache information and a preset plug-in unit, and allocating a scheduling result for the sub-application scheduling task. The idempotent scheduling under different clusters is realized, the real-time performance of the scheduling is ensured, the role restriction of a single cluster is eliminated, the scheduling basis plug-in is realized, and the wide applicability of the system is improved. The scheduling speed is high, each layer of clusters is only responsible for scheduling of the current layer, resources can be infinitely expanded, mass clusters are managed, the topology structure is flexibly changed, and the scheduling plug-in units of the changeable infrastructure are flexibly matched.
For the sake of convenience in understanding the application scheduling method provided in this embodiment, taking a three-layer cluster topology architecture as an example, fig. 4 is a structural example diagram of an application scheduling method provided in a second embodiment of the present invention, as shown in fig. 4, where a first layer is a root cluster, a second layer includes branch clusters a and B, the two branch clusters are used as child clusters, the root cluster of the first layer is a parent cluster of the two child clusters, and a third layer is a leaf cluster, where the leaf cluster may be understood as a subset group of the bottom layer, and the leaf cluster is used as a subset group of the second layer branch cluster a, and then the branch cluster a is a parent cluster of the leaf cluster. The leaf cluster uploads the self scheduling cache information 1 to the branch cluster A according to the information interaction frequency, the branch cluster A uploads the self scheduling cache information 2 and the scheduling cache information 1 of the leaf cluster to the root cluster, and the branch cluster B uploads the self scheduling cache information 3 to the root cluster. Firstly, an application scheduling task is issued to a root cluster in an APP format yaml file, wherein the APP format can be: rbApps: duplicate s: component1:10. Because the root cluster has sub-clusters, the root cluster determines the sub-scheduling task 1 issued to the branch cluster a and the sub-scheduling task 2 issued to the branch cluster B through a preset plug-in unit (such as a Filter, a Score, etc.) according to the application scheduling task and the scheduling buffer information 1, the scheduling buffer information 2 and the scheduling buffer information 3, wherein the format of the sub-scheduling task is also an APP format, and the APP format may be: rbApps: clusteriname: field1replicas: component1:10. Due to the presence of the sub-clusters of the branch cluster a: and determining a sub-scheduling task 3 issued to the leaf cluster by the branch cluster A according to the sub-scheduling task 1 and the scheduling cache information 1, wherein the sub-scheduling task 3 can be rbApps-clusteriname: default replicas: child-clusteriname: clusterin 1replicas: component1: 5-clusteriname: clusterin 2 replicas: component1:5. And as the branch cluster B does not have a sub-cluster, the sub-scheduling task 2 is directly subjected to resource binding. Since the leaf clusters do not have sub-clusters, the resource binding is directly performed on the sub-scheduling task 3.
Example III
Fig. 5 shows a schematic diagram of an electronic device 40 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a Read Only Memory (ROM) 42, a Random Access Memory (RAM) 43, etc., in which the memory stores a computer program executable by the at least one processor, and the processor 41 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 42 or the computer program loaded from the storage unit 48 into the Random Access Memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 may also be stored. The processor 41, the ROM 42 and the RAM 43 are connected to each other via a bus 44. An input/output (I/O) interface 45 is also connected to bus 44.
Various components in electronic device 40 are connected to I/O interface 45, including: an input unit 46 such as a keyboard, a mouse, etc.; an output unit 47 such as various types of displays, speakers, and the like; a storage unit 48 such as a magnetic disk, an optical disk, or the like; and a communication unit 49 such as a network card, modem, wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 41 may be various general and/or special purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 41 performs the various methods and processes described above, such as applying a scheduling method.
In some embodiments, the application scheduling method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 48. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 40 via the ROM 42 and/or the communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the application scheduling method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the application scheduling method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A multiple K8s cluster management system, comprising: at least one K8s cluster and a cluster manager;
the cluster manager is used for acquiring a target description file, and constructing a cluster topology architecture of at least one topology type for the cluster according to the target description file;
wherein the object description file includes: and the parent cluster corresponding to the cluster is accessed with information and cluster relation parameter information used for establishing relation between clusters with other clusters.
2. The system of claim 1, wherein the cluster manager comprises:
the cluster distinguishing module is used for acquiring the target description file and dividing the clusters into father clusters, child clusters or independent clusters according to the cluster relation parameter information;
the information issuing module is used for generating target object deployment information of the sub-cluster according to the target description file and issuing the target object deployment information to the sub-cluster;
the cluster access module is used for controlling the sub-cluster to be accessed to the corresponding parent cluster according to the target object deployment information and the parent cluster access information to obtain the accessed sub-cluster;
and the architecture construction module is used for obtaining a cluster topology architecture of at least one topology type according to the accessed subset group, the accessed parent group and the accessed independent group.
3. The system of claim 1, wherein the cluster manager further comprises:
and the framework updating module is used for changing the cluster topology framework through the updated target description file when the updated target description file is received.
4. The system of claim 3, wherein the architecture update module is specifically configured to:
determining a cluster to be changed and a corresponding cluster relation changing mode according to the updated target description file;
and changing the cluster topology structure according to the cluster relation changing mode and the cluster to be changed.
5. The system according to claim 1, wherein a scheduling controller is disposed on the cluster, and the cluster performs resource allocation processing on the received application scheduling task through the scheduling controller.
6. An application scheduling method applied to the system of any one of claims 1-5, the method being performed by a cluster within at least one cluster topology in the system as an executing node, the method comprising:
when receiving an application scheduling task, judging whether a sub-group associated with the execution node exists according to architecture topology information of a target cluster topology architecture to which the application scheduling task belongs, and obtaining a judging result;
and determining a scheduling result according to the judging result and the application scheduling task.
7. The method of claim 6, wherein determining a scheduling result according to the determination result and the application scheduling task comprises:
when the judging result is that the sub-clusters exist, scheduling cache information reported by the sub-clusters is obtained;
determining a target sub-cluster and sub-application scheduling tasks allocated to the target sub-cluster from the sub-clusters according to the scheduling cache information and the application scheduling tasks;
taking the target sub-cluster as a new execution node, sending the sub-application scheduling task to the new execution node, and re-executing the judging operation of the existence of the sub-cluster;
and when the judging result is that the task does not exist, determining a scheduling result and binding resources according to the application scheduling task.
8. The method of claim 7, wherein determining a target sub-cluster and sub-application scheduling tasks allocated for the target sub-cluster from among the sub-clusters according to each of the scheduling cache information and the application scheduling tasks, comprises:
screening each subset group according to the scheduling cache information and the application scheduling task through a preset screening plug-in, and determining an intermediate subset group meeting the application scheduling condition;
scoring each intermediate sub-cluster through a preset scoring plug-in, and determining scoring information of each intermediate sub-cluster;
and determining a target sub-cluster meeting a scoring condition from the intermediate sub-clusters based on the scoring information, and determining a sub-application scheduling task corresponding to the target sub-cluster.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the application scheduling method of any one of claims 6-8.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the application scheduling method of any one of claims 6-8 when executed.
CN202311570219.0A 2023-11-22 2023-11-22 Multi-K8 s cluster management system, application scheduling method, equipment and medium Pending CN117424905A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311570219.0A CN117424905A (en) 2023-11-22 2023-11-22 Multi-K8 s cluster management system, application scheduling method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311570219.0A CN117424905A (en) 2023-11-22 2023-11-22 Multi-K8 s cluster management system, application scheduling method, equipment and medium

Publications (1)

Publication Number Publication Date
CN117424905A true CN117424905A (en) 2024-01-19

Family

ID=89526591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311570219.0A Pending CN117424905A (en) 2023-11-22 2023-11-22 Multi-K8 s cluster management system, application scheduling method, equipment and medium

Country Status (1)

Country Link
CN (1) CN117424905A (en)

Similar Documents

Publication Publication Date Title
US11704144B2 (en) Creating virtual machine groups based on request
CN108614726A (en) Virtual machine creation method and device
CN105703940A (en) Multistage dispatching distributed parallel computing-oriented monitoring system and monitoring method
CN111061715A (en) Web and Kafka-based distributed data integration system and method
CN112667362B (en) Method and system for deploying Kubernetes virtual machine cluster on Kubernetes
CN111694789A (en) Embedded reconfigurable heterogeneous determination method, system, storage medium and processor
Nastic et al. Polaris scheduler: Edge sensitive and slo aware workload scheduling in cloud-edge-iot clusters
EP3442201A1 (en) Cloud platform construction method and cloud platform
US20190004844A1 (en) Cloud platform construction method and cloud platform
CN113742033A (en) Kubernetes cluster federal system and implementation method thereof
CN115080436A (en) Test index determination method and device, electronic equipment and storage medium
CN111767145A (en) Container scheduling system, method, device and equipment
CN111435329A (en) Automatic testing method and device
CN111131449B (en) Method for constructing service clustering framework of water resource management system
CN105471986B (en) A kind of Constructing data center Scale Revenue Ratio method and device
CN117118982A (en) Message transmission method, device, medium and equipment based on cloud primary multi-cluster
CN117424905A (en) Multi-K8 s cluster management system, application scheduling method, equipment and medium
CN114443057B (en) Deployment of conversation model, conversation method, device, electronic equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN115361389A (en) Cloud computing instance creation method and device
CN112395269A (en) Method and device for building MySQL high-availability group
CN109450686B (en) Network resource management system and method based on pervasive network
CN112835989A (en) Single-application multi-MySQL Set deployment method and system
CN113535087A (en) Data processing method, server and storage system in data migration process
CN113407341B (en) Load object synchronization method and device based on distributed load balancing

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