Task scheduling method based on kubernetes cluster
By unifying scheduling and resource management within a physical Kubernetes cluster, the problem of poor task scheduling across multiple AI computing platforms was solved, achieving efficient task allocation and scheduling.
Patent Information
- Application Number
- CN202410473037.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-10-24
AI Technical Summary
When building multiple AI computing platforms on the same platform, existing technologies suffer from poor task scheduling and an inability to allocate suitable nodes to work units in a timely manner because each private virtual Kubernetes cluster has an independent resource management scheduler.
By deploying a second service scheduler and resource manager in the physical Kubernetes cluster, and a first service scheduler and synchronization plugin in the virtual Kubernetes cluster, unified scheduling and resource synchronization of target tasks can be achieved, avoiding a redundant resource management and scheduling system.
It improves task schedulability, ensuring that the physical Kubernetes cluster can allocate appropriate nodes to the target task in a timely manner, avoiding redundancy and chaos from multiple resource management and scheduling systems.
Smart Images

Figure CN120832209A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of cluster management, and particularly relates to a task scheduling method based on a kubernetes cluster. BACKGROUND
[0002] With the rapid development of AI artificial intelligence technology, especially in recent years, the practical availability of large models and significant results, intelligent algorithm construction has become more and more important for cloud computing, which requires cloud computing platforms to provide appropriate and efficient scheduling capabilities according to business characteristics.
[0003] At present, most AI computing power platforms are built based on kubernetes clusters. In order to maintain a certain isolation and distinction with the underlying physical kubernetes cluster, a private virtual kubernetes cluster is built based on the underlying physical kubernetes cluster, and each private virtual kubernetes cluster has a set of resource management schedulers.
[0004] Kubernetes is an open source platform for automatic deployment, scaling and operation of container clusters. Its core is how to select appropriate nodes from the cluster to allocate to a work unit. If multiple AI computing power platforms are built on the same base, multiple private virtual kubernetes clusters are needed, and since each private virtual kubernetes cluster includes a set of resource management schedulers, multiple sets of resource management scheduling systems will be redundant and chaotic, further leading to the inability to timely allocate appropriate nodes to work units, so the prior art has the technical problem of poor task schedulability. SUMMARY
[0005] The present application provides a task scheduling method based on a kubernetes cluster to solve the technical problem of poor task schedulability in the prior art.
[0006] In a first aspect, the present application provides a kubernetes cluster, comprising: a physical kubernetes cluster, and a virtual kubernetes cluster constructed based on the physical kubernetes cluster;
[0007] The virtual kubernetes cluster receives a plurality of target tasks and synchronizes them to the physical kubernetes cluster;
[0008] The physical kubernetes cluster processes the target tasks to obtain a processing result, and schedules the target tasks to a target node in the physical kubernetes cluster for processing the target tasks according to the processing result and the target node.
[0009] Optionally, the virtual kubernetes cluster is deployed with an AI computing power platform for managing the virtual kubernetes cluster, a first business scheduler comprising a first control plug-in, and a synchronization plug-in for resource synchronization;
[0010] The AI computing power platform is configured to receive a plurality of target tasks and create corresponding task set pods (podgroup) and task pods based on the plurality of target tasks;
[0011] The first business scheduler is configured to listen to the task set pods (podgroup) and modify attribute information and state information of the task set pods (podgroup) in the virtual kubernetes cluster;
[0012] The AI computing power platform is further configured to detect attribute information and state information of the task set pods (podgroup) in the virtual kubernetes cluster;
[0013] The synchronization plug-in is configured to synchronize the task set pods (podgroup) and the task pods between the virtual kubernetes cluster and the physical kubernetes cluster.
[0014] Optionally, the physical kubernetes cluster comprises a resource manager for managing nodes and a second business scheduler comprising a second control plug-in and a scheduling plug-in;
[0015] The second business scheduler is configured to listen to the task set pods (podgroup) and the task pods in the physical kubernetes cluster and modify attribute information and state information of the task set pods (podgroup) in the physical kubernetes cluster;
[0016] The resource manager is configured to obtain resource information of a plurality of nodes in the physical kubernetes cluster and report the resource information to the second business scheduler;
[0017] The second business scheduler is further configured to determine a target node for processing the task pods based on the resource information and schedule the task pods to the target node.
[0018] In a second aspect, the present application provides a task scheduling method based on a kubernetes cluster, comprising:
[0019] Synchronizing a plurality of target tasks received by a virtual kubernetes cluster to a physical kubernetes cluster;
[0020] obtaining a processing result of the target task by the physical kubernetes cluster;
[0021] According to the processing result and the target node in the physical kubernetes cluster for processing the target task, the target task is scheduled to the target node.
[0022] Optionally, the synchronizing of the plurality of target tasks received by the virtual kubernetes cluster to the physical kubernetes cluster comprises:
[0023] Based on the AI computing power platform, a plurality of target tasks are received, and a corresponding task set pod group is created for the plurality of target tasks.
[0024] When the first control plug-in listens to the task set pod group in the virtual kubernetes cluster, the task set pod group is synchronized to the physical kubernetes cluster based on the synchronization plug-in.
[0025] Optionally, after the task set pod group is synchronized to the physical kubernetes cluster based on the synchronization plug-in, comprising:
[0026] Based on the second business scheduler, initial attribute information and initial state information of the task set pod group in the virtual kubernetes cluster are obtained, and the task set pod group in the physical kubernetes cluster is modified based on the initial attribute information and the initial state information.
[0027] Based on the first business scheduler, first attribute information and first state information of the modified task set pod group in the physical kubernetes cluster are obtained.
[0028] Optionally, the obtaining of the processing result of the target task by the physical kubernetes cluster comprises:
[0029] When the scheduling plug-in listens to the task set pod group in the physical kubernetes cluster, the task set pod group is added to the target scheduling queue.
[0030] Based on the second business scheduler and the first business scheduler, the task set pod group in the physical kubernetes cluster and the virtual kubernetes cluster is processed respectively, and the processing result is determined.
[0031] Optionally, based on the second service scheduler and the first service scheduler, the task set pod group in the physical kubernetes cluster and the virtual kubernetes cluster are respectively processed, and the processing result is determined, comprising:
[0032] Based on the second service scheduler, the first attribute information and the first state information are updated to obtain the second attribute information and the second state information of the task set pod group in the physical kubernetes cluster;
[0033] Based on the synchronization plug-in, the second attribute information and the second state information are synchronized to the virtual kubernetes cluster;
[0034] Based on the second attribute information and the second state information, the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster are modified by the first service scheduler.
[0035] Optionally, based on the second attribute information and the second state information, the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster are modified by the first service scheduler, further comprising:
[0036] When the AI computing platform detects that the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster change, the corresponding task pod is created in the task set pod group based on the AI computing platform; wherein each task pod includes a target task;
[0037] Based on the synchronization plug-in, the task set pod group including the task pod is synchronized to the physical kubernetes cluster, and the second service scheduler listens to the task pod.
[0038] Optionally, according to the processing result and the target node in the physical kubernetes cluster for processing the target task, the target task is scheduled to the target node, comprising:
[0039] When the second service scheduler listens to the task pod in the physical kubernetes cluster, the resource information of multiple nodes in the physical kubernetes cluster is obtained based on the resource manager, and the resource information is reported to the second service scheduler;
[0040] determining, based on the second service scheduler, the target node for processing the task pod, scheduling the task pod to the target node.
[0041] The kubernetes cluster-based task scheduling method provided in the application includes a virtual kubernetes cluster and a physical kubernetes cluster. First, the virtual kubernetes cluster receives a plurality of target tasks submitted by a user. Second, the plurality of target tasks are synchronized to the physical kubernetes cluster. Third, the physical kubernetes cluster processes the target tasks, specifically including modifying attribute information and state information corresponding to the target tasks, and obtaining corresponding processing results. Finally, according to the processing results and node information in the physical kubernetes cluster, a target node for processing the target tasks is determined, and the target tasks are scheduled to the target node. In the entire target task scheduling process, resource management and scheduling need not be performed in the virtual kubernetes cluster, but only in the physical kubernetes cluster. Therefore, it is not necessary to separately deploy a set of resource management and scheduling system in each virtual kubernetes cluster, avoiding the redundancy and confusion that may occur in multiple sets of resource management and scheduling systems, thereby ensuring that the physical kubernetes cluster can timely allocate appropriate nodes for the target tasks, and achieving the technical effect of improving the schedulability of the tasks. BRIEF DESCRIPTION OF DRAWINGS
[0042] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0043] Figure 1 The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0044] Figure 2 The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application. Figure One ;
[0045] Figure 3 The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application. Figure Two .
[0046] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application. DETAILED DESCRIPTION
[0047] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to any embodiment of the application, unless specifically stated otherwise. It is to be understood that other embodiments can be utilized, and structural or procedural changes can be made without departing from the scope of the present application. Therefore, the following detailed description is not intended to be limiting.
[0048] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed herein is used in a non-limiting fashion and that the scope of the present application is not in any way intended to be bound by the specific ordering of terms.
[0049] In the present application, the word "exemplary" or "for example" is used to mean an example, an illustration, or another non-limiting example. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, any embodiment or design described herein as "exemplary" or "for example" is considered sufficient to perform the recited function and to achieve the combination of properties described herein.
[0050] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for the user to choose authorization or refusal.
[0051] With the rapid development of AI artificial intelligence technology, especially in recent years, the practical use of large models has been remarkable, and intelligent algorithm construction has become more and more important for cloud computing. In the AI processing process, model training is a core link; this link requires a large number of graphics processing units (GPU) or neural network processors (NPU) in different nodes or data centers to cooperate with each other to provide distributed computing power services, which requires cloud computing platforms to provide appropriate and efficient scheduling capabilities according to the characteristics of AI type services, i.e. distributed group services.
[0052] At present, most AI computing power platforms are constructed based on a kubernetes cluster, including a base physical kubernetes cluster and a private virtual kubernetes cluster; wherein, the private virtual kubernetes cluster is constructed based on the base physical kubernetes cluster in order to maintain a certain isolation and distinction with the base physical kubernetes cluster, and each private virtual kubernetes cluster has a set of resource management schedulers.
[0053] A kubernetes cluster is a collection of multiple nodes running kubernetes software, which can be physical servers, virtual machines or cloud instances; the kubernetes cluster includes Master nodes and Worker nodes, wherein the Master nodes are responsible for managing the state of the cluster and controlling the work of the Worker nodes, and the Worker nodes are responsible for running containerized applications. Through the kubernetes cluster, users can more conveniently manage and expand their applications, achieving high availability and flexibility.
[0054] If multiple AI computing power platforms are constructed on the same base, multiple private virtual kubernetes clusters are needed, and since each private virtual kubernetes cluster includes a set of resource management schedulers, multiple sets of resource management scheduling systems will be redundant and chaotic, further leading to the inability to timely allocate appropriate nodes for work units, therefore the prior art has the technical problem of poor task schedulability.
[0055] The kubernetes cluster-based task scheduling method provided in the application comprises a virtual kubernetes cluster and a physical kubernetes cluster, wherein a first service scheduler comprising a first control plug-in is deployed in the virtual kubernetes cluster, and a second service scheduler comprising a second control plug-in and a scheduling plug-in is deployed in the physical kubernetes cluster; firstly, a plurality of target tasks submitted by a user and received by the virtual kubernetes cluster are synchronized to the physical kubernetes cluster, secondly, the attribute information and the state information corresponding to the target tasks are modified by the physical kubernetes cluster, and a corresponding modification result is obtained, and finally, a target node for processing the target tasks is determined in the node of the physical kubernetes cluster, and the target tasks are scheduled to the target node based on the second service scheduler; thus, it can be seen that only the scheduling plug-in needs to be deployed in the physical kubernetes cluster to uniformly schedule the target tasks, and any virtual kubernetes cluster above the physical kubernetes cluster does not need to separately deploy a corresponding scheduling plug-in, thereby avoiding the redundancy and confusion that may occur in multiple sets of resource management and scheduling systems, so as to ensure that the physical kubernetes cluster can timely allocate appropriate nodes for the target tasks, and the technical effect of improving the schedulability of the tasks is achieved.
[0056] The technical solutions of the application and how the technical solutions of the application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the application will be described below with reference to the drawings.
[0057] Figure 1 The structure of the kubernetes cluster provided in the application is shown in the figure. Figure 1 As shown in the figure, the kubernetes cluster provided in the embodiment of the application comprises:
[0058] The physical kubernetes cluster and the virtual kubernetes cluster constructed based on the physical kubernetes cluster.
[0059] The physical kubernetes cluster includes a second service scheduler and a resource manager, the second service scheduler includes a second control plug-in and a scheduling plug-in; the resource manager is configured to acquire resource information of a plurality of nodes in the physical kubernetes cluster, and report the resource information to the second service scheduler; the second service scheduler is configured to listen to a task set pod group and a task pod in the physical kubernetes cluster, modify attribute information and state information of the task set pod group in the physical kubernetes cluster, determine a target node for processing the task pod based on the resource information, and schedule the task pod to the target node.
[0060] Specifically, the second service scheduler can adopt a volcano scheduling system, the volcano is an open source kubernetes native scheduler framework, which aims to provide higher level task scheduling and resource management functions to support large-scale machine learning workloads and other compute-intensive applications; wherein, the volcano controller and the volcano scheduler are two core components of the volcano, the volcano controller is responsible for the core capabilities of the whole task life cycle management, job queue, queue resource reservation, queue capacity, multi-tenant resource dynamic sharing, etc., and is also responsible for handling abnormal situations of tasks, and cleaning up and releasing resources after the task is completed; the volcano scheduler is a scheduler component, which can intelligently schedule tasks according to the resource requirements, priority, constraint conditions and other factors of the tasks, and allocate the tasks to available nodes to realize efficient execution of the tasks and reasonable utilization of resources. The resource manager can adopt a device plug-in deviceplugin, which is configured to manage the nodes and report the extended resources to the second service scheduler, so that the containers can identify and access the extended resources.
[0061] The physical kubernetes cluster is taken as a base, and a virtual kubernetes cluster is built on the basis of the physical kubernetes cluster, and the virtual kubernetes cluster is a full-featured kubernetes cluster running on the physical kubernetes cluster; wherein the virtual kubernetes cluster includes an AI computing power platform, a first business scheduler, a synchronization plug-in, and the first business scheduler includes a first control plug-in; the first business scheduler is used for listening to a task set podgroup and modifying attribute information and state information of the task set podgroup in the virtual kubernetes cluster; the AI computing power platform is used for receiving a target task, and creating a task podgroup and a task pod based on the target task, and is also used for detecting the attribute information and the state information of the task set podgroup in the virtual kubernetes cluster.
[0062] Specifically, the virtual kubernetes cluster can be built by using a vcluster tool, and the vcluster is a virtual kubernetes cluster management tool that can help users create multiple virtual kubernetes clusters in a single kubernetes cluster; by using the vcluster tool, one or more virtual kubernetes clusters can be created on the physical kubernetes cluster, and each virtual kubernetes cluster can have its own namespace, resource quota and network isolation, so that it is logically independent of other virtual kubernetes clusters. The synchronization plug-in can use syncer-plugin. In the kubernetes cluster, resource synchronization refers to synchronizing and replicating resources in different environments or different clusters to ensure consistency and availability between them; syncer-plugin can help users easily implement resource synchronization and replication in the kubernetes environment, and through syncer-plugin, users can define synchronization rules, configure synchronization strategies, and monitor the status and progress of the synchronization process, so as to ensure that resource data in different environments or clusters remains synchronized and avoids inconsistent or lost data.
[0063] The kubernetes cluster provided by the application includes a virtual kubernetes cluster and a physical kubernetes cluster. The virtual kubernetes cluster is deployed with an AI computing power platform, a synchronization plug-in, and a first business scheduler including a first control plug-in. The physical kubernetes cluster is deployed with a resource manager and a second business scheduler including a second control plug-in and a scheduling plug-in. First, the AI computing power platform receives a plurality of target tasks and creates a corresponding task set podgroup. Second, the synchronization plug-in synchronizes the task set podgroup to the physical kubernetes cluster, and the second business scheduler and the first business scheduler modify the attribute information and the state information of the task set podgroup in the physical kubernetes cluster and the virtual kubernetes cluster, respectively. Finally, the target node for processing the target task is determined in the node of the physical kubernetes cluster, and the target task is scheduled to the target node based on the second business scheduler. By deploying different business schedulers in the virtual kubernetes cluster and the physical kubernetes cluster, the method structure of only needing the physical kubernetes cluster to perform resource management and scheduling is achieved, and the technical effect of improving the schedulability of the task is achieved.
[0064] Figure 2 The application provides a task scheduling method based on a kubernetes cluster Figure One . As Figure 2 shown, the application embodiment provides a task scheduling method based on a kubernetes cluster, which includes:
[0065] S201, synchronizing a plurality of target tasks received by a virtual kubernetes cluster to a physical kubernetes cluster;
[0066] Specifically, the virtual kubernetes cluster is used to receive a plurality of target tasks of a user and synchronize them to the physical kubernetes cluster, and the physical kubernetes cluster processes and schedules the target tasks.
[0067] S202, obtaining a processing result of the target tasks by the physical kubernetes cluster;
[0068] Specifically, the processing operation of the physical kubernetes cluster on the target task includes modifying attribute information and state information of the target task; wherein the attribute information includes Name, Labels and Annotations, Replica quantity, Selector, control policy, environment variable, volume mounting, network configuration, security policy, etc., which can help administrators to manage and configure, and ensure that the target task can run in the kubernetes cluster as expected; the state information includes running state (such as running, stopped, abnormal, etc.), health state, readiness state, update state, monitoring index, etc.
[0069] S203, according to the processing result and the target node in the physical kubernetes cluster for processing the target task, the target task is scheduled to the target node.
[0070] It can be understood that scheduling the target task to the target node suitable for processing the target task is an important function of physical kubernetes cluster management, in the physical kubernetes cluster, the target node for processing the target task is determined by considering the resource utilization of the node, the resource demand of the target task, the health state of the node and other factors.
[0071] The kubernetes cluster-based task scheduling method provided in the application includes a virtual kubernetes cluster and a physical kubernetes cluster, receives a plurality of target tasks of users through the virtual kubernetes cluster, and synchronizes to the physical kubernetes cluster, processes the target task by the physical kubernetes cluster, and the specific processing content includes modifying the attribute information and the state information corresponding to the target task; after the modification is completed, the target node for processing the target task is determined in the node of the physical kubernetes cluster, and the target task is scheduled to the target node based on the second business scheduler; it can be seen that only the scheduling plug-in needs to be deployed on the physical kubernetes cluster to uniformly schedule the target task, and any virtual kubernetes cluster above the physical kubernetes cluster does not need to separately deploy the corresponding scheduling plug-in, avoiding the redundancy and confusion that may occur in multiple sets of resource management and scheduling systems, so as to ensure that the physical kubernetes cluster can timely allocate appropriate nodes for the target task, and realize the technical effect of improving the schedulability of the task.
[0072] Figure 3 The kubernetes cluster-based task scheduling method provided in the application Figure Two As Figure 3As shown, the embodiment of the present application provides a task scheduling method based on a kubernetes cluster, which comprises the following steps:
[0073] S301, receiving a plurality of target tasks based on an AI computing platform, and creating a corresponding task set podgroup for the plurality of target tasks;
[0074] The AI computing platform is a platform for managing and deploying artificial intelligence workloads, which can receive AI tasks submitted by users, such as PyTorchJob. PyTorchJob is a custom resource object for running PyTorch training tasks in a kubernetes cluster.
[0075] In the first example, users can submit PyTorchJob tasks through the AI computing platform, and the AI computing platform will send the PyTorchJob tasks to a virtual kubernetes cluster for running. During the running process, the AI computing platform can provide monitoring, logging, resource management and other functions to help users better manage and monitor their AI tasks.
[0076] Podgroup is a custom resource type, which can be regarded as a custom resource definition (CustomResource Definition, CRD). CRD is one of the key mechanisms for implementing custom resources and custom controllers in a kubernetes cluster. Through CRD, users can define their own resource types and specifications, and write custom controllers for these resource types to manage them.
[0077] S302, when the first control plug-in listens to the task set podgroup in the virtual kubernetes cluster, synchronizing the task set podgroup to the physical kubernetes cluster based on the synchronization plug-in;
[0078] S303, obtaining initial attribute information and initial state information of the task set podgroup in the virtual kubernetes cluster based on the second business scheduler, and modifying the task set podgroup in the physical kubernetes cluster based on the initial attribute information and the initial state information;
[0079] Specifically, only a first control plug-in responding to a task set podgroup is deployed in a first service scheduler of a virtual kubernetes cluster, and the first control plug-in is responsible for listening to the creation of the task set podgroup; after the first control plug-in listens to the task set podgroup in the virtual kubernetes cluster, an initialization operation is performed on the task set podgroup, that is, attribute information and state information of the task set podgroup are modified to obtain initial attribute information and initial state information of the task set podgroup in the virtual kubernetes cluster.
[0080] Since the physical kubernetes cluster and the virtual kubernetes cluster belong to two different running environments, the attribute information and the state information of the task set podgroup in the physical kubernetes cluster need to be modified to keep the manifestation of the task set podgroup consistent in the two kubernetes clusters; wherein the initial attribute information and the initial state information of the task set podgroup in the virtual kubernetes cluster are obtained through the second service scheduler, so that the physical kubernetes cluster knows that the attribute and the state of the task set podgroup in the virtual kubernetes cluster have changed.
[0081] S304, based on the first service scheduler, obtaining the first attribute information and the first state information of the task set podgroup in the physical kubernetes cluster after modification;
[0082] S305, when the scheduling plug-in listens to the task set podgroup in the physical kubernetes cluster, adding the task set podgroup to a target scheduling queue; based on the second service scheduler, updating the first attribute information and the first state information to obtain second attribute information and second state information of the task set podgroup in the physical kubernetes cluster;
[0083] S306, based on the synchronization plug-in, synchronizing the second attribute information and the second state information to the virtual kubernetes cluster; based on the second attribute information and the second state information, modifying the initial attribute information and the initial state information of the task set podgroup in the virtual kubernetes cluster through the first service scheduler;
[0084] In the second example, the second service scheduler deploys all components of the volcano (including the volcano controller and the volcano scheduler), the second service scheduler listens to the task set pod group synchronized from the virtual kubernetes cluster to the physical kubernetes cluster through the syncer-plugin, and then processes the task set pod group to change its attribute information and state information; the syncer-plugin will perform the change to the virtual kubernetes, and according to the performance, modify the initial attribute information and initial state information of the task set pod group in the virtual kubernetes cluster through the first service scheduler. In the whole process, the syncer-plugin listens to the task set pod group in the physical kubernetes cluster and the virtual kubernetes cluster at all times, and then synchronizes the state and modifies the resource attributes as required.
[0085] S307, when the AI computing platform detects that the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster change, the AI computing platform creates corresponding task pods in the task set pod group based on the AI computing platform; wherein each task pod includes a target task;
[0086] Specifically, the AI computing platform will regularly detect the attributes and states of the task set pod group, and once it finds that the attributes and states of the task set pod group have changed, the AI computing platform will identify the changes and trigger the corresponding events; in addition, the AI computing platform will also monitor the creation process of the task pod to ensure its normal startup and operation.
[0087] S308, based on the synchronization plug-in, synchronize the task set pod group including the task pod to the physical kubernetes cluster, and based on the second service scheduler, listen to the task pod;
[0088] S309, when the second service scheduler listens to the task pod in the physical kubernetes cluster, based on the resource manager, obtain the resource information of multiple nodes in the physical kubernetes cluster, and report the resource information to the second service scheduler;
[0089] S310, based on the second service scheduler, determine the target node for processing the task pod, and schedule the task pod to the target node.
[0090] Specifically, the resource manager is responsible for registering device resources on the node, and periodically reporting the usage and availability information of the device resources to the second service scheduler; when the second service scheduler listens to the task pod in the physical kubernetes cluster, it will determine the appropriate target node according to the resource requirement, priority, constraint condition and other information of the task pod, combined with the usage and availability information of the device resources.
[0091] The task scheduling method based on the kubernetes cluster provided in the application first receives a plurality of target tasks provided by a user based on an AI computing platform, and creates a corresponding task set podgroup for the plurality of target tasks; secondly, the task set podgroup is synchronized to the physical kubernetes cluster based on a synchronization plug-in, and the attribute information and state information of the task set podgroup in the physical kubernetes cluster and the virtual kubernetes cluster are modified by the second service scheduler and the first service scheduler respectively; thirdly, when the AI computing platform detects that the task set podgroup in the virtual kubernetes cluster changes, the corresponding task pod is created in the task set podgroup, and the task pod is synchronized to the physical kubernetes cluster; finally, the target node for processing the target task is determined in the node of the physical kubernetes cluster, and the target task is scheduled to the target node based on the second service scheduler; by deploying different service schedulers in the virtual kubernetes cluster and the physical kubernetes cluster, the method structure that only the physical kubernetes cluster needs to perform resource management and scheduling is achieved, that is, in the whole target task scheduling process, resource management and scheduling do not need to be performed in the virtual kubernetes cluster, but only in the physical kubernetes cluster, avoiding the redundancy and confusion that may occur in multiple sets of resource management and scheduling systems, so as to ensure that the physical kubernetes cluster can timely allocate appropriate nodes for the target task, and the technical effect of improving the schedulability of the task is achieved.
[0092] It should be noted that, for each of the foregoing method embodiments, in order to simply describe, it is expressed as a series of action combinations, but those skilled in the art should know that the application is not limited by the order of the described actions, because according to the application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily necessary for the application.
[0093] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0094] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0095] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present application may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.
[0096] If the integrated unit / module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.
[0097] If the integrated units / modules are implemented in the form of software program modules and sold or used as independent products, they can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a number of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the present application. The aforementioned memory includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0098] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.
[0099] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains or can relate. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the application are indicated by the following claims.
[0100] It should be understood that the application is not limited to the precise construction that has been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.
Claims
1. A kubernetes cluster, characterized in that, The method comprises: a physical Kubernetes cluster and a virtual Kubernetes cluster built based on the physical Kubernetes cluster; the virtual Kubernetes cluster receives a plurality of target tasks and synchronizes to the physical Kubernetes cluster; the physical Kubernetes cluster processes the target tasks to obtain a processing result, and schedules the target tasks to a target node in the physical Kubernetes cluster according to the processing result and the target node.
2. The kubernetes cluster of claim 1, wherein, The virtual Kubernetes cluster deploys an AI computing power platform for managing the virtual Kubernetes cluster, a first business scheduler comprising a first control plug-in, and a synchronization plug-in for resource synchronization; The AI computing power platform is configured to receive a plurality of target tasks and create corresponding task set pods and task pods based on the plurality of target tasks; The first business scheduler is configured to listen to the task set pods and modify attribute information and state information of the task set pods in the virtual Kubernetes cluster; The AI computing power platform is further configured to detect the attribute information and the state information of the task set pods in the virtual Kubernetes cluster; The synchronization plug-in is configured to synchronize the task set pods and the task pods between the virtual Kubernetes cluster and the physical Kubernetes cluster.
3. The kubernetes cluster of claim 2, wherein, The physical Kubernetes cluster comprises a resource manager for managing nodes and a second business scheduler comprising a second control plug-in and a scheduling plug-in; The second business scheduler is configured to listen to the task set pods and the task pods in the physical Kubernetes cluster and modify attribute information and state information of the task set pods in the physical Kubernetes cluster; The resource manager is configured to obtain resource information of a plurality of nodes in the physical Kubernetes cluster and report the resource information to the second business scheduler; The second business scheduler is further configured to determine a target node for processing the task pods based on the resource information and schedule the task pods to the target node.
4. A task scheduling method based on a kubernetes cluster, characterized in that, The method comprises: synchronizing a plurality of target tasks received by a virtual Kubernetes cluster to a physical Kubernetes cluster; obtaining a processing result of the target tasks by the physical Kubernetes cluster; scheduling the target tasks to a target node in the physical Kubernetes cluster according to the processing result and the target node.
5. The method of claim 4, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps:
6. The method of claim 5, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps:
7. The method of claim 6, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps:
8. The method of claim 7, wherein, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The method comprises the 9. The method of claim 8, wherein, The first business scheduler modifies the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster based on the second attribute information and the second state information, and the modification further includes: When the AI computing platform detects that the initial attribute information and the initial state information of the task set pod group in the virtual kubernetes cluster change, the AI computing platform creates a corresponding task pod in the task set pod group based on the AI computing platform; wherein each task pod includes a target task; The task set pod group including the task pod is synchronized to the physical kubernetes cluster based on the synchronization plug-in, and the task pod is listened to based on the second business scheduler.
10. The method of claim 9, wherein, The target task is scheduled to the target node according to the processing result and the target node in the physical kubernetes cluster for processing the target task, including: When the second business scheduler listens to the task pod in the physical kubernetes cluster, the resource information of multiple nodes in the physical kubernetes cluster is obtained based on the resource manager, and the resource information is reported to the second business scheduler; The target node for processing the task pod is determined based on the second business scheduler, and the task pod is scheduled to the target node.