A container group startup method, device, electronic device and storage medium

By pre-establishing a sandbox container pool and a business container pool, the container group can be quickly started, which solves the problem of long container group creation time, improves response speed, and is suitable for high concurrency scenarios.

CN114489929BActive Publication Date: 2024-10-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111593135.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-25
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

The creation time of container groups in the existing technology is long, which affects the response time of business processing, especially in function computing scenarios, resulting in too long response times for concurrent requests.

Method used

By pre-establishing a sandbox container pool and a business container pool, obtain and start pre-saved sandbox containers and business containers to quickly start the container group and avoid pulling images and creating containers in real time.

Benefits of technology

It significantly reduces the startup time of the container group, improves the response speed of business processing, and reduces the response time of client requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489929B_ABST
    Figure CN114489929B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for starting a container group, belonging to the field of container technology. The method includes: obtaining a startup instruction of a container group, the startup instruction includes startup information of the container group, obtaining a sandbox container based on the startup information and a locally saved sandbox container pool, obtaining a business container based on the startup information and a locally saved business container pool, and after starting the sandbox container, starting the business container to start a container group. In this way, by using the pre-saved sandbox container pool and business container pool to start the container group, it is possible to avoid pulling images to create business containers, and thus the container group can be started quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of container technology, and in particular to a method, device, electronic device and storage medium for starting a container group. Background Art

[0002] Kubernetes is used to manage a unified resource pool composed of multiple machines, and provides an operating environment for containerized applications based on this. The smallest scheduling unit of Kubernetes is a container group (pod), and a Pod can be loaded with at least one container.

[0003] In the related technology, the Pod creation process is as follows: 1) Kubernetes ApiServer receives the Yaml for creating the Pod; 2) Scheduler listens to the event of creating the Pod, finds the most suitable Node through scheduling calculation and sets pod.spec.Node; 3) Kubelet on the corresponding Node finds that a new Pod needs to be added, triggers the ADD event in the Handler for corresponding logical processing. At this time, SyncPod in containerRuntime completes the creation of the container entity in the Pod, mainly calculating whether the sandbox and container have changed, creating the Sandbox container, starting the business container, etc. Starting the container includes pulling the image, producing the configuration information of the business container, calling the container runtime API to create the container, starting the container, executing the post starthook and other actions. It can be seen that the process of creating a container group is very long. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for starting a container group, so as to solve the problem that it takes a long time to create a container group in the related art.

[0005] In a first aspect, an embodiment of the present application provides a method for starting a container group, including:

[0006] Obtaining a startup instruction of the container group, wherein the startup instruction includes startup information of the container group;

[0007] Based on the startup information and a locally stored sandbox container pool, obtaining a sandbox container;

[0008] Based on the startup information and the locally stored business container pool, obtaining a business container;

[0009] After starting the sandbox container, start the service container to start a container group.

[0010] In a second aspect, an embodiment of the present application provides a starting device for a container group, comprising:

[0011] An instruction acquisition module, used to acquire a startup instruction of the container group, wherein the startup instruction includes startup information of the container group;

[0012] A sandbox container acquisition module, used to acquire a sandbox container based on the startup information and a locally stored sandbox container pool;

[0013] A service container acquisition module, used to acquire a service container based on the startup information and a locally stored service container pool;

[0014] The container startup module is used to start the business container after starting the sandbox container to start a container group.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0016] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the method for starting the container group.

[0017] In a fourth aspect, an embodiment of the present application provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the above-mentioned method for starting a container group.

[0018] In the embodiment of the present application, a startup instruction of a container group is obtained, the startup instruction includes startup information of the container group, a sandbox container is obtained based on the startup information and a locally saved sandbox container pool, a business container is obtained based on the startup information and a locally saved business container pool, and after starting the sandbox container, the business container is started to start a container group. In this way, by using the pre-saved sandbox container pool and business container pool to start the container group, it is possible to avoid pulling images to create business containers, and thus the container group can be started quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 A schematic diagram of a process for creating a container pool provided in an embodiment of the present application;

[0021] Figure 2 A schematic diagram of a process for creating a container pool provided in an embodiment of the present application;

[0022] Figure 3A flowchart of a method for starting a container group provided in an embodiment of the present application;

[0023] Figure 4 A flowchart of another method for starting a container group provided in an embodiment of the present application;

[0024] Figure 5 A schematic diagram of the structure of a starting device for a container group provided in an embodiment of the present application;

[0025] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing a method for starting a container group provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to solve the problem of a long time to create a container group in the related art, the embodiments of the present application provide a method, device, electronic device and storage medium for starting a container group.

[0027] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0028] In order to facilitate the understanding of this application, the technical terms involved in this application are:

[0029] Container is a technology that packages software into standardized units for development, delivery, and deployment.

[0030] K8s is an open source platform for automated deployment, expansion, and operation of container clusters. Application developers do not need to worry about the specific allocation and settings of underlying CPU, memory, network and other basic resources, but only need to focus on describing the deployment architecture of containerized applications and submitting them to Kubernetes through a declarative application programming interface (API). Kubernetes will use various resource objects such as Service, Deployment, Pod, etc. to complete automated deployment according to user expectations.

[0031] Pod is the smallest scheduling unit of Kubernetes. A pod can contain at least one container.

[0032] A PodSandbox container, usually abbreviated as PodSandbox, is used to provide a network stack for a business container. One sandbox container corresponds to at least one business container. Before starting a business container, the sandbox container needs to be started. In an embodiment of the present application, one sandbox container corresponds to one business container.

[0033] In some scenarios such as function computing, the server completes the startup of pods (including real-time creation of application containers), business processing, and response in one request from the client. However, the startup speed of pods in related technologies is relatively slow, which will lead to a very long response time for concurrent requests, thus becoming a pain point affecting upper-level businesses.

[0034] To this end, an embodiment of the present application provides a pod startup method to improve the startup speed of the pod. To achieve this purpose, a business container pool can be established first. Figure 1 A schematic diagram of a process for creating a container pool is provided for an embodiment of the present application, wherein the client can provide the container pool creation requirement, i.e., custom resource (Custom Resource, CR) to ApiServer (deployed on the management node of Kubernetes), containerPoolController (usually deployed on the business node of Kubernetes) can monitor the container pool creation requirement from ApiServer, and based on the container pool creation requirement, send container pool rules to containerPoolAgent (usually deployed on each business node of Kubernetes), and then each containerPoolAgent creates a sandbox container pool podsandboxpool and a business container pool containerPool locally based on the sent container pool rules.

[0035] Figure 2 A schematic diagram of a process for creating a container pool provided in an embodiment of the present application, wherein any containerPoolAgent receives a command to create a containerPool and initializes a map<string,list> As a podsandbox pool, the key is the app+version of CR. According to the CR configuration rules, create a podsandbox and put the podsandbox into the podsandbox pool. That is, vlue is a podsandbox instance. Then, initialize the map<string,list> As a container pool, the key is the app+version of CR. According to the CR configuration rules, a business container is created and placed in the container pool. That is, vlue is a business container instance.

[0036] Figure 3A flowchart of a method for starting a container group provided in an embodiment of the present application, wherein kubelet (usually deployed on each business node of Kubernetes) monitors the creation of a pod, calls RunPodSandbox, and CRI obtains PodSandbox from the PodSandbox pool and returns it, and calls CreateContainer to obtain the business container from the container pool and returns it.

[0037] Figure 4 A flowchart of another method for starting a container group provided in an embodiment of the present application includes the following steps.

[0038] In step 401, a startup instruction of a container group is obtained, where the startup instruction includes startup information of the container group.

[0039] The startup information includes information such as what kind of container to start and how many containers to start.

[0040] In step 402, a sandbox container is obtained based on the startup information and a locally stored sandbox container pool.

[0041] In order to adapt to the calling interface of the existing sandbox container of Kubernetes and to reduce the intrusion into Kubernetes, the first calling request initiated to the sandbox container through the container runtime interface such as RunPodSandbox can be intercepted. The first calling request includes startup requirements such as app and version. The startup requirements are determined according to the startup information. Then, a sandbox container that is idle and meets the startup requirements is obtained from the sandbox container pool, and then the first calling request is responded to based on the acquisition result of the sandbox container.

[0042] For example, when the sandbox container is successfully obtained, the first call request can be responded to based on the container identifier of the sandbox container; when the sandbox container is not successfully obtained, the process of creating the sandbox container originally corresponding to the first call request can be executed, and after the sandbox container is successfully created, the first call request can be responded to based on the container identifier of the sandbox container.

[0043] In step 403, a service container is obtained based on the startup information and a locally stored service container pool.

[0044] Similarly, in order to adapt to the calling interface of the existing business container of Kubernetes and to reduce the intrusion into Kubernetes, the second calling request initiated to the business container through the container runtime interface such as CreateContainer can be intercepted. The second calling request includes the startup requirements. Then, the business container that is idle and meets the startup requirements is obtained from the business container pool, and then the second calling request is responded to based on the acquisition result of the business container.

[0045] For example, when the business container is successfully obtained, the second call request can be responded to based on the container identifier of the business container; when the business container is not successfully obtained, the process of creating the business container originally corresponding to the second call request can be executed, and after the business container is successfully created, the second call request can be responded to based on the container identifier of the business container.

[0046] In step 404, after the sandbox container is started, the business container is started to start a container group.

[0047] Generally, after starting the sandbox container, a network stack can be provided, and the business container can be successfully started with the help of the network stack, thereby successfully starting a container group.

[0048] In step 405, a removal instruction of the container group is obtained.

[0049] In step 406, the sandbox container is released.

[0050] Similarly, in order to adapt to the existing sandbox container removal interface of Kubernetes and to reduce the intrusion into Kubernetes, the first removal request initiated to the sandbox container through the container runtime interface such as RemovePodSandbox can be intercepted, and the sandbox container can be released based on the first removal request, and the first removal request can be responded to based on the release result of the sandbox container. Releasing the sandbox container can be operations such as releasing the resources occupied by the sandbox container and updating the status of the sandbox container to an available state.

[0051] In step 407, the service container is released.

[0052] Similarly, in order to adapt to the removal interface of the existing business container of Kubernetes and to reduce the intrusion into Kubernetes, the second removal request initiated to the business container through the container runtime interface such as RemoveContainer can be intercepted, and the business container is released based on the second removal request, and the second removal request is responded to based on the release result of the business container. Releasing the business container can be operations such as releasing the resources occupied by the business container and updating the state of the business container to an available state.

[0053] In addition, during specific implementation, the sandbox container pool and business container pool can be managed according to the following steps:

[0054] If a container addition instruction is received, a new sandbox container is added to the sandbox container pool, and a new business container is added to the business container pool;

[0055] If a container removal instruction is received, the corresponding sandbox container is removed from the sandbox container pool, and the corresponding business container is removed from the business container pool;

[0056] If a container update instruction is received, the business container corresponding to the business container pool is updated, or the sandbox container corresponding to the sandbox container pool is updated, and the business container corresponding to the business container pool is updated;

[0057] If a container viewing instruction is received, the sandbox container information of the sandbox container pool is obtained, the business container information of the business container pool is obtained, and the container viewing instruction is responded to based on the sandbox container information and the business container information.

[0058] The present application proposes a method for quickly starting a Pod, which can transform the real-time creation of the container into pre-creation in scenarios such as creating a business container in real time and completing business processing, so as to quickly start the Pod and significantly reduce the response time of the client request.

[0059] The container group startup method provided in the embodiment of the present application is described below in conjunction with specific embodiments.

[0060] The core steps of this application include container pool processing and container runtime interface (CRI) processing. Among them, container pool processing is implemented through a CS architecture for managing container pools. As the control plane, the server is responsible for maintaining the configuration of the container pool and sending it to the client, which receives the configuration and completes the actual container pool maintenance. CRI processing uses the new CRI to access Kubelet (deployed on each business node), and executes Kubelet's commands through CRI to take out the container from the container pool and return it, thereby completing the container startup.

[0061] It mainly includes the following contents and steps:

[0062] 1. Implement container pool control containerPoolController, which can be deployed in Deployment mode and is responsible for managing container pool rules.

[0063] As a server based on gRPC, containerPoolController can list and monitor the custom resources (ContainerPoolRule CR) of container pool rules after startup, and wait for the container pool agent (containerPoolAgent) to initiate a connection request. After establishing a connection with containerPoolAgent, containerPoolController can aggregate qualified ContainerPoolRule CRs based on the node information of the node submitted by containerPoolAgent, and send the aggregated ContainerPoolRule CR to containerPoolAgent. At the same time, containerPoolController can send the watched events of adding, deleting, and modifying ContainerPoolRule CRs to containerPoolAgent through a duplex channel.

[0064] 2. Implement containerPoolAgent, which can be deployed as DaemonSet. It is responsible for establishing a connection with containerPoolController and receiving instructions issued by it.

[0065] a. Add new instructions for ContainerPoolRule CR.

[0066] The containerPoolAgent forms a key based on app and version, and initializes two empty lists as values, one in the container pool map and the other in the podsandbox pool map. That is, the keys in both the containerpool map and the podsandbox pool map are app and version. Then, according to the ContainerPoolRule CR, podSandpox and business containers are created and added to the two lists respectively. That is, the list in the container pool map stores container instances (i.e. business container examples), and the list in the podsandbox pool map stores podsandbox instances (i.e. sandbox container examples).

[0067] b. Delete the CR instruction for ContainerPoolRule.

[0068] ContainerPoolAgent forms a key based on app and version, and based on the key, removes the corresponding business container and sandbox container from the containerpool map and podsandbox pool map respectively.

[0069] c. Update the instructions for ContainerPoolRule CR.

[0070] ContainerPoolAgent forms a key based on app and version, obtains lists from container pool map and podsandbox pool map respectively, changes the number of podSandboxes according to the configuration, and changes the number and / or configuration of continers.

[0071] d. Query the ContainerPoolRule CR command.

[0072] Get the lists from the container pool map and podsandbox pool map respectively, and return the actual situation.

[0073] 3. Implement specific container runtime CRI for interaction with Kubelet, mainly involving RunPodSandbox, CreateContainer, RemovePodSandbox, and RemoveContainer.

[0074] Generally, when creating a pod, perform the following steps a and b.

[0075] a. When Kubelet calls RunPodSandbox, it obtains the app and version through the labels in the configuration file (RunPodSandboxRequest.Config) of the RunPodSandbox request, and obtains a PodSandbox from the podsandbox pool map according to the app and version. If a PodSandbox is obtained, it is marked as used, and then the container identifier of the PodSandbox is used to construct a RunPodSandboxResponse and return it; if a PodSandbox is not obtained, the actual PodSandbox creation process of the container runtime is called, and the created PodSandbox is placed in the podsandbox pool map.

[0076] b. When Kubelet calls CreateContainer, it obtains app and version through Labels in the configuration file (CreateContainerRequest.Config) of the container request, and obtains a container (business container) from the container pool map according to app and version. If a container is obtained, it is marked as used, and then the container ID of the container is used to construct a CreateContainerResponse and return it; if the container is not obtained, the actual container creation process of the container runtime is called, and the created container is placed in the container pool map.

[0077] Generally, when removing a pod, perform steps c and d below.

[0078] c. When Kubelet calls RemovePodSandbox, it obtains PodSandboxId through RemovePodSandboxRequest, then obtains sandbox, app, and version through PodSandboxId, puts sandbox back into podsandbox pool according to app and version, and finally returns RemovePodSandboxResponse.

[0079] d. When Kubelet calls RemoveContainer, it obtains ContainerId through RemoveContainerRequest, then obtains container, app and version through ContainerId, puts the container back into the container pool according to app and version, and finally returns RemoveContainerResponse.

[0080] In the embodiment of the present application, the cached container pool can be generated according to the customized strategy, such as the number of caches, the cache strategy, etc. The generation method of the container pool is relatively flexible, and the container is pre-created and cached in the container pool, which can avoid real-time image pulling and container creation, shorten the time consumption, and thus quickly create a pod. In addition, the new CRI can be docked with the CRI of the original container to avoid excessive intrusion into the original logic.

[0081] In specific implementation, Kubernetes can be used in combination with the knative framework. The following uses the combination of the two as an example to introduce the pod startup process.

[0082] 1) Prepare 5 virtual machines with 16G memory and 8-core CPU, deploy a high-availability Kubernetes cluster (3 management nodes and 2 business nodes), and deploy components such as containerPoolController, containerPoolAgent, and knative (deployed on each business node) on it. After containerPoolController is initialized and listens to the port, containerPoolAgent starts and initiates a connection through the service of containerPoolController.

[0083] 2) Write a ContainerPoolRule CR and submit it to the API Server.

[0084] 3) ContainerPoolController monitors the ContainerPoolRule CR, converts it into internal instructions and sends it to the containerPoolAgent on each node.

[0085] 4) After receiving the instruction, the containerPoolAgent on each node initializes the local podsandboxpool and container pool. The actual created containers can be viewed through the ps command during container runtime.

[0086] 5) Write ksvc CR and submit it to API Server. API Server processes ksvc CR to obtain a uniform resource locator (ULR).

[0087] 6) The client initiates a request through the URL, which triggers knative to call Kubernetes to create a pod.

[0088] When the method provided in the embodiments of the present application is implemented by software or hardware or a combination of software and hardware, the electronic device may include multiple functional modules, and each functional module may include software, hardware or a combination thereof.

[0089] Based on the same technical concept, an embodiment of the present application also provides a starting device for a container group. The principle of solving the problem by the starting device for the container group is similar to that of the starting method for the container group. Therefore, the implementation of the starting device for the container group can refer to the implementation of the starting method for the container group, and the repeated parts will not be repeated.

[0090] Figure 5 A schematic diagram of the structure of a container group startup device provided in an embodiment of the present application includes an instruction acquisition module 501, a sandbox container acquisition module 502, a business container acquisition module 503, and a container startup module 504.

[0091] An instruction acquisition module 501 is used to acquire a startup instruction of a container group, wherein the startup instruction includes startup information of the container group;

[0092] A sandbox container acquisition module 502 is used to acquire a sandbox container based on the startup information and a locally stored sandbox container pool;

[0093] A service container acquisition module 503, configured to acquire a service container based on the startup information and a locally stored service container pool;

[0094] The container starting module 504 is used to start the business container after starting the sandbox container to start a container group.

[0095] In some embodiments, the sandbox container acquisition module 502 is specifically used to:

[0096] intercepting a first call request initiated to the sandbox container through a container runtime interface, where the first call request includes a startup requirement, and the startup requirement is determined according to the startup information;

[0097] Obtaining, from the sandbox container pool, a sandbox container that is in an idle state and meets the startup requirement;

[0098] Based on the acquisition result of the sandbox container, respond to the first call request.

[0099] In some embodiments, the business container acquisition module 503 is specifically used to:

[0100] intercepting a second call request initiated to the business container through the container runtime interface, where the second call request includes the startup requirement;

[0101] Acquire a service container that is in an idle state and meets the startup requirements from the service container pool;

[0102] Based on the acquisition result of the business container, respond to the second calling request.

[0103] In some embodiments, a sandbox container release module 505 and a business container release module 506 are also included:

[0104] The instruction acquisition module 501 is further used to acquire a removal instruction of a container group after starting a container group;

[0105] The sandbox container releasing module 505 is used to release the sandbox container;

[0106] The service container releasing module 506 is used to release the service container.

[0107] In some embodiments, the sandbox container release module 505 is specifically used to:

[0108] intercepting a first removal request initiated to the sandbox container through a container runtime interface;

[0109] Based on the first removal request, releasing the sandbox container;

[0110] Responding to the first removal request based on the release result of the sandbox container;

[0111] In some embodiments, the service container release module 506 is specifically used to:

[0112] intercepting a second removal request initiated to the business container through a container runtime interface;

[0113] Based on the second removal request, releasing the service container;

[0114] Based on the release result of the service container, respond to the second removal request.

[0115] In some embodiments, a container management module 507 is further included, which is used to manage the sandbox container pool and the business container pool according to the following steps:

[0116] If a container adding instruction is received, a new sandbox container is added to the sandbox container pool, and a new service container is added to the service container pool;

[0117] If a container removal instruction is received, the corresponding sandbox container is removed from the sandbox container pool, and the corresponding business container is removed from the business container pool;

[0118] If a container update instruction is received, the business container corresponding to the business container pool is updated, or the sandbox container corresponding to the sandbox container pool is updated, and the business container corresponding to the business container pool is updated;

[0119] If a container viewing instruction is received, the sandbox container information of the sandbox container pool is obtained, the business container information of the business container pool is obtained, and the container viewing instruction is responded to based on the sandbox container information and the business container information.

[0120] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0121] After introducing the comparative learning method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0122] Refer to the following Figure 6 The electronic device 130 implemented according to this embodiment of the present application is described. Figure 6 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0123] like Figure 6 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0124] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0125] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0126] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0127] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0128] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 132 including instructions, and the instructions can be executed by the processor 131 to complete the above-mentioned comparative learning method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0129] In an exemplary embodiment, the electronic device of the present application may include at least one processor and at least one memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any exemplary method provided in the present application.

[0130] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in the present application.

[0131] Furthermore, the computer program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0132] The program product for starting the container group in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.

[0133] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0134] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0135] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0136] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0137] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0138] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0139] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0142] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0143] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for starting a container group, characterized in that: include: Obtaining a startup instruction of the container group, wherein the startup instruction includes startup information of the container group; Based on the startup information and a locally stored sandbox container pool, obtaining a sandbox container; Based on the startup information and the locally stored business container pool, obtaining a business container; After starting the sandbox container, starting the business container to start a container group; The sandbox container pool and the business container pool are created according to the following steps: The client provides the container pool creation requirement to ApiServer, and containerPoolController monitors the container pool creation requirement from ApiServer, and based on the container pool creation requirement, sends container pool rules to containerPoolAgent, so that each containerPoolAgent creates the sandbox container pool and the business container pool locally based on the sent container pool rules.

2. The method according to claim 1, characterized in that Based on the startup information and the locally stored sandbox container pool, obtaining a sandbox container includes: intercepting a first call request initiated to the sandbox container through a container runtime interface, where the first call request includes a startup requirement, and the startup requirement is determined according to the startup information; Obtaining, from the sandbox container pool, a sandbox container that is in an idle state and meets the startup requirements; Based on the acquisition result of the sandbox container, respond to the first call request.

3. The method according to claim 2, characterized in that Based on the startup information and the locally stored business container pool, obtaining a business container includes: intercepting a second call request initiated to the business container through the container runtime interface, where the second call request includes the startup requirement; Acquire a service container that is in an idle state and meets the startup requirements from the service container pool; Based on the acquisition result of the business container, respond to the second calling request.

4. The method according to claim 1, characterized in that After starting a container group, it also includes: Obtaining a removal instruction for the container group; releasing the sandbox container; Release the service container.

5. The method according to claim 4, characterized in that Releasing the sandbox container includes: intercepting a first removal request initiated to the sandbox container through a container runtime interface; Based on the first removal request, releasing the sandbox container; The first removal request is responded to based on the release result of the sandbox container.

6. The method according to claim 5, characterized in that Releasing the service container includes: intercepting a second removal request initiated to the business container through a container runtime interface; Based on the second removal request, releasing the service container; Based on the release result of the service container, respond to the second removal request.

7. The method according to claim 1, characterized in that The sandbox container pool and the service container pool are managed according to the following steps: If a container adding instruction is received, a new sandbox container is added to the sandbox container pool, and a new service container is added to the service container pool; If a container removal instruction is received, the corresponding sandbox container is removed from the sandbox container pool, and the corresponding business container is removed from the business container pool; If a container update instruction is received, the business container corresponding to the business container pool is updated, or the sandbox container corresponding to the sandbox container pool is updated, and the business container corresponding to the business container pool is updated; If a container viewing instruction is received, the sandbox container information of the sandbox container pool is obtained, the business container information of the business container pool is obtained, and the container viewing instruction is responded to based on the sandbox container information and the business container information.

8. A starting device for a container group, characterized in that: include: An instruction acquisition module, used to acquire a startup instruction of the container group, wherein the startup instruction includes startup information of the container group; A sandbox container acquisition module, used to acquire a sandbox container based on the startup information and a locally stored sandbox container pool; A service container acquisition module, used to acquire a service container based on the startup information and a locally stored service container pool; A container startup module, used to start the business container after starting the sandbox container, so as to start a container group; The sandbox container pool and the business container pool are created according to the following steps: The client provides the container pool creation requirement to ApiServer, and containerPoolController monitors the container pool creation requirement from ApiServer, and based on the container pool creation requirement, sends container pool rules to containerPoolAgent, so that each containerPoolAgent creates the sandbox container pool and the business container pool locally based on the sent container pool rules.

9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method as claimed in any one of claims 1 to 8.