A Kubernetes-oriented complex service deployment and scheduling method
By tagging Kubernetes Pods and building optimization models, the resource and communication needs of complex services are addressed, enabling efficient Pod deployment and migration, and improving service quality and resource utilization efficiency.
Patent Information
- Application Number
- CN202211378010.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-11-04
AI Technical Summary
Existing Kubernetes schedulers fail to adequately consider the local resource and communication requirements of the applications that make up complex services when deploying and scheduling them, resulting in a decline in service quality.
By labeling Pods of the same application with the same tag, a service deployment optimization model is established. Considering resource constraints such as CPU, memory, uplink bandwidth, and downlink bandwidth, a 0-1 integer linear programming model is used to solve for the optimal deployment scheme. During operation, node resources are monitored and dynamically migrated to optimize Pod deployment and scheduling.
It enables the reasonable deployment and migration of Pods based on optimization goals, meets the resource requirements of complex services, improves service quality, and enhances resource utilization efficiency.
Smart Images

Figure CN115664988B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of virtual machine container cloud, and particularly relates to a Kubernetes-oriented complex service deployment and scheduling method. BACKGROUND
[0002] At present, with the development of application scenarios and businesses, services become more and more complex. The processing of a complex business often needs multiple functional modules / services to cooperate to complete. At the same time, with the progress of technology, services also show an integrated trend, and the corresponding service deployment and management need to treat services with mutual correlation as a whole, that is, a complex service, for processing, and such a complex service is composed of a plurality of Pods.
[0003] The service management technology of Kubernetes is designed for a single Pod, and the service deployment of Kubernetes is realized through a scheduler. The original scheduler deploys each Pod to a node with more remaining CPU and memory resources in turn according to the resource usage of the system. When a complex service composed of a plurality of application programs needs to be deployed, the original scheduler still deploys these single Pods as independent individuals in turn, which may lead to the fact that the communication demand relationship between single Pods cannot be met, thereby affecting the service quality of the entire service. Similarly, when the system is running, the original scheduler also schedules these single Pods as independent individuals.
[0004] Therefore, there is a lack of a Kubernetes-oriented complex service deployment and scheduling method, which fully considers the local resource demand and communication demand of application programs constituting a complex service, and deploys and migrates Pods according to an optimization target, so as to ensure that the resource demand of the service is met and the service quality is improved. SUMMARY
[0005] The technical problem to be solved by the application is to provide a Kubernetes-oriented complex service deployment and scheduling method, which has simple method steps and reasonable design, fully considers the local resource demand and communication demand of application programs constituting a complex service, and deploys and migrates Pods according to an optimization target, so as to ensure that the resource demand of the service is met and the service quality is improved.
[0006] To solve the above technical problems, the technical solution adopted by the application is: a Kubernetes-oriented complex service deployment and scheduling method, characterized in that the complex service involves a plurality of nodes, the complex service corresponds to an application program and contains a plurality of Pods, and the method is characterized by:
[0007] Step 1: Set labels for Pods in the application program:
[0008] Step 101: Tag Pods belonging to the same application with the same label to obtain the same set of Pods;
[0009] Step 102: Set the total number of nodes to N; where N is a positive integer;
[0010] Step 103: Record the same set of Pods of the application to be deployed as the set of Pods to be deployed;
[0011] Step 2: Establish a service deployment optimization model for the collection of Pods to be deployed:
[0012] Establish a service deployment optimization model; wherein, the service deployment optimization model includes the service deployment optimization objective and the service deployment resource constraints, the service deployment resource constraints include parameters such as CPU, memory, uplink bandwidth and downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model;
[0013] Step 3: Solve the service deployment optimization model. If the optimal service deployment scheme is obtained, proceed to Step 4; otherwise, if the optimal service deployment scheme is not obtained, continue to loop through Steps 2 and 3 and wait for the next deployment. The optimal service deployment scheme includes the nodes deployed by each Pod in the Pod set.
[0014] Step 4: Deploy the set of Pods to be deployed according to the optimal service deployment plan;
[0015] Step 5: Monitor the resource capacity of N nodes during the operation of multiple applications to migrate the service deployment plan for dynamic scheduling.
[0016] The aforementioned method for deploying and scheduling complex services for Kubernetes is characterized in that: in step 103, the set of Pods to be deployed, K, is {Pod1,...,Pod...} k ,...,Pod K}, Pod k Let k represent the k-th Pod, where k and K are both positive integers and 1 ≤ k ≤ K;
[0017] The node set N includes N nodes and is {Note1,...,Note...} i Note N Note i Let i represent the i-th node, where i and N are both positive integers and 1 ≤ i ≤ N.
[0018] The above-mentioned method for deploying and scheduling complex services for Kubernetes is characterized in that: the optimization objective of service deployment in step two is to minimize the number of deployment nodes or to minimize the distance between deployment nodes;
[0019] The resource constraint conditions of the service deployment in step two include CPU resource constraint, memory resource constraint, uplink bandwidth constraint and downlink bandwidth constraint.
[0020] The Kubernetes-oriented complex service deployment and scheduling method has the characteristics that when the optimization target of the service deployment is the minimum number of deployment nodes, a service deployment optimization model is established, and the specific process is as follows:
[0021]
[0022] Wherein, min represents the minimum value, s.t. represents the constraint condition, Y i represents the occupation state of the service deployment of the i th node, and Y i ∈{0, 1}, Y i = 1, indicating that the i th node service deployment is occupied; Y i = 0, indicating that the i th node service deployment is not occupied.
[0023] X ik represents the state of whether the k th Pod is deployed to the i th node, and X ik ∈{0, 1}, X ik = 1, indicating that the k th Pod is deployed to the i th node; X ik = 0, indicating that the k th Pod is not deployed to the i th node.
[0024] Nc i represents the CPU available capacity of the i th node, Ns i represents the memory available capacity of the i th node, Nu i represents the uplink bandwidth available capacity of the i th node, Nd i represents the downlink bandwidth available capacity of the i th node; Pc k represents the CPU demand capacity of the k th Pod, Ps k represents the memory demand capacity of the k th Pod, Pu k represents the uplink bandwidth demand capacity of the k th Pod, Pd k represents the downlink bandwidth demand capacity of the k th Pod.
[0025] The Kubernetes-oriented complex service deployment and scheduling method has the characteristics that when the optimization target of the service deployment is the minimum number of deployment nodes, a service deployment optimization model is established, and the specific process is as follows:
[0026] Step 201, set the intermediate variable Z ij , and Z ij = Y i × Yj ; wherein, Y j represents the occupation state of the jth node service deployment, and Y j ∈{0, 1}, Y j = 1, indicating that the jth node service deployment is occupied; Y j = 0, indicating that the jth node service deployment is not occupied; and Z ij ≤ Y i , Z ij ≤ Y j , Z ij ≤ Y i + Y j - 1, Z ij ∈{0, 1}, j is a positive integer and takes a value of 1~N;
[0027] Step 202, establishing a service deployment optimization model, specifically as follows:
[0028] wherein, D ij represents the distance between the ith node and the jth node.
[0029] The above-mentioned complex service deployment and scheduling method for Kubernetes has the characteristics that in step five, the N node resource capacities are monitored during the running of multiple application programs to migrate the service deployment scheme for dynamic scheduling, and the specific process is as follows:
[0030] Step 501, monitoring the node resource capacity during the running of multiple application programs, obtaining the CPU actual capacity, memory actual capacity, uplink bandwidth actual capacity and downlink bandwidth actual capacity of the ith node, and comparing them with the CPU maximum capacity, memory maximum capacity, uplink bandwidth maximum capacity and downlink bandwidth maximum capacity of the ith node respectively;
[0031] Step 502, when any actual capacity in step 501 is greater than 90% of any maximum capacity, it is recorded as a node to be migrated, and each Pod on the node to be migrated is obtained;
[0032] Step 503, according to the resource actual use capacity of each Pod deployed on the node to be migrated, using the analytic hierarchy process to analyze each Pod deployed on the node to be migrated, and obtaining the to-be-migrated Pod on the node to be migrated;
[0033] Step 504, according to the method described in steps 501 to 503, traversing and judging N nodes to obtain to-be-migrated Pods on N' migration nodes; wherein N' is a positive integer and N' is less than N;
[0034] Step 505, according to the same set of labels on the Pod set punched in step 101, mark the Pods with the same label on the N' migration nodes as the same set of to-be-migrated Pod set, and mark the other Pods with the same label as the same set of non-migration Pod set;
[0035] Step 506, for the same set of to-be-migrated Pod set, add a constraint condition to the node corresponding to the same set of non-migration Pod set, and model and solve according to the method described in steps two to three to obtain the deployment scheme of the same set of to-be-migrated Pods, and migrate according to the deployment scheme of the same set of to-be-migrated Pods; otherwise, the deployment scheme of the same set of to-be-migrated Pods is not obtained, and steps 501 to 506 are continued to wait for the next migration.
[0036] Compared with the prior art, the present application has the following advantages:
[0037] 1. The method steps of the present application are simple and reasonable, and solve the problem that the current Kubernetes is designed for a single Pod and lacks overall deployment and scheduling of a complex service.
[0038] 2. In the service deployment and scheduling process of the present application, not only the local resource requirements of the application programs constituting a complex service, such as CPU, memory, etc., are considered, but also the network bandwidth requirement relationship between them, such as uplink bandwidth and downlink bandwidth, so as to ensure that the application programs are deployed optimally according to the optimization target while meeting various resource requirements.
[0039] 3. The service deployment optimization model established by the present application includes the optimization target of service deployment and the resource constraint condition of service deployment, the parameters contained in the resource constraint condition of service deployment are CPU, memory, uplink bandwidth and downlink bandwidth, and the optimization target of service deployment is to minimize the number of deployment nodes or to minimize the distance between deployment nodes, which can be adjusted according to actual requirements, thereby improving the adaptability range.
[0040] 4. In the service deployment optimization model established by the present application, the service deployment problem is converted into a 0-1 integer linear programming problem, so as to quickly obtain the target node scheme of each Pod deployment.
[0041] 5. The optimal service deployment scheme of the present application is deployed, and the resource capacity of each node is monitored during service operation to dynamically schedule the service deployment scheme, and the to-be-migrated Pods are migrated, so as to reduce the load of the node and improve the service quality.
[0042] In summary, the method has simple steps and reasonable design, fully considers the local resource requirements and communication requirements of an application program constituting a complex service, and deploys and migrates the pods according to the optimization target, so as to ensure that the resource requirements of the service are met and the service quality is improved.
[0043] The technical solutions of the present application will be further described in detail below with the help of the accompanying drawings and examples. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION
[0045] As shown in the drawings, Figure 1 The present application is a Kubernetes-oriented complex service deployment and scheduling method, the complex service involves multiple nodes, the complex service corresponds to an application program and contains multiple pods, and the method has the following characteristics:
[0046] Step one, label the pods in the application program:
[0047] Step 101, label the pods belonging to the same application program with the same label, and obtain the same set of pods;
[0048] Step 102, set the total number of nodes as N; wherein N is a positive integer;
[0049] Step 103, mark the same set of pods of the application program to be deployed as the set of pods to be deployed;
[0050] Step two, establish a service deployment optimization model for the set of pods to be deployed:
[0051] Establish a service deployment optimization model; wherein the service deployment optimization model includes an optimization target of service deployment and a resource constraint condition of service deployment, the resource constraint condition of service deployment contains parameters of CPU, memory, uplink bandwidth and downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model;
[0052] Step three, solve the service deployment optimization model, when the optimal service deployment scheme is obtained, execute step four; otherwise, the optimal service deployment scheme is not obtained, continue to circulate steps two to three to wait for the next deployment; wherein the optimal service deployment scheme includes the nodes where each pod in the set of pods is deployed;
[0053] Step four, deploy the set of pods to be deployed according to the optimal service deployment scheme;
[0054] Step five, monitor the resource capacity of the N nodes during the running of the multiple application programs to migrate the service deployment scheme for dynamic scheduling.
[0055] In this embodiment, the set K of Pods to be deployed in step 103 is {Pod1,..., PodK}, Podk represents the kth Pod, and k and K are positive integers, and 1≤k≤K; k ,...,Pod K}, Pod k represents the kth Pod, and k and K are positive integers, and 1≤k≤K;
[0056] The set N of nodes includes N nodes and is {Note1,..., NoteN}, Notei represents the ith node, and i and N are positive integers, and 1≤i≤N. i ,...,Note N}, Note i represents the ith node, and i and N are positive integers, and 1≤i≤N.
[0057] In this embodiment, the optimization objective of service deployment in step two is the minimum number of deployed nodes or the shortest distance between deployed nodes.
[0058] The resource constraint conditions of service deployment in step two include CPU resource constraints, memory resource constraints, uplink bandwidth constraints, and downlink bandwidth constraints.
[0059] In this embodiment, when the optimization objective of service deployment is the minimum number of deployed nodes, a service deployment optimization model is established, which is as follows:
[0060]
[0061] Wherein, min represents the minimum value, s.t. represents the constraint condition, Y i represents the occupation state of the ith node service deployment, and Y i ∈{0,1}, Y i =1 indicates that the ith node service deployment is occupied; Y i =0 indicates that the ith node service deployment is not occupied.
[0062] X ik represents the state of whether the kth Pod is deployed to the ith node, and X ik ∈{0,1}, X ik =1 indicates that the kth Pod is deployed to the ith node; X ik =0 indicates that the kth Pod is not deployed to the ith node.
[0063] Nc i represents the CPU available capacity of the ith node, Ns i represents the memory available capacity of the ith node, Nu i represents the uplink bandwidth available capacity of the ith node, Nd i represents the downlink bandwidth available capacity of the ith node; Pck Ps represents the CPU requirement capacity of the kth Pod k Pu represents the memory requirement capacity of the kth Pod k Pd represents the uplink bandwidth requirement capacity of the kth Pod k Pd represents the downlink bandwidth requirement capacity of the kth Pod.
[0064] In this embodiment, when the optimization target of service deployment is the shortest distance between deployment nodes, a service deployment optimization model is established, and the specific process is as follows:
[0065] Step 201, setting an intermediate variable Z ij , and Z ij =Y i ×Y j ; wherein Y j represents the occupation state of the jth node service deployment, and Y j ∈{0,1}, Y j =1, indicating that the jth node service deployment is occupied; Y j =0, indicating that the jth node service deployment is not occupied; and Z ij ≤Y i , Z ij ≤Y j , Z ij ≤Y i +Y j -1, Z ij ∈{0,1}, j is a positive integer and takes a value of 1-N;
[0066] Step 202, establishing a service deployment optimization model, and the specific process is as follows:
[0067] wherein D ij represents the distance between the ith node and the jth node.
[0068] In this embodiment, in step five, the resource capacity of the N nodes is monitored during the running of the plurality of application programs to migrate the service deployment scheme for dynamic scheduling, and the specific process is as follows:
[0069] Step 501, monitoring the node resource capacity during the running of the plurality of application programs, obtaining the CPU actual capacity, the memory actual capacity, the uplink bandwidth actual capacity and the downlink bandwidth actual capacity of the ith node, and comparing them with the CPU maximum capacity, the memory maximum capacity, the uplink bandwidth maximum capacity and the downlink bandwidth maximum capacity of the ith node respectively;
[0070] Step 502, when any actual capacity in step 501 is greater than 90% of any maximum capacity, it is recorded as a node to be migrated, and each Pod on the node to be migrated is obtained;
[0071] Step 503, according to the actual resource usage capacity of each Pod deployed on the node to be migrated, the analytic hierarchy process is used to analyze each Pod deployed on the node to be migrated, and the to-be-migrated Pod on the node to be migrated is obtained.
[0072] Step 504, according to the method described in steps 501 to 503, the N nodes are traversed and judged, and the to-be-migrated Pods on N' migration nodes are obtained; wherein N' is a positive integer, and N' is less than N.
[0073] Step 505, according to the same group of Pod sets labeled in step 101, the Pods with the same label of the to-be-migrated Pods on N' migration nodes are recorded as the same group of to-be-migrated Pod sets, and the other Pods with the same label are recorded as the same group of non-migration Pod sets.
[0074] Step 506, for the same group of to-be-migrated Pod sets, the constraint condition is added to the node corresponding to the same group of non-migration Pod sets, and the deployment scheme of the same group of to-be-migrated Pods is obtained by modeling and solving according to the method described in steps two to three, and the migration is performed according to the deployment scheme of the same group of to-be-migrated Pods; otherwise, the deployment scheme of the same group of to-be-migrated Pods is not obtained, and steps 501 to 506 are continued to wait for the next migration.
[0075] In this embodiment, K is the total number of Pods in the to-be-deployed Pod set.
[0076] In this embodiment, it should be noted that Pod is the basic unit managed by Kubernetes service, and Pod needs to be deployed to Node when the service is deployed.
[0077] In this embodiment, the resource unit of CPU is the capacity of CPU (Core), which is an absolute value and not a relative value. In Kubernetes, the CPU quota of one thousandth is usually taken as the minimum unit, and m is used to represent it. That is, if a node has 5 logical CPUs, the total resource capacity of the CPU is 500m, and each logical CPU is 100m, and 0.5 CPU is 50m.
[0078] Memory: according to the default memory unit Mi of Kubernetes, 100Mi of memory is 100M.
[0079] Uplink bandwidth: according to the original bandwidth unit M of bandwidth.
[0080] Downlink bandwidth: according to the original bandwidth unit M of bandwidth.
[0081] In this embodiment, the requests field represents at least the resource capacity allocated to the Pod, and the limits field represents the maximum resource capacity that the Pod can use.
[0082] In this embodiment, represents that the sum of CPU resource requirements of all Pods deployed on the ith node is less than the CPU available capacity of the ith node;
[0083] represents that the sum of memory resource requirements of all Pods deployed on the ith node is less than the memory available capacity of the ith node;
[0084] represents that the sum of uplink bandwidth resource requirements of all Pods deployed on the ith node is less than the uplink bandwidth available capacity of the ith node;
[0085] represents that the sum of downlink bandwidth resource requirements of all Pods deployed on the ith node is less than the downlink bandwidth available capacity of the ith node;
[0086] In this embodiment, the optimal service deployment scheme is stored in the form of Pod_Name-Node_Name (Key-Value), and when the deployment scheme of the to-be-migrated Pod is stored, the previously stored scheme will be overwritten.
[0087] In this embodiment, when the optimal service deployment scheme is obtained and stored in redis, any Pod is allocated and deployed to the corresponding target node through the Schduler-extender scheduling provided by Kubernetes.
[0088] In this embodiment, the Kubernetes native system does not have a description of bandwidth resource requirements, so it cannot guarantee the communication requirement relationship between services. By introducing the Calico network plug-in to provide network services for the cluster, the plug-in can limit the uplink bandwidth and downlink bandwidth through the annotations field to limit the bandwidth usage capacity of the Pod to not exceed the set capacity.
[0089] In this embodiment, the CPU requirement capacity of the Pod, the memory requirement capacity of the Pod, the uplink bandwidth requirement capacity, and the downlink bandwidth requirement capacity of the Pod are defined through the yaml file of the Pod.
[0090] In this embodiment, during the service running period, the node resource capacity is obtained through the monitoring component Prometheus.
[0091] In this embodiment, the resource capacity of each Node node is obtained by the Prometheus service monitoring component at a fixed time interval (every ten minutes).
[0092] In this embodiment, the CPU resource constraint and the memory resource constraint of the Pod are set by the requests field and the limits field, and the uplink bandwidth constraint and the downlink bandwidth constraint of the Pod are set by the network plug-in Calico of Kubernetes.
[0093] In this embodiment, for the same set of Pod, the constraint condition X ef =1 is added to the node corresponding to the same set of Pod that does not need to be migrated in step 506, where e represents the e-th Pod in the same set of Pod that does not need to be migrated, f represents the f-th node corresponding to the e-th Pod, e and f are positive integers.
[0094] In this embodiment, when the actual capacity of any one in step 501 is greater than 90% of any maximum capacity, it means that the CPU actual capacity of the i-th node is greater than 90% of the CPU maximum capacity of the i-th node, or the memory actual capacity of the i-th node is greater than 90% of the memory maximum capacity of the i-th node, or the uplink bandwidth actual capacity of the i-th node is greater than 90% of the uplink bandwidth maximum capacity of the i-th node, or the downlink bandwidth actual capacity of the i-th node is greater than 90% of the downlink bandwidth maximum capacity of the i-th node.
[0095] In this embodiment, in the service deployment optimization model
[0096] In this embodiment, the distance between the i-th node and the j-th node is the spatial Euclidean distance or the network hop number, and the distance is zero if the i-th node and the j-th node are the same.
[0097] In this embodiment, it should be noted that the constraint condition of the j-th node is the same as the constraint condition of the i-th node in the service deployment optimization model.
[0098] In summary, the method of the application has simple steps and reasonable design, fully considers the local resource demand and communication demand of the application programs constituting a complex service, and deploys and migrates the Pod according to the optimization target, so as to ensure that the resource demand of the service is met and the service quality is improved.
[0099] The above is only a preferred embodiment of the application, and does not limit the application, and any simple modification, change and equivalent structure change made according to the technical essence of the application to the above embodiment are still within the protection scope of the technical solution of the application.
Claims
1. A Kubernetes-oriented complex service deployment and scheduling method, characterized in that, The complex service involves multiple nodes, the complex service corresponds to an application program and contains multiple Pods, and the complex service is characterized in that: Step one, setting labels for Pods in an application program: Step 101, labeling Pods belonging to the same application program with the same label to obtain a same group of Pod sets; Step 102, setting the total number of nodes as ; wherein, is a positive integer; Step 103, recording the same group of Pod sets of the application program to be deployed as a to-be-deployed Pod set; Step two, establishing a service deployment optimization model for the to-be-deployed Pod set: The service deployment optimization model includes an optimization target of service deployment and resource constraint conditions of service deployment, the parameters contained in the resource constraint conditions of service deployment are CPU, memory, uplink bandwidth and downlink bandwidth, and the service deployment optimization model is a 0-1 integer linear programming model; Step three, solving the service deployment optimization model, when an optimal service deployment scheme is obtained, step four is executed; otherwise, an optimal service deployment scheme is not obtained, and steps two to three are continued to wait for next deployment; wherein the optimal service deployment scheme includes nodes on which each Pod in the Pod set is deployed; Step four, deploying the to-be-deployed Pod set according to the optimal service deployment scheme; Step five, monitoring during running of multiple applications a node resource capacity to migrate service deployment schemes to dynamically schedule; Step five monitors during execution of the plurality of applications The node resource capacity migrates the service deployment scheme for dynamic scheduling, and the specific process is as follows: Step 501, monitoring node resource capacity during running of multiple application programs, obtaining CPU actual capacity, memory actual capacity, uplink bandwidth actual capacity and downlink bandwidth actual capacity of the first node, and comparing with CPU maximum capacity, memory maximum capacity, uplink bandwidth maximum capacity and downlink bandwidth maximum capacity of the first node respectively; Step 501, monitoring node resource capacity during running of multiple application programs, obtaining CPU actual capacity, memory actual capacity, uplink bandwidth actual capacity and downlink bandwidth actual capacity of the first node, and comparing with CPU maximum capacity, memory maximum capacity, uplink bandwidth maximum capacity and downlink bandwidth maximum capacity of the first node respectively; Step 502, when any actual capacity in step 501 is greater than 90% of any maximum capacity, the node is recorded as a to-be-migrated node, and each Pod on the to-be-migrated node is obtained; Step 503, according to the actual resource usage capacity of each Pod deployed on the to-be-migrated node, each Pod deployed on the to-be-migrated node is analyzed by using the analytic hierarchy process, and a to-be-migrated Pod on the to-be-migrated node is obtained; Step 504: Following the methods described in steps 501 to 503, perform the following steps... traverse and judge each node to obtain... Pods to be migrated on migration nodes; among them It is a positive integer, and Less than ; Step 505, according to the same set of Pod collection labeled in step 101, the Pod to be migrated on the migration node is recorded as the same set of Pod to be migrated, and the other Pod with the same label is recorded as the same set of Pod not to be migrated. The Pod to be migrated on the migration node is recorded as the same set of Pod to be migrated, and the other Pod with the same label is recorded as the same set of Pod not to be migrated. Step 506, for the same group of to-be-migrated Pod sets, a constraint condition is added to the nodes corresponding to the same group of non-migration Pod sets, and the modeling and solving method described in steps two to three is used to obtain a deployment scheme of the same group of to-be-migrated Pods, and the same group of to-be-migrated Pods are migrated according to the deployment scheme of the same group of to-be-migrated Pods; otherwise, the deployment scheme of the same group of to-be-migrated Pods is not obtained, and steps 501 to 506 are continued to wait for next migration.
2. The Kubernetes-oriented complex service deployment and scheduling method according to claim 1, characterized in that: The set of Pods to be deployed in step 103 For , represents the th Pod, and and are both positive integers, and ; A set of nodes comprising nodes and being , denotes a first node, and and are both positive integers, and .
3. The Kubernetes-oriented complex service deployment and scheduling method according to claim 2, characterized in that: The optimization target of service deployment in step two is the minimum number of deployment nodes or the shortest distance between deployment nodes; The resource constraint conditions of service deployment in step two include CPU resource constraints, memory resource constraints, uplink bandwidth constraints and downlink bandwidth constraints.
4. The Kubernetes-oriented complex service deployment and scheduling method according to claim 3, characterized in that: When the optimization target of service deployment is the minimum number of deployment nodes, the service deployment optimization model is established as follows: ; wherein min denotes minimum, s.t. denotes constraint, denotes the occupancy status of the service deployment of the th node, and , denotes the occupancy status of the service deployment of the th node is occupied; denotes the occupancy status of the service deployment of the th node is not occupied; represents a state of whether a first pod is deployed to a first node, and , represents that a first pod is deployed to a first node; represents that a first pod is not deployed to a first node; Indicates the first CPU available capacity of each node Indicates the first The available memory capacity of each node. Indicates the first Uplink bandwidth available capacity of each node Indicates the first The available downlink bandwidth capacity of each node; Indicates the first CPU capacity required per Pod Indicates the first Memory requirements for each Pod Indicates the first Uplink bandwidth requirements for each Pod Indicates the first Downlink bandwidth requirements for each Pod.
5. The Kubernetes-oriented complex service deployment and scheduling method according to claim 4, characterized in that: When the optimization target of service deployment is the shortest distance between deployment nodes, the service deployment optimization model is established as follows: Step 201, setting an intermediate variable , and ; wherein, represents the occupation state of the service deployment of the th node, and , , represents that the service deployment of the th node is occupied; , represents that the service deployment of the th node is not occupied; and , , , , is a positive integer and takes a value from 1 to ; Step 202, establishing a service deployment optimization model, specifically as follows: ; where, represents the distance between the i th node and the j th node.
Citation Information
Patent Citations
Networking service level agreements for computer datacenters
CN110463140A
Kubernetes Pod scheduling method based on multi-objective equilibrium optimization
CN115022335A