| With the continuous development of container technology,more and more enterprises and organizations choose to deploy their own developed applications in the form of containers to the container platform for unified scheduling management,scheduling algorithms to ensure that the scheduling cluster can have the ability to provide good services,while the scheduling process itself also has certain time requirements.Currently,Kubernetes is a mainstream container scheduling technology used by most enterprises and organizations,but its scheduling algorithm has the problems of load imbalance and high scheduling time overhead,which affects the overall ability of the cluster to provide services and the efficiency of application scheduling and deployment.Therefore,this paper proposes an optimization solution to address the load imbalance and high scheduling time overhead of Kubernetes scheduling algorithm,and the main work is as follows:To address the load imbalance problem of the Kubernetes default scheduling algorithm,this paper analyzes the standard Kubernetes scheduling model and locates two reasons for the load imbalance problem: 1.the Kubernetes default scheduling algorithm is missing the evaluation of the cluster node network environment.2.the default scheduling algorithm uses the node residual resource data for preference The calculation logic of scoring ignores the configuration differences among cluster nodes,and it is easy to misjudge the load level of nodes.Based on these two optimization directions,this paper proposes a scheduling policy TLB(Traffic and load balancing,TLB)based on Pod network improvement,which introduces Istio and Prometheus monitoring components in the scheduling policy to build a Pod real load acquisition model and calculate the Pod real network allocation rate at a finer granularity than the bandwidth occupation rate to compensate for the lack of network environment evaluation by the default scheduling algorithm.The node ideal load deviation metric is designed by combining the three metrics of Pod’s real CPU,memory and network allocation law for scheduling preference scoring calculation.The experimental results show that the TLB scheduling strategy is effective and feasible in solving the load imbalance problem.To address the problem of high scheduling time overhead in the default scheduling algorithm of Kubernetes,this paper locates that the problem arises because the default scheduling algorithm adopts a serialized preference scoring mechanism for cluster nodes,which causes the preference phase to take up too much time in the whole scheduling process.Based on this optimization direction,this paper designs an Improved Genetic Algorithm(IGA)based on the idea of simulated annealing,which has a faster convergence speed than the Standard Genetic Algorithm(SGA)for the Kubernetes scheduling problem.This algorithm is applied to build a parallelized scheduling preference model,replacing the serialized preference scoring mechanism of the default scheduling algorithm with an overall preference-seeking iteration of the Pod allocation scheme to reduce the scheduling time overhead.And the IGA and TLB scheduling policies are fused and optimized,and a parallel scheduling policy TLB-IGA(Traffic and load balancing-IGA,TLB-IGA)based on IGA improvement is proposed.The experimental results show that the TLB-IGA scheduling strategy is both effective and feasible in solving the load imbalance problem and the problem of large scheduling time overhead,and it is superior in improving the load balancing effect compared with other load balancing scheduling strategies that do not use the real load acquisition model of Pod in this paper. |