A method and device for improving the horizontal elastic scaling capability of Kubernetes containers
By deploying the Predictor predictor and SHPA controller in Kubernetes, dynamically updating the container horizontal elastic scaling threshold, solving the problem of HPA controller lag, improving the elastic scaling ability of the application, and avoiding resource waste.
Patent Information
- Application Number
- CN202210435975.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-04-24
AI Technical Summary
There is a lag effect in HPA controllers in Kubernetes, which leads to the application's elastic expansion lag in burst traffic scenarios, which cannot be timely or overscaling, resulting in waste of resources.
Deploy the Predictor predictor and SHPA controller. The Predictor predictor obtains the application running indicators, calculates its periodic change laws, predicts future indicator values, and updates the container horizontal elastic scaling threshold; the SHPA controller monitors and sends the updated threshold to HPA Controller.
By predicting the application operation index value dynamically set thresholds, the hysteresis of the elastic scaling of HPA controllers is reduced, the elastic scaling ability of the application is improved, and resource waste is avoided.
Smart Images

Figure CN115033447B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a method, device, electronic device, and storage medium for improving the horizontal elastic scaling capability of a Kubernetes container. Background Art
[0002] The HPA controller in Kubernetes is an indicator-based elastic scaling. Its working principle is to monitor the resource indicators of Pods, such as CPU usage. Once the set threshold is reached, it is necessary to decide whether to increase or decrease the number of Pods. However, the HPA controller itself has a certain lag effect. The time difference between the application exceeding the established threshold and the HPA controller completing the application expansion includes: the time when the HPA controller regularly performs indicator collection after the application indicator data has exceeded the threshold, the time when the HPA controller controls the Deployment or StatefulSet to expand the capacity, the time when the Pod is scheduled, and the time from the application startup to the service readiness. This makes the HPA controller operation link too long. In the scenario of burst traffic, the application may not have completed the elastic expansion, and the existing service instances have been overwhelmed by the traffic. Moreover, when facing peaks or troughs in traffic, the threshold set by HPA cannot be modified dynamically, which will also cause the elastic scaling of the application to be untimely or excessively scaled, resulting in resource waste. Therefore, how to improve the elastic scaling capability of the HPA controller is a technical problem that needs to be solved. Summary of the invention
[0003] The purpose of the embodiments of this specification is to provide a method, device, electronic device and storage medium for improving the horizontal elastic scaling capability of Kubernetes containers in order to address the above-mentioned problems.
[0004] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0005] First, a method for improving the horizontal elastic scaling capability of Kubernetes containers is proposed, which deploys the Predictor predictor and SHPA controller, including:
[0006] The Predictor obtains the application operation index within a specified time period before the current time point, calculates the periodic change law of the application operation index, and calculates the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law;
[0007] The Predictor updates the container horizontal elastic scaling threshold according to the predicted value of the application operation indicator;
[0008] When the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container elastic scaling threshold to the HPA controller.
[0009] Secondly, a device for improving the horizontal elastic scaling capability of Kubernetes containers is proposed, which deploys the Predictor predictor and SHPA controller, including:
[0010] An application operation index prediction module is used for the Predictor to obtain the application operation index within a specified time period before the current time point, calculate the periodic change law of the application operation index, and calculate the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law;
[0011] A container horizontal elastic scaling threshold update module, used to update the container horizontal elastic scaling threshold by the Predictor predictor according to the application operation indicator prediction value;
[0012] The container horizontal elastic scaling threshold sending module is used for monitoring and sending the updated container elastic scaling threshold to the HPA controller when the container elastic scaling threshold changes.
[0013] In a third aspect, an electronic device is provided, comprising: a processor; and
[0014] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the first aspect.
[0015] In a fourth aspect, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the method described in the first aspect.
[0016] This specification can achieve at least the following technical effects:
[0017] The present invention predicts the application running index value and dynamically sets the threshold accordingly, thereby compensating for the lag of elastic scaling of the original HPA controller and solving the problem of resource waste caused by untimely or excessive elastic scaling of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 This is one of the schematic diagrams of a method for improving the horizontal elastic scaling capability of Kubernetes containers provided in the embodiments of this specification.
[0020] Figure 2 The second schematic diagram of the method for improving the horizontal elastic scaling capability of Kubernetes containers provided in the embodiment of this specification.
[0021] Figure 3 This is one of the schematic diagrams of a device for improving the horizontal elastic scaling capability of a Kubernetes container provided in an embodiment of this specification.
[0022] Figure 4 The second schematic diagram of the device for improving the horizontal elastic scaling capability of Kubernetes containers provided in the embodiment of this specification.
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided for one embodiment of the present specification. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0025] The following is a detailed description of a Kubernetes-based data encryption and decryption solution involved in this specification through a specific example.
[0026] Key Terms
[0027] Kubernetes: K8s for short, which is an abbreviation formed by replacing the eight characters "ubernete" in the middle of the name with "8". It is an open source platform for managing containerized applications on multiple hosts in a cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and powerful. Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance. The traditional way to deploy applications is to install applications through plug-ins or scripts. The disadvantage of this is that the operation, configuration, management, and all life cycles of the application will be bound to the current operating system, which is not conducive to application upgrades / rollbacks. Of course, some functions can be implemented by creating virtual machines, but virtual machines are very heavy and not conducive to portability. The new way is to implement it by deploying containers. Each container is isolated from each other, each container has its own file system, and the processes between containers will not affect each other, and computing resources can be distinguished. Compared with virtual machines, containers can be deployed quickly. Since containers are decoupled from the underlying facilities and machine file systems, they can be migrated between different clouds and different versions of operating systems. Containers take up less resources and are quick to deploy. Each application can be packaged into a container image. The one-to-one relationship between each application and the container also gives containers greater advantages. Using containers, you can create container images for applications during the build or release phase, because each application does not need to be combined with the rest of the application stack, nor does it rely on the production environment infrastructure, which enables a consistent environment from R&D to testing and production. Similarly, containers are lighter and more "transparent" than virtual machines, which makes them easier to monitor and manage.
[0028] Kubernetes Pod: Pod is the smallest unit that can be created and deployed in Kubernetes. It is an application instance in a Kubernetes cluster and is always deployed on the same node. A Pod contains one or more containers, as well as resources shared by each container, such as storage and network. It is divided into single-container Pod and multi-container Pod. Single-container Pod is the most common application mode; for multi-container Pod, Kubernetes will ensure that all containers run on the same physical host or virtual host. Multi-container Pod is a relatively advanced usage mode. It is generally not recommended unless the application coupling is particularly serious. The containers in a Pod share the IP address and port range, and the containers can access each other through localhost. Using Pod has many benefits: (1) As a service unit that can run independently, Pod simplifies the difficulty of application deployment and provides great convenience for application deployment management at a higher level of abstraction; (2) As the smallest application instance, Pod can run independently, which can be easily deployed, horizontally expanded and contracted, and convenient for scheduling management and resource allocation; (3) The containers in the Pod share the same data and network address space, and unified resource management and allocation are also performed between Pods.
[0029] HPA: The abbreviation of Horizontal Pod Autoscaling, is a function in Kubernetes that implements horizontal automatic scaling of Pods. The so-called horizontal scaling is different from vertical scaling, that is, horizontal scaling is aimed at the increase or decrease of the number of Pod instances, while vertical scaling is aimed at the increase or decrease of resources that can be used for a single Pod instance, such as increasing CPU processing power or memory size. HPA can automatically expand the number of Pods based on CPU usage or application-defined metrics (supports replication controller, deployment, and replica set). For the Pod cluster in Kubernetes, HPA is the controller that implements this horizontal scaling. When the business load in the Pod increases, it can create a new Pod to ensure the stable operation of the business system. When the business load in the Pod decreases, it can destroy the Pod to improve resource utilization. The HAP controller can obtain indicators in two different ways, namely Heapster and REST client interface. When using direct Heapster to obtain indicator data, HPA directly initiates a query request to Heapster through the service proxy subresource of the API server. Therefore, Heapster needs to be deployed on the cluster in advance and run in the kube-system namespace. When using the REST client interface to obtain indicators, you need to deploy the resource indicator API and its API Server in advance. If necessary, you should also deploy the custom indicator API and its related API Server.
[0030] Embodiment 1
[0031] Reference Figure 1 As shown, it is a schematic diagram of a method for improving the horizontal elastic scaling capability of Kubernetes containers in an embodiment of the present invention. Since the number of Pod copies for resource management of Deployment, ReplicaSet, Replication Controller or StatefulSet controller in Kubernetes applications supports manual operation adjustment, so as to better match the actual needs of the business scale. However, this manual adjustment method relies on the user's deep participation in monitoring the resource pressure of the container application and needs to calculate a reasonable value for adjustment, which has a certain degree of lag. For this reason, Kubernetes provides an HPA horizontal automatic elastic scaling tool. The method of the embodiment of the present invention is based on the realization of HPA horizontal elastic scaling, which further improves this function, including:
[0032] Step 101: Deploy the Predictor predictor and the SHPA controller. Specifically, the Predictor predictor and the SHPA controller are enhancements to the existing HPA function of automatic horizontal scaling of containers in Kubernetes. Among them, the main function of the Predictor predictor is to obtain the operating indicators of the application over a period of time, and then analyze the changing rules of the indicators to predict the application operating indicators in the future; at the same time, due to the change in the predicted value of the application operating indicator, the threshold for automatic elastic scaling of the container level provided to the HPA startup will also be adjusted accordingly; in the specific implementation, the predicted application operating indicators can be stored in the TimeSeriesPrediction object. The SHPA controller is a Super HPA constructed in an embodiment of the present invention. It monitors the changes in the predicted value of the application operating indicator and the automatic elastic scaling threshold of the container level, and actively sends the latest predicted value of the application operating indicator and the automatic elastic scaling threshold of the container level to the HPA controller, so as to realize the dynamic adjustment of the automatic elastic scaling threshold of the container level, thereby overcoming the hysteresis disadvantage of the HPA automatic scaling adjustment; in the specific implementation, the SHPA controller can instantiate the SuperHorizontalPodAutoScaler object, which is associated with the TimeSeriesPrediction object and the instance object HorizontalPodAutoScaler of the HPA controller at the same time. It should be noted here that, since the Predictor predictor and the SHPA controller are only functionally limited, that is, the Predictor predictor and the SHPA controller need to be implemented and deployed in the Kubernetes environment. However, it should be considered that in the specific implementation of the Predictor predictor and the SHPA controller, any implementation method that can meet the functional limitations is in line with the solution of the present invention.
[0033] Step 102: The Predictor obtains application operation indicators within a specified time period before the current time point, calculates the periodic change law of the application operation indicators, and calculates the predicted value of the application operation indicators within the specified time period starting from the current time point based on the periodic change law.
[0034] Optionally, the Predictor predictor obtains application operation indicators within a specified time period earlier than the current time point, including obtaining from Prometheus. Using Prometheus monitoring is a function introduced in the new version of Kubernetes. If you monitor the resource objects of Kubernetes, you need to deploy the kube-state-metrics service to monitor and obtain various application operation resource indicators such as CPU, memory, and network IO. It should be noted that since the application operation indicators are in a constantly changing process, it is necessary to continuously obtain application operation indicators based on the current time point and within a specified time period earlier than the current time point, and use this to analyze and calculate the periodic change law of the application operation indicators, as the input for predicting the application operation indicator value within the specified time period after the current time point. Since the obtained application operation indicators belong to time series data, when predicting time series, methods such as autoregressive prediction models, exponential prediction models, and artificial neural network models are often used, which will not be repeated in this embodiment.
[0035] Optionally, the application operation indicator prediction value is obtained by the HPA controller from the Metrics Server through the kube-apiserver and updated as Custom Metrics. Since Kubernetes can customize application operation monitoring indicators through Custom Metrics, in the embodiment of the present invention, the Metrics Server is registered with the Kubernetes cluster through the Aggregated API Server to synchronize the application operation indicator prediction value stored in the TimeSeriesPrediction object to Custom Metrics for use within the Kubernetes cluster.
[0036] Step 103: The Predictor updates the container horizontal elastic scaling threshold according to the predicted value of the application operation index. It should be noted that the adjustment of the container horizontal elastic scaling threshold is based on the predicted value of the application operation index. This is also the core technical feature of the embodiment of the present invention. It is precisely because of the predicted value of the application operation index that the container horizontal elastic scaling threshold has a certain degree of foresight, and can overcome the deficiency of the existing HPA controller in the lag of the container horizontal elastic scaling adjustment to a certain extent.
[0037] Step 104: When the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container elastic scaling threshold to the HPA controller. Specifically, since the instantiated SuperHorizontalPodAutoScaler object of the SHPA controller is associated with both the TimeSeriesPrediction object and the instance object HorizontalPodAutoScaler of the HPA controller, when the container horizontal elastic scaling threshold changes, the SuperHorizontalPodAutoScaler object obtains the container horizontal elastic scaling threshold from the TimeSeriesPrediction object, and then updates the threshold set in the HorizontalPodAutoScaler object. At this time, the existing HPA controller obtains the updated container horizontal elastic scaling threshold through the HorizontalPodAutoScaler object.
[0038] This embodiment proposes another implementation scheme of a method for improving the horizontal elastic scaling capability of a Kubernetes container. Figure 2 As shown, it also includes:
[0039] Step 105: The HPA controller adjusts the container horizontal elastic scaling according to the result of comparing the updated container horizontal elastic scaling threshold with the existing threshold. It should be noted that due to limited cluster resources, it is necessary to fully consider the significance of threshold adjustment for container horizontal elastic scaling to achieve expansion and contraction.
[0040] Embodiment 2
[0041] Figure 3 This is a schematic diagram of a Kubernetes container horizontal elastic scaling capability enhancement device 300 provided in accordance with an embodiment of the present specification. Figure 3 In one implementation, a device for improving the horizontal elastic scaling capability of a Kubernetes container includes:
[0042] The Predictor and SHPA controller management module 301 is used to deploy the Predictor and SHPA controller.
[0043] The application operation index prediction module 302 is used for the Predictor to obtain the application operation index within a specified time period before the current time point, calculate the periodic change law of the application operation index, and calculate the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law;
[0044] The container horizontal elastic scaling threshold updating module 303 is used to update the container horizontal elastic scaling threshold by the Predictor according to the predicted value of the application operation indicator;
[0045] The container horizontal elastic scaling threshold sending module 304 monitors and sends the updated container elastic scaling threshold to the HPA controller when the container elastic scaling threshold changes.
[0046] This embodiment proposes another implementation scheme of a device for improving the horizontal elastic scaling capability of a Kubernetes container, such as Figure 4 As shown, it also includes:
[0047] The HPA scaling adjustment module 305 is used for the HPA controller to adjust the container horizontal elastic scaling according to the result of comparing the updated container horizontal elastic scaling threshold with the original threshold.
[0048] It should be understood that a Kubernetes container horizontal elastic scaling capability improvement device in the embodiment of this specification can also execute Figure 1 to Figure 2 The method for executing the device (or equipment) for improving the horizontal elastic scaling capability of Kubernetes containers is implemented in Figure 1 to Figure 2 The functions of the example shown will not be described in detail here.
[0049] Embodiment 3
[0050] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Figure 5 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0051] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0052] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0053] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a shared resource access control device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0054] Deploy the Predictor and SHPA controllers, including:
[0055] The Predictor obtains the application operation index within a specified time period before the current time point, calculates the periodic change law of the application operation index, and calculates the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law;
[0056] The Predictor updates the container horizontal elastic scaling threshold according to the predicted value of the application operation indicator;
[0057] When the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container elastic scaling threshold to the HPA controller.
[0058] The above is as in this manual Figure 1 to Figure 2A method for improving the horizontal elastic scaling capability of a Kubernetes container disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in software form. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0059] Of course, in addition to software implementation, the electronic device of the embodiments of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0060] Embodiment 4
[0061] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figure 1 to Figure 2 The method of the embodiment shown is specifically used to perform the following method:
[0062] Deploy the Predictor and SHPA controllers, including:
[0063] The Predictor obtains the application operation index within a specified time period before the current time point, calculates the periodic change law of the application operation index, and calculates the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law;
[0064] The Predictor updates the container horizontal elastic scaling threshold according to the predicted value of the application operation indicator;
[0065] When the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container elastic scaling threshold to the HPA controller.
[0066] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
[0067] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0068] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0069] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0070] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A method for improving the horizontal elastic scaling capability of a Kubernetes container, characterized in that: Deploy the Predictor predictor and SHPA controller, including: The Predictor obtains the application operation index within a specified time period before the current time point, calculates the periodic change law of the application operation index, and calculates the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law; The Predictor updates the container horizontal elastic scaling threshold according to the predicted value of the application operation indicator; When the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container horizontal elastic scaling threshold to the HPA controller, specifically including: the SHPA controller monitors the SHPA object to obtain the container horizontal elastic scaling threshold from the Prediction object, updates the threshold set in the HPA object, and the HPA controller obtains the updated container horizontal elastic scaling threshold through the HPA object; The HPA controller adjusts the container horizontal elastic scaling according to a result of comparing the updated container horizontal elastic scaling threshold with the existing threshold.
2. The method according to claim 1, characterized in that: The Predictor obtains the application operation indicators within a specified time period earlier than the current time point, including obtaining them from Prometheus.
3. The method according to claim 1, characterized in that The predicted values of the application running indicators are obtained by the HPA controller from the Metrics Server through the kube-apiserver and updated as Custom Metrics.
4. A device for improving the horizontal elastic scaling capability of Kubernetes containers, characterized in that: Deploy the Predictor and SHPA controllers, including: An application operation index prediction module is used for the Predictor to obtain the application operation index within a specified time period before the current time point, calculate the periodic change law of the application operation index, and calculate the predicted value of the application operation index within the specified time period starting from the current time point according to the periodic change law; A container horizontal elastic scaling threshold update module, used to update the container horizontal elastic scaling threshold by the Predictor predictor according to the application operation indicator prediction value; The container horizontal elastic scaling threshold sending module, when the container horizontal elastic scaling threshold changes, the SHPA controller monitors and sends the updated container horizontal elastic scaling threshold to the HPA controller, specifically including: the SHPA controller monitors the SHPA object to obtain the container horizontal elastic scaling threshold from the Prediction object, updates the threshold set in the HPA object, and the HPA controller obtains the updated container horizontal elastic scaling threshold through the HPA object; The HPA scaling adjustment module is used for the HPA controller to adjust the container horizontal elastic scaling according to the result of comparing the updated container horizontal elastic scaling threshold with the existing threshold.
5. The device according to claim 4, characterized in that In the application operation index prediction module, the Predictor obtains the application operation index within a specified time period earlier than the current time point, including obtaining it from Prometheus.
6. The device according to claim 4, characterized in that In the application operation indicator prediction module, the application operation indicator prediction value is obtained by the HPA controller from the Metrics Server through the kube-apiserver and updated as Custom Metrics.
7. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, which, when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
A Kubernetes copy capacity expanding and shrinking method and system
CN109446032A
Container processing method and device, main body server, system and storage medium
CN109992354A