Kubernetes optimization scheduling method and system based on running virtual machines in containers

By intercepting virtual machine object creation requests in Kubernetes, adjusting the oversold ratio and optimizing resource allocation, and combining preselecting and preferred algorithms to filter nodes, the problem of resource waste in the Kubernetes scheduling algorithm is solved, and more efficient resource utilization is achieved.

CN115756727BActive Publication Date: 2025-08-26SUZHOU SICUI IND INTERNET TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211370892.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2025-08-26
Estimated Expiration
2042-11-03

AI Technical Summary

Technical Problem

The existing Kubernetes scheduling algorithm does not consider the node resource utilization rate, resulting in resource waste, and a fixed oversold ratio leads to unreasonable resource allocation.

Method used

Intercept virtual machine object creation requests through Admission Webhook, use metrics server to obtain resource usage, adjust the oversold ratio and optimize resource requests, filter cluster nodes in combination with pre-selected and preferred algorithms, and schedule to run to the most suitable node.

Benefits of technology

Optimize resource allocation, avoid waste of node resources, improve resource utilization, and ensure normal business operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756727B_ABST
    Figure CN115756727B_ABST
Patent Text Reader

Abstract

The present invention discloses a Kubernetes optimization scheduling method and system based on running a virtual machine in a container, relating to the technical field of container orchestration. The method intercepts a request for applying to create a virtual machine object through an Admission Webhook in Kubernetes, analyzes the KubeVirt resource allocation situation according to the resource usage of an existing virtual machine pod through the Admission Webhook, modifies the overselling ratio of the kubevirt configuration through the Admission Webhook under the condition that the virtual machine resources remain unchanged, calculates the resource request quantity of the virtual machine object according to the modified overselling ratio, modifies the configuration of the virtual object, resets the resource request quantity of the virtual machine pod, releases the request for creating the virtual machine object and creates the virtual machine object, creates a corresponding virtual machine pod according to the virtual machine object, and uses a cluster scheduler to sequentially select cluster nodes using a pre-selection algorithm and an optimization algorithm, and schedules the virtual machine pod to run on the selected cluster nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention discloses a method and system, which relate to the technical field of container orchestration, and specifically a Kubernetes optimization scheduling method and system based on running virtual machines in containers. Background Art

[0002] Kubernetes is a portable, extensible, open-source platform. As the current mainstream container management platform, Kubernetes is used to manage containerized workloads and services, facilitating declarative configuration and automation. A pod is the smallest deployable computing unit that can be created and managed in Kubernetes. It is a group of one or more containers.

[0003] When using Kubernetes scheduling to allocate nodes to virtual machine pods created by Kubevirt, the following problems often occur: the existing scheduling algorithm does not consider the utilization of node resources, and the fixed overselling ratio when configuring pod resource requests and virtual machine resource requests can easily lead to waste of node resources. Summary of the Invention

[0004] In response to the problems of the prior art, the present invention provides a Kubernetes optimization scheduling method and system based on running virtual machines in containers, which can reasonably allocate computer resources to virtual machines running in containers, and can intervene in the container scheduling stage according to the usage of node resources to avoid wasting Kubernetes node resources.

[0005] The specific scheme proposed by the present invention is:

[0006] The present invention provides a Kubernetes optimization scheduling method based on running virtual machines in containers. The method intercepts requests for creating virtual machine objects through the Admission Webhook in Kubernetes, obtains the resource usage of the existing virtual machine pod through the metrics server, and uses the following formula based on the resource usage of the existing virtual machine pod through the Admission Webhook:

[0007]

[0008] Analyze KubeVirt resource allocation, x k is the actual resource used by the k-th virtual machine Pod, y kThe resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset.

[0009] Release the request to create a virtual machine object, create the virtual machine object, and create the corresponding virtual machine pod based on the virtual machine object. The cluster scheduler uses the pre-selection algorithm and the optimization algorithm to screen the cluster nodes in turn. The optimization algorithm uses the following formula:

[0010]

[0011] Filter cluster nodes, x i ′ is the remaining i-th type of resources in the cluster node, y i ′ The i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the virtual machine Pod is scheduled to run on the cluster node with the highest score.

[0012] Furthermore, in the Kubernetes optimization scheduling method based on running a virtual machine in a container, the Kubernetes apiserver receives a request from a client to create a virtual machine object.

[0013] Define an admission webhook of the MutatingAdmissionWebhook type to intercept requests to create virtual machine objects.

[0014] Furthermore, the release of the request to create a virtual machine object in the Kubernetes optimization scheduling method based on running a virtual machine in a container includes:

[0015] The new virtual machine object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine instance object. The new virtual machine instance object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine Pod.

[0016] Furthermore, the Kubernetes optimization scheduling method based on running a virtual machine in a container uses a preselection algorithm to select cluster nodes through the cluster scheduler, including:

[0017] Use the pre-selection algorithm to filter out useless cluster nodes, specifically:

[0018] Check whether the free resources on the cluster node are less than the resources required by the virtual machine Pod. If so, filter out the cluster node.

[0019] Check whether the cluster node uses storage volumes. If the virtual machine Pod defines storage volumes but cannot use the storage volumes of the cluster node, filter out the cluster node.

[0020] Check the load of the cluster nodes, and filter out the cluster nodes if the load exceeds a preset threshold.

[0021] The present invention also provides a Kubernetes optimization scheduling system based on running virtual machines in containers, including an interception module, a creation module, a screening module and a scheduling module.

[0022] The interception module intercepts requests to create virtual machine objects through the Admission Webhook in Kubernetes, obtains the resource usage of existing virtual machine pods through the metrics server, and uses the following formula based on the resource usage of existing virtual machine pods through the Admission Webhook:

[0023]

[0024] Analyze KubeVirt resource allocation, x k is the actual resource used by the k-th virtual machine Pod, y k The resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset.

[0025] The interception module releases the request to create a virtual machine object, the creation module creates the virtual machine object, and creates the corresponding virtual machine pod according to the virtual machine object.

[0026] The screening module uses the pre-selection algorithm and the optimization algorithm to screen cluster nodes through the cluster scheduler. The optimization algorithm uses the following formula:

[0027]

[0028] Filter cluster nodes, x i ′ is the remaining i-th type of resources in the cluster node, yi ′ is the i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the scheduling module schedules the virtual machine Pod to the cluster node with the highest score to run.

[0029] Furthermore, the interception module in the Kubernetes optimization scheduling system based on running a virtual machine in a container receives a request from a client to create a virtual machine object through the Kubernetes apiserver.

[0030] Define an admission webhook of the MutatingAdmissionWebhook type to intercept requests to create virtual machine objects.

[0031] Furthermore, in the Kubernetes optimization scheduling system based on running a virtual machine in a container, the interception module releases a request to create a virtual machine object, and when the creation module creates the virtual machine object, it includes:

[0032] The new virtual machine object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine instance object. The new virtual machine instance object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine Pod.

[0033] Furthermore, the screening module in the Kubernetes optimization scheduling system based on running virtual machines in containers screens cluster nodes using a preselection algorithm through the cluster scheduler, including:

[0034] Use the pre-selection algorithm to filter out useless cluster nodes, specifically:

[0035] Check whether the free resources on the cluster node are less than the resources required by the virtual machine Pod. If so, filter out the cluster node.

[0036] Check whether the cluster node uses storage volumes. If the virtual machine Pod defines storage volumes but cannot use the storage volumes of the cluster node, filter out the cluster node.

[0037] Check the load of the cluster nodes, and filter out the cluster nodes if the load exceeds a preset threshold.

[0038] The benefits of the present invention are:

[0039] The present invention provides a Kubernetes optimization scheduling method based on running virtual machines in containers, which can adjust the overselling ratio of virtual machines in real time to avoid waste of node resources, and can optimize the scheduling algorithm based on the utilization of node resources, greatly improving the utilization of node resources and ensuring the normal operation of the business. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 This is a schematic diagram of the process of creating a virtual machine Pod in the existing technology.

[0042] Figure 2 This is a schematic diagram of the virtual machine Pod creation process of the method of the present invention. DETAILED DESCRIPTION

[0043] Nouns involved in the present invention:

[0044] The Scheduler is the default scheduler for Kubernetes clusters. It uses the Kubernetes Watch mechanism to discover newly created pods in the cluster that have not yet been scheduled to nodes. Based on a specific scheduling algorithm and policy, the Scheduler schedules each unscheduled pod to a suitable node, ensuring more efficient and effective utilization of cluster resources. The scheduling process consists of two phases: filtering and scoring. The filtering phase pre-selects nodes, iterating through all nodes and selecting those that meet the criteria based on the filtering policy. These nodes are then added to a set. The filtering policy applies a series of filters to each node to determine if it meets the criteria, such as checking disk, host, available ports, node labels, CPU and memory resources, and service affinity, to select all eligible nodes. The scoring phase assigns a score to each node based on a series of optimization policies. The node with the highest score is then identified and the pod is scheduled to that node.

[0045] Metrics Server is an aggregator of core monitoring data of the Kubernetes cluster. Metrics data can be obtained through the Metrics interface. Metrics Server can also be used in conjunction with the Kubectl tool to provide the kubectltop command to display the indicator data in the cluster.

[0046] An admission webhook (admission controller) is a piece of code that intercepts requests to the Kubernetes API server before objects are persisted, allowing them to proceed after authentication and authorization. Two types of admission webhooks can be defined: validating admission webhooks and mutating admission webhooks. If mutating admission is enabled, when creating a Kubernetes resource object, the creation request is sent to the controller, where the appropriate action can be taken.

[0047] Kubevirt is a virtual machine management plugin for Kubernetes. Its purpose is to provide a common foundation for virtualization solutions based on Kubernetes. Kubevirt extends Kubernetes by adding additional virtualization resource types (particularly VM types) through Kubernetes' custom resource definition interface. By using this mechanism, the Kubernetes interface can manage these VM resources along with all other resources provided by Kubernetes. Kubevirt includes the virt-api, virt-controller, virt-operator, virt-handle, and virt-launcher components.

[0048] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.

[0049] The present invention provides a Kubernetes optimization scheduling method based on running virtual machines in containers. The method intercepts requests for creating virtual machine objects through the Admission Webhook in Kubernetes, obtains the resource usage of the existing virtual machine pod through the metrics server, and uses the following formula based on the resource usage of the existing virtual machine pod through the Admission Webhook:

[0050]

[0051] Analyze KubeVirt resource allocation, x k is the actual resource used by the k-th virtual machine Pod, y kThe resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset.

[0052] Release the request to create a virtual machine object, create the virtual machine object, and create the corresponding virtual machine pod based on the virtual machine object. The cluster scheduler uses the pre-selection algorithm and the optimization algorithm to screen the cluster nodes in turn. The optimization algorithm uses the following formula:

[0053]

[0054] Filter cluster nodes, x i ′ is the remaining i-th type of resources in the cluster node, y i ′ The i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the virtual machine Pod is scheduled to run on the cluster node with the highest score.

[0055] The method of the present invention solves the problem that existing scheduling algorithms do not consider the utilization rate of node resources and the fixed overselling ratio, resulting in node resource waste, and overcomes existing technical defects. In specific applications, in some embodiments of the method of the present invention, after receiving a request to create a virtual machine through the Kubernetes apiserver, a virtual machine object will be created. However, before creating the virtual machine object, the usage of resources in the existing virtual machine pod is obtained through the metrics server. The KubeVirt resource allocation ratio is modified according to the virtual machine pod resource usage through the admission webhook to achieve resource overselling and modify the requested resource quantity of the virtual machine object. The steps can be referred to as follows:

[0056] Step S00: define an admission webhook of the mutating admission webhook type to intercept requests for creating a virtual machine object;

[0057] Step S01: The kubernetes client initiates a request to create a virtual machine, and the kubernetes apiserver receives the request;

[0058] Step S02: After the admission webhook intercepts the request, the controller uses the metrics server to obtain the resource usage of the existing virtual machine pods in the cluster. It then calculates the utilization of the virtual machine resources based on the resource amount requested by the pods. The utilization calculation algorithm uses the following formula:

[0059]

[0060] Analyze KubeVirt resource allocation, x k is the actual resource used by the k-th virtual machine Pod, y k The resources requested for the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster;

[0061] Step S03: If the v utilization is less than 1, the admission webhook calculates and modifies the oversold ratio in the kubevirt configuration, reduces the resources allocated to the virtual machine pod while ensuring that the virtual machine resources remain unchanged, and applies for resources for the virtual machine pod according to the new oversold ratio in the kubevirt configuration when the virtual machine is created next time;

[0062] Step S04: At the same time, the Admission Webhook calculates the resource request quantity of the virtual machine object based on the new oversold ratio, modifies the configuration of the virtual object, and resets the resource request quantity of the virtual machine Pod;

[0063] Step S05: After the modification is completed, the request is released and a virtual machine object is created.

[0064] The method of the present invention uses the cluster scheduler to sequentially select cluster nodes using the pre-selection algorithm and the optimization algorithm. The specific steps can be referred to as follows:

[0065] Step S06: The cluster scheduler uses the "watch" monitoring mechanism to track and check the relevant changes on the Kubernetes apiserver. If the current Pod object is not scheduled to any node, the Pod object is scheduled to a Node node for execution.

[0066] When a virtual machine Pod requests resources from a Node, the more similar the remaining resources of the node are to the requested resources, the fewer pods the node can host. The higher the node load, the fewer pods the node can host. Therefore, in the pre-selection phase of the scheduling algorithm, nodes with high loads are filtered out. In the optimization phase, nodes are scored based on the similarity between the remaining resources of the node and the requested resources. The lower the similarity, the higher the score.

[0067] Step S07: Filter useless Node nodes through a pre-selection algorithm. Specifically, the pre-selection algorithm includes:

[0068] Step S071: Check whether the free resources on the node are greater than the resources required by the Pod. If less, filter out the node.

[0069] Step S072: Check whether the node can use the storage volume. If the Pod defines a storage volume and the storage volume cannot be used, filter out the node.

[0070] Step S073: Check the load of the node. If the load exceeds a preset threshold, indicating that the load is too high, the node is filtered out.

[0071] Furthermore, step S08: screening the nodes using an optimization algorithm, including:

[0072] Step S081: Calculate the similarity between the remaining resources of each node and the resources requested by the Pod. The higher the similarity, the lower the score is given to the node. The node with the highest score is selected for scheduling.

[0073] Step S082: If there are multiple nodes with the highest scores, randomly select a node with the highest score and bind the Pod to it.

[0074] Among them, the optimization algorithm includes the scoring formula:

[0075]

[0076] Filter cluster nodes, x i ′ is the remaining i-th type of resources in the cluster node, y i ′ is the i-th type of resource requested by the virtual machine Pod from the cluster node, and score is the similarity score between the remaining resources of type m of the cluster node and the requested resources. The lower the similarity, the higher the score.

[0077] Step S09: Schedule the virtual machine pod to run on the cluster node to which it is bound through the Scheduler.

[0078] The method of the present invention can reasonably allocate computer resources to virtual machines running in containers, and the scheduler can intervene in the scheduling pre-selection stage and the optimization stage according to the usage of node resources to avoid wasting Kubernetes node resources, thereby realizing Kubernetes scheduling optimization based on virtual machines running in containers.

[0079] The present invention also provides a Kubernetes optimization scheduling system based on running virtual machines in containers, including an interception module, a creation module, a screening module and a scheduling module.

[0080] The interception module intercepts requests to create virtual machine objects through the Admission Webhook in Kubernetes, obtains the resource usage of existing virtual machine pods through the metrics server, and uses the following formula based on the resource usage of existing virtual machine pods through the Admission Webhook:

[0081]

[0082] Analyze KubeVirt resource allocation, x k is the actual resource used by the k-th virtual machine Pod, y k The resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset.

[0083] The interception module releases the request to create a virtual machine object, the creation module creates the virtual machine object, and creates the corresponding virtual machine pod according to the virtual machine object.

[0084] The screening module uses the pre-selection algorithm and the optimization algorithm to screen cluster nodes through the cluster scheduler. The optimization algorithm uses the following formula:

[0085]

[0086] Filter cluster nodes, x i ′ is the remaining i-th type of resources in the cluster node, y i ′ is the i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the scheduling module schedules the virtual machine Pod to the cluster node with the highest score to run.

[0087] The information interaction, execution process, etc. between the modules in the above system are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention and will not be repeated here.

[0088] Similarly, the system of the present invention can adjust the overselling ratio of virtual machines in real time to avoid wasting node resources, and can optimize the scheduling algorithm based on the utilization of node resources, greatly improving the utilization of node resources and ensuring the normal operation of the business.

[0089] It should be noted that not all steps and modules in the above-mentioned processes and system structures are required, and certain steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by certain components in multiple independent devices.

[0090] The above embodiments are merely preferred embodiments for the purpose of fully illustrating the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are within the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the claims.

Claims

1. A Kubernetes optimization scheduling method based on running virtual machines in containers, characterized by The Admission Webhook in Kubernetes intercepts requests to create virtual machine objects, obtains the resource usage of existing virtual machine pods through the metrics server, and uses the following formula based on the resource usage of existing virtual machine pods through the Admission Webhook: , Analyze KubeVirt resource allocation, The resources actually used by the k-th virtual machine Pod, The resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset. Release the request to create a virtual machine object, create the virtual machine object, and create the corresponding virtual machine pod according to the virtual machine object. The cluster scheduler uses the pre-selection algorithm and the optimization algorithm to screen the cluster nodes in turn. Use the pre-selection algorithm to filter out useless cluster nodes, specifically: Check whether the free resources on the cluster node are less than the resources required by the virtual machine Pod. If so, filter out the cluster node. Check whether the cluster node uses storage volumes. If the virtual machine Pod defines storage volumes but cannot use the storage volumes of the cluster node, filter out the cluster node. Check the load of cluster nodes, and filter out the cluster nodes if the load exceeds a preset threshold; The preferred algorithm utilizes the following formula: , Filter cluster nodes, The remaining i-th type of resources of the cluster nodes, The i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the virtual machine Pod is scheduled to run on the cluster node with the highest score.

2. A Kubernetes optimization scheduling method based on running a virtual machine in a container according to claim 1, characterized in that Receive the client's request to create a virtual machine object through the Kubernetes apiserver, Define an admission webhook of the MutatingAdmissionWebhook type to intercept requests to create virtual machine objects.

3. A Kubernetes optimization scheduling method based on running a virtual machine in a container according to claim 1, characterized in that The releasing of the request to create a virtual machine object, when creating a virtual machine object, includes: The new virtual machine object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine instance object. The new virtual machine instance object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine Pod.

4. A Kubernetes optimization scheduling system based on running virtual machines in containers, characterized by Including interception module, creation module, screening module and scheduling module, The interception module intercepts requests to create virtual machine objects through the Admission Webhook in Kubernetes, obtains the resource usage of existing virtual machine pods through the metrics server, and uses the following formula based on the resource usage of existing virtual machine pods through the Admission Webhook: , Analyze KubeVirt resource allocation, The resources actually used by the k-th virtual machine Pod, The resources requested by the k-th virtual machine Pod, v is the average utilization of resources in the virtual machine Pod, and n is the total number of virtual machines in the cluster. When v is less than 1, under the condition that the virtual machine resources remain unchanged, the oversold ratio of the kubevirt configuration is modified through the Admission Webhook. The resource request quantity of the virtual machine object is calculated based on the modified oversold ratio, the configuration of the virtual object is modified, and the resource request quantity of the virtual machine Pod is reset. The interception module releases the request to create a virtual machine object, the creation module creates the virtual machine object, and creates the corresponding virtual machine pod according to the virtual machine object. The screening module uses the pre-selection algorithm and the optimization algorithm to screen cluster nodes through the cluster scheduler. The screening module filters useless cluster nodes through a pre-selection algorithm, specifically: Check whether the free resources on the cluster node are less than the resources required by the virtual machine Pod. If so, filter out the cluster node. Check whether the cluster node uses storage volumes. If the virtual machine Pod defines storage volumes but cannot use the storage volumes of the cluster node, filter out the cluster node. Check the load of cluster nodes, and filter out the cluster nodes if the load exceeds a preset threshold; The screening module uses the following formula through the optimization algorithm: , Filter cluster nodes, The remaining i-th type of resources of the cluster nodes, is the i-th type of resource requested by the virtual machine Pod from the cluster node, score is the similarity score between the m-type remaining resources of the cluster node and the requested resources, and the scheduling module schedules the virtual machine Pod to the cluster node with the highest score to run.

5. A Kubernetes optimization scheduling system based on running virtual machines in containers according to claim 4, characterized in that The interception module receives the client's request to create a virtual machine object through the Kubernetes apiserver. Define an admission webhook of the MutatingAdmissionWebhook type to intercept requests to create virtual machine objects.

6. A Kubernetes optimization scheduling system based on running virtual machines in containers according to claim 4, characterized in that The interception module releases the request to create a virtual machine object, and when the creation module creates the virtual machine object, it includes: The new virtual machine object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine instance object. The new virtual machine instance object is monitored by virt-controller, and the kubernetes apiserver is called to create the corresponding virtual machine Pod.

Citation Information

Patent Citations

  • Cloud resource scheduling method and system based on Kubernetes

    CN113918270A

  • Active assurance for virtualized services

    US20220158926A1