The invention discloses a Pod horizontal automatic capacity expansion and
contraction method for a complex scene and
computer equipment, and the method comprises the steps: S1, building a micro-service Pod
resource utilization model A based on a K8S cluster, and obtaining a comprehensive average index T; s2, the Texp serves as the input of a
control system, the Tact serves as the output of the
control system, and an error e is obtained; s3, adding an incremental
PID controller, and establishing a micro-service Pod
resource utilization model B combined with an incremental PID
algorithm; and S4, when the micro-service faces an external service request or a complex service scene, the incremental
PID controller acts on the horizontal capacity expansion and contraction controller, the control quantity increment of the incremental
PID controller is
delta u (k), the horizontal capacity expansion and contraction controller adjusts the number of Pod, the output adjustment quantity is mapped into the variable quantity
delta n (k) of the Pod, and the mapping relation between the
delta u (k) and the delta n (k) is obtained. According to the method, the change of the business volume can be quickly responded, and green low-carbon cloud resource application is realized.