Method, device and system for processing container group instances
By receiving control commands in the serverless container orchestration system, calling the cloud platform to create container group instances and persistent storage volume resources, the problem that the serverless container orchestration system does not support persistent storage volume declarations is solved, and cloud platform users are realized Persistent storage of business data.
Patent Information
- Application Number
- CN202010280081.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-10
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-04-10
AI Technical Summary
The serverless container orchestration system does not support persistent storage volume declarations and cannot provide persistent storage capabilities for user business data of cloud platform.
By receiving control commands from the serverless container orchestration system, we call elastic container instances on the cloud platform to create container group instances, and create persistent storage volume resources on the elastic block storage device, and persistent storage volume declaration method to persist data Storage to persistent storage volume resources.
It realizes persistent storage volume declaration based on serverless container orchestration system, provides persistent storage capabilities for cloud platform user business data, and solves the problem that serverless container orchestration system does not support persistent storage volume declaration.
Smart Images

Figure CN113296871B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and system for processing a container group instance. Background Art
[0002] In the prior art, the container orchestration system (Kubernetes, i.e., K8S system) provides a variety of implementation methods for providing persistent storage capabilities for business data. Among them, Persistent Volume Claim (PVC) is one of the methods widely used by users, which has the advantages of easy use and strong scalability.
[0003] However, the current serverless container orchestration system (Serverless Kubernetes, ASK system) does not support PVC and cannot provide persistent storage capabilities for user business data on the cloud platform.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method, device and system for processing a container group instance, so as to at least solve the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capability for user business data of the cloud platform.
[0006] According to one aspect of an embodiment of the present application, a method for processing a container group instance is provided, comprising: receiving a control command from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; creating the container group instance and the persistent storage volume resource in accordance with the control command; and persistently storing data generated by the container group instance in the persistent storage volume resource by using a persistent storage volume declaration method.
[0007] According to another aspect of an embodiment of the present application, a method for processing a container group instance is also provided, including: generating a control command, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; sending a control command to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource in accordance with the control command.
[0008] According to another aspect of an embodiment of the present application, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above-mentioned container group instance processing methods.
[0009] According to another aspect of an embodiment of the present application, a processing device for a container group instance is also provided, including: a processor; and a memory, connected to the above processor, for providing the above processor with instructions for processing the following processing steps: receiving a control command from a serverless container orchestration system, wherein the above control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; creating the above container group instance and the above persistent storage volume resource in accordance with the above control command; and using a persistent storage volume declaration method to persistently store data generated by the above container group instance in the above persistent storage volume resource.
[0010] According to another aspect of an embodiment of the present application, a system for processing container group instances is also provided, including: a serverless container orchestration system and a cloud platform; the serverless container orchestration system is used to generate a control command and send the control command to the cloud platform, wherein the control command is used to call an elastic container instance on the cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the cloud platform is used to receive a control command from the serverless container orchestration system, wherein the control command is used to call an elastic container instance on the cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the container group instance and the persistent storage volume resource are created in accordance with the control command; and data generated by the container group instance is persistently stored in the persistent storage volume resource in a persistent storage volume declaration manner.
[0011] In an embodiment of the present application, based on compliance with the K8S system's usage specifications for persistent storage volume declaration PVC, a control command is received from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the container group instance and the persistent storage volume resource are created in accordance with the control command; and the data generated by the container group instance is persistently stored in the persistent storage volume resource using a persistent storage volume declaration method.
[0012] Based on the embodiment of the present application, the cloud platform receives the control command issued by the cloud disk controller DiskController in the serverless container orchestration system ASK system, and calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0013] Therefore, the embodiment of the present application achieves the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system, thereby achieving the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] 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:
[0015] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing a container group instance according to an embodiment of the present application;
[0016] Figure 2 is a flowchart of a method for processing a container group instance according to an embodiment of the present application;
[0017] Figure 3 is a schematic diagram of an optional interaction scenario between an ASK system and an elastic container instance ECI according to an embodiment of the present application;
[0018] Figure 4 is a schematic diagram of an optional interaction scenario between an ASK system and a cloud platform according to an embodiment of the present application;
[0019] Figure 5 is a flowchart of another method for processing a container group instance according to an embodiment of the present application;
[0020] Figure 6 is a structural schematic diagram of a processing device for a container group instance according to an embodiment of the present application;
[0021] Figure 7 is a schematic structural diagram of a processing device of another container group example according to an embodiment of the present application;
[0022] Figure 8 is a structural schematic diagram of a processing device of a container group instance according to an embodiment of the present application;
[0023] Fig. 9 is a structural schematic diagram of a processing system for a container group instance according to an embodiment of the present application;
[0024] Fig.10 It is a structural block diagram of another computer terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Example 1
[0028] According to an embodiment of the present application, an embodiment of a method for processing a container group instance is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for processing a container group instance is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0030] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the processing method of the container group instance in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the processing method of the container group instance described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0034] Under the above operating environment, this application provides Figure 2 A method for processing a container group instance is shown. Figure 2 is a flowchart of a method for processing a container group instance according to an embodiment of the present application, such as Figure 2 As shown, the method for processing the container group instance includes:
[0035] Step S202, receiving a control command from the serverless container orchestration system, wherein the control command is used to call an elastic container instance on the cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device;
[0036] Step S204: creating the container group instance and the persistent storage volume resource according to the control command;
[0037] Step S206: Use a persistent storage volume declaration method to persistently store the data generated by the container group instance in the persistent storage volume resource.
[0038] In an embodiment of the present application, based on compliance with the K8S system's usage specifications for persistent storage volume declaration PVC, a control command is received from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the container group instance and the persistent storage volume resource are created in accordance with the control command; and the data generated by the container group instance is persistently stored in the persistent storage volume resource using a persistent storage volume declaration method.
[0039] Based on the embodiment of the present application, the cloud platform receives the control command issued by the cloud disk controller DiskController in the serverless container orchestration ASK system, and calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0040] Therefore, the embodiment of the present application achieves the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system, thereby achieving the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform.
[0041] It should be noted that the execution subject of the embodiment of the present application is a cloud platform. Optionally, the serverless container orchestration system may be a Serverless Kubernetes system, namely, an ASK system; the elastic block storage device may be an elastic block storage device EBS; the elastic container instance may be an elastic container instance ECI; the relationship diagram between the serverless container orchestration ASK system and the elastic container instance ECI may be, but is not limited to, as follows: Figure 3 As shown, a communication connection is established between the serverless container orchestration ASK system and the elastic container instance ECI.
[0042] As an optional embodiment, receiving the control command from the serverless container orchestration system includes:
[0043] Receive a command to create a container group from a virtual node in the serverless container orchestration system;
[0044] Receive a command to create a cloud disk from a cloud disk controller in the serverless container orchestration system.
[0045] In the above optional embodiments, the serverless container orchestration ASK system can specifically send a create container group command to the cloud platform through a virtual node, so as to call the elastic container instance on the cloud platform to create a container group instance according to the create container group command; and the serverless container orchestration ASK system can specifically send a create cloud disk command to the cloud platform through a cloud disk controller DiskController, so as to create a persistent storage volume resource on the elastic block storage device of the cloud platform according to the create cloud disk command.
[0046] It should be noted that the optional or preferred container group instance processing method embodiments in the embodiments of the present application can be applied to, but not limited to, the following application scenarios: ASK system users want to use the elastic block storage device EBS by declaring PVCs of persistent storage volumes to provide persistent storage capabilities for business data.
[0047] In an optional container group instance processing method embodiment provided in an embodiment of the present application, based on complying with the K8S system's use specification for persistent storage volume declaration PVC, in order to solve the technical problem that the current ASK system does not support persistent storage volume declaration PVC in the prior art, the following innovative designs are mainly performed:
[0048] In an optional embodiment, Figure 4 As shown, by adding a custom cloud disk controller DiskController in the ASK system, the main function of the cloud disk controller DiskController is to send a create cloud disk command to the cloud platform to dynamically create a persistent storage volume resource on the elastic block storage device of the cloud platform according to the create cloud disk command; the main function of the virtual node in the above ASK system is to send a create container group command to the cloud platform to realize the automatic creation of a container group instance by calling the elastic container instance on the cloud platform according to the create container group command.
[0049] Optionally, the cloud disk controller DiskController may respond to a user's operation request for declaring a persistent storage volume PVC based on the storage type StorageClass as a filtering condition, and call the elastic block storage device EBS based on the operation request to create or delete persistent storage volume resources.
[0050] In an optional embodiment, creating the container group instance according to the control command includes:
[0051] Step S302: In response to the control command, the container group instance is created through the elastic container instance management and control system and a cloud disk type storage volume is mounted to the container group instance;
[0052] Step S304: format the cloud disk type storage volume through the elastic container instance agent in the container group instance and mount it to the elastic block storage device.
[0053] Optionally, the control command for creating a container group instance is a container group creation command issued by a virtual node. In the process of creating the container group instance according to the container group creation command, the cloud platform responds to the container group creation command, creates the container group instance through the elastic container instance ECI management and control system, and mounts the cloud disk type storage volume to the container group instance, that is, the embodiment of the present application can complete the mounting and unmounting operations of the cloud disk type storage volume in the ECI management and control system, and the elastic container instance agent (that is, the ECI-Agent component) in the container group instance does not need to care about the mounting and unmounting of the cloud disk type storage volume, and only performs the operation of formatting the cloud disk type storage volume and mounting it to the elastic block storage device.
[0054] In the above optional embodiment, a container orchestration system storage plug-in is integrated into the above elastic container instance agent, wherein the above container orchestration system storage plug-in supports at least one of the following functions:
[0055] Under the control of the elastic container instance management and control system, format the cloud disk type storage volume.
[0056] Under the control of the elastic container instance management system, a mount operation is performed on the cloud disk type storage volume;
[0057] Under the control of the elastic container instance management and control system, an unmount operation is performed on the cloud disk type storage volume.
[0058] As another optional embodiment, the elastic container instance agent ECI-Agent component also integrates a container orchestration system storage plug-in (i.e., a Kubernetes storage plug-in), for example Figure 4 The FlexVolume plug-in shown in the figure, wherein the ECI-Agent component deployed in the ECI management system supports the formatting operation Format, the mounting operation Mount and the unmounting operation Umount for the cloud disk by integrating the FlexVolume plug-in, and implements all interfaces of the FlexVolume plug-in in combination with the ECI management system's attachment operation Attach and separation operation Detach for the cloud disk.
[0059] Through the above optional embodiments of the present application, under the premise of ensuring the native architecture of the unified K8S system, the operations of mounting, unmounting and formatting are separated, and the ECI-Agent component does not need to introduce the access key ID (Access Key ID, AK) and the key (Secret Access Key, SK) used in combination with the access key ID.
[0060] In an optional embodiment, creating the container group instance through the elastic container instance management and control system and mounting the cloud disk type storage volume to the container group instance includes:
[0061] Step S402, expanding the storage volume types supported by the application program interface of the elastic container instance management and control system, and adding the cloud disk type storage volume;
[0062] Step S404: The elastic container instance management and control system calls the elastic cloud server interface to create the container group instance.
[0063] Step S406: Based on the storage volume identifier of the cloud disk type storage volume, the elastic container instance management and control system calls the elastic cloud server interface to mount the cloud disk type storage volume to the container group instance.
[0064] In the embodiments of the present application, Figure 4 The elastic container instance management and control system (i.e., ECI management and control system) shown supports the cloud disk function. The ECI management and control system is extended by extending the storage volume types supported by the application API interface to add cloud disk type storage volumes. In the process of creating an ECI container group instance, the ECI management and control system first calls the elastic cloud server interface (i.e., ECS interface) provided by the elastic cloud server ECS to create a container group instance, and then, according to the storage volume identifier VolumeID of the cloud disk type storage volume pre-set by the user, the ECI management and control system calls the above ECS interface to mount the cloud disk type storage volume corresponding to the storage volume identifier to the container group instance.
[0065] In the above optional embodiment of the present application, a custom cloud disk controller DiskController is used, and the cloud disk controller DiskController implements interaction with the elastic block storage device EBS according to the addition, deletion, modification and query of the persistent storage volume declaration PVC, and correspondingly implements the addition, deletion, modification and query of the persistent storage volume PV resources. Based on the cloud disk controller DiskController, the corresponding persistent storage volume PV resources can be flexibly operated according to the operation status of the persistent storage volume declaration PVC, shielding the interaction process between the user and the elastic block storage device EBS, reducing the user's learning cost, that is, the user only needs to pay attention to the use of the ASK system.
[0066] In an optional embodiment, the method further includes: if formatting of the cloud disk type storage volume fails or mounting of the cloud disk type storage volume fails by calling the container orchestration system storage plug-in in the elastic container instance agent, an alarm prompt message is issued.
[0067] In the above optional embodiments, since the embodiment of the present application is provided with a FlexVolume plug-in in the elastic container instance agent ECI-Agent component to implement calling the FlexVolume plug-in to format or mount a cloud disk type storage volume, optionally, if calling the FlexVolume plug-in through the ECI-Agent component to format the cloud disk type storage volume fails, or the mounting of the cloud disk type storage volume fails, the user can be informed by outputting an alarm prompt message.
[0068] In an optional embodiment, the method further includes: sending an operation request to a cloud disk controller of the serverless container orchestration system, so that the cloud disk controller generates and issues the create cloud disk command.
[0069] In the above optional embodiment, the cloud platform can also send an operation request to the cloud disk controller DiskController of the ASK system. The main function of the cloud disk controller DiskController is to receive and respond to the user's operation request for the persistent storage volume declaration, and then realize the operation of automatically and dynamically creating persistent storage volume resources by generating and issuing a cloud disk creation command.
[0070] In an optional embodiment, the method further includes: when creating container resources through a serverless container orchestration system, creating a storage volume on an elastic block storage device, wherein the type of the storage volume is a container orchestration system storage plug-in type.
[0071] In the above optional embodiment, when creating container resources through the ASK system, it is necessary to create a storage volume in the elastic block storage device EBS, so as to achieve the purpose of automatically creating or deleting container resources based on the elastic block storage device EBS, and because the type of the storage volume is the container orchestration system storage plug-in type, the elastic container instance ECI can interact with the elastic block storage device EBS based on the FlexVolume plug-in.
[0072] Still Figure 4As shown in the figure, the parameter adaptation of the persistent storage volume declaration PVC to the persistent storage volume PV resource of the elastic container instance ECI is implemented through the virtual node Virtual Kubelet in the ASK system, which will not affect the user's habit of using the Kunernetes system at all. Specifically, the virtual node Virtual Kubelet converts the usage of the persistent storage volume declaration PVC of the existing K8S system into the usage of the cloud disk type storage volume supported by the elastic container instance ECI, so that the elastic container instance ECI can interact with the elastic block storage device EBS based on the FlexVolume plug-in.
[0073] It should be noted that in the embodiment of the present application, the life cycle of PVC / PV in the ASK system is not strongly dependent on the life cycle of the container resource Pod in the ASK system. After the ASK system deletes the container resource Pod, you can still choose to retain the PVC. When creating a new container resource Pod, you can continue to use the PVC to achieve data reuse and persistent storage. In addition, when the cloud disk controller DiskController creates a persistent storage volume PV resource, it also creates a storage area in the elastic block storage device EBS, thereby making full use of the high performance and high availability of the block storage in the elastic block storage device EBS.
[0074] Under the above operating environment, this application provides Figure 5 Another method of processing a container group instance is shown. Figure 5 is a flowchart of another method for processing a container group instance according to an embodiment of the present application, such as Figure 5 As shown, the method for processing the container group instance includes:
[0075] Step S502: Generate a control command, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device;
[0076] Step S504: Send a control command to the cloud platform, so that the cloud platform creates the container group instance and the persistent storage volume resource according to the control command.
[0077] In an embodiment of the present application, based on compliance with the K8S system's usage specifications for persistent storage volume declarations PVC, a control command is generated through a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; a control command is sent to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource in accordance with the control command.
[0078] Based on the embodiment of the present application, the serverless container orchestration ASK system generates and sends a control command to the cloud platform, and then the cloud platform calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0079] As a result, the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system is achieved, thereby realizing the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform.
[0080] It should be noted that the execution subject of the embodiment of the present application is a serverless container orchestration system, that is, Figure 4 The ASK system shown.
[0081] In an optional embodiment, the method further includes: performing parameter adaptation processing of the elastic container instance on a virtual node of the serverless container orchestration system to obtain an adaptation result, wherein the adaptation result is used to call the elastic container instance to create a container group instance.
[0082] Optional, still as Figure 4 As shown, in an embodiment of the present application, the parameter adaptation processing of the elastic container instance is performed on the virtual node VirtualKubelet in the ASK system to obtain the adaptation result, and then the elastic container instance on the cloud platform can be called to create a container group instance based on the above adaptation result.
[0083] Through the above optional embodiments, the parameter adaptation of the persistent storage volume declaration PVC to the persistent storage volume PV resource of the elastic container instance ECI is implemented based on the virtual node Virtual Kubelet in the ASK system, which will not affect the user's existing usage habits of the K8S system at all. Specifically, the virtual node Virtual Kubelet converts the persistent storage volume declaration PVC usage supported by the existing K8S system into the cloud disk usage supported by the elastic container instance ECI, and then the elastic container instance ECI can interact with the elastic block storage device EBS based on the FlexVolume plug-in.
[0084] The FlexVolume plug-in is implemented based on the elastic container instance management system and the elastic container instance agent, and the elastic block storage device is used. The virtual node Virtual Kubelet is used as a bridge to connect the ASK system and the elastic container instance ECI. The following innovative designs are also added in the embodiment of the present application:
[0085] In an optional embodiment, performing parameter adaptation processing on the elastic container instance on the virtual node to obtain the adaptation result includes:
[0086] Step S602, using a list mechanism to check the status information of the persistent storage volume declaration on the virtual node;
[0087] Step S604: if it is determined according to the state information that the persistent storage volume declaration is in a pending state, then continue to wait until the persistent storage volume declaration switches from the pending state to the bound state;
[0088] Step S606, after determining that the persistent storage volume declaration enters the binding state, check the persistent storage volume information bound to the persistent storage volume declaration;
[0089] Step S608: After the persistent storage volume declaration and the persistent storage volume bound to the persistent storage volume declaration pass the check, the preset structure is mapped to the open interface parameters of the elastic container instance to obtain the adaptation result.
[0090] In the above optional embodiment, the state information of PVC / PV resources is obtained by adding a list mechanism for PVC / PV resources on the virtual node in the embodiment of the present application. The state information of the persistent storage volume declaration, i.e., the PVC state information, is checked by using the list mechanism; if the state information determines that the PVC is in a pending state, a period of time is waited until the PVC switches from the pending state to the bound state, and after the PVC enters the bound state, the name information of the PV bound to the PVC is checked.
[0091] After obtaining the name information of the PV, query the detailed information of the PV according to the name information of the PV. Specifically, the PV resource supports the storage plug-in of the container orchestration system, such as Figure 4 The FlexVolume plug-in shown, the driver of the FlexVolume plug-in can be a cloud disk or a hard disk.
[0092] As an optional embodiment, after the above-mentioned persistent storage volume declaration and the persistent storage volume bound to the above-mentioned persistent storage volume declaration pass the inspection, the parameters of the elastic container instance are structure-adapted. Specifically, the standard K8S structure can be mapped to the open interface parameters of the elastic container instance (i.e., ECI OpenAPI input parameters) to obtain the above-mentioned adaptation result.
[0093] In an optional embodiment, the above method includes:
[0094] Step S702, receiving an operation request through a cloud disk controller of the serverless container orchestration system;
[0095] Step S704: acquiring a storage type corresponding to the persistent storage volume declaration based on the operation request;
[0096] Step S706: call the storage plug-in of the above storage type to create or delete a persistent storage volume resource.
[0097] In the above optional embodiment, a custom cloud disk controller DiskController is added to the ASK system. The main function of the cloud disk controller DiskController is to send a create cloud disk command to the cloud platform to dynamically create persistent storage volume resources on the elastic block storage device of the cloud platform according to the create cloud disk command; the main function of the virtual node in the above ASK system is to send a create container group command to the cloud platform to automatically create a container group instance by calling the elastic container instance on the cloud platform according to the create container group command.
[0098] Optionally, the cloud disk controller DiskController may respond to a user's operation request for a persistent storage volume declaration PVC based on the storage type StorageClass corresponding to the persistent storage volume declaration as a filtering condition, and call the elastic block storage device EBS based on the operation request to create or delete persistent storage volume resources.
[0099] In the above optional embodiment of the present application, a custom cloud disk controller DiskController is used, and the cloud disk controller DiskController implements interaction with the elastic block storage device EBS according to the addition, deletion, modification and query of the persistent storage volume declaration PVC, and correspondingly implements the addition, deletion, modification and query of the persistent storage volume PV resources. Based on the cloud disk controller DiskController, the corresponding persistent storage volume PV resources can be flexibly operated according to the operation status of the persistent storage volume declaration PVC, shielding the interaction process between the user and the elastic block storage device EBS, reducing the user's learning cost, that is, the user only needs to pay attention to the use of the ASK system.
[0100] In an optional embodiment, the above method further includes:
[0101] Step S802, creating a container orchestration system cluster;
[0102] Step S804, deploying virtual nodes on the above container orchestration system cluster;
[0103] Step S806: Create a container group instance associated with the persistent storage volume declaration on the virtual node.
[0104] In the above optional embodiment of the present application, since a container orchestration system cluster is created on the elastic cloud server ECS, the user can also build a container orchestration system kubernetes cluster based on the elastic cloud server ECS, and then deploy the virtual node Virtual Kubelet on the container orchestration system cluster. Then, a container group instance associated with a persistent storage volume declaration can be created on the virtual node Virtual Kubelet.
[0105] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the above methods of each embodiment of the present application.
[0107] Example 2
[0108] According to an embodiment of the present application, a device embodiment for implementing the above-mentioned method for processing a container group instance is also provided. Figure 6 is a structural schematic diagram of a processing device for a container group instance according to an embodiment of the present application, such as Figure 6 As shown, the device includes: a receiving module 600, a creating module 602 and a storing module 604, wherein:
[0109] The receiving module 600 is used to receive control commands from the serverless container orchestration system, wherein the control commands are used to call the elastic container instance on the cloud platform to create a container group instance and to create a persistent storage volume resource on the elastic block storage device; the creating module 602 is used to create the container group instance and the persistent storage volume resource in accordance with the control command; the storage module 604 is used to persistently store the data generated by the container group instance in the persistent storage volume resource by using a persistent storage volume declaration method.
[0110] It should be noted that the receiving module 600, the creating module 602 and the storing module 604 correspond to steps S202 to S206 in Embodiment 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0111] According to an embodiment of the present application, another device embodiment for implementing the above-mentioned method for processing a container group instance is also provided. Figure 7 is a structural schematic diagram of a processing device of another container group example according to an embodiment of the present application, such as Figure 7 As shown, the device includes: a generating module 700 and a sending module 702, wherein:
[0112] A generation module 700 is used to generate a control command, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; a sending module 702 is used to send a control command to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource according to the control command.
[0113] It should be noted that the above generation module 700 and the sending module 702 correspond to steps S502 to S504 in Example 1, and the examples and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0114] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0115] Example 3
[0116] According to an embodiment of the present application, an embodiment of a processing device of a container group instance is also provided. The processing device of the container group instance may be any computing device in a computing device group. Figure 8 is a structural schematic diagram of a processing device for a container group instance according to an embodiment of the present application, such as Figure 8 As shown, the processing device of the container group instance includes: a processor 800 and a memory 802, wherein:
[0117] Processor 800; and memory 802, connected to the processor 800, for providing instructions for the processor to process the following processing steps: receiving a control command from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; creating the container group instance and the persistent storage volume resource in accordance with the control command; and persistently storing data generated by the container group instance in the persistent storage volume resource using a persistent storage volume declaration method.
[0118] In an embodiment of the present application, based on compliance with the K8S system's usage specifications for persistent storage volume declaration PVC, a control command is received from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the container group instance and the persistent storage volume resource are created in accordance with the control command; and the data generated by the container group instance is persistently stored in the persistent storage volume resource using a persistent storage volume declaration method.
[0119] Based on the embodiment of the present application, the cloud platform receives the control command issued by the cloud disk controller DiskController in the serverless container orchestration system ASK system, and calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0120] Therefore, the embodiment of the present application achieves the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system, thereby achieving the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform.
[0121] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0122] Example 4
[0123] According to an embodiment of the present application, an embodiment of a system for processing a container group instance is also provided. Fig. 9 is a structural diagram of a processing system for a container group instance according to an embodiment of the present application, such as Fig. 9 As shown, the processing system of the container group instance includes: a serverless container orchestration system 900 and a cloud platform 902, wherein:
[0124] The serverless container orchestration system 900 is used to generate a control command and send the control command to the cloud platform, wherein the control command is used to call the elastic container instance on the cloud platform to create a container group instance and create a persistent storage volume resource on the elastic block storage device; the cloud platform 902 is used to receive a control command from the serverless container orchestration system, wherein the control command is used to call the elastic container instance on the cloud platform to create a container group instance and create a persistent storage volume resource on the elastic block storage device; create the container group instance and the persistent storage volume resource according to the control command; and use a persistent storage volume declaration method to persistently store the data generated by the container group instance in the persistent storage volume resource.
[0125] It should be noted that the above Figure 4 As an optional schematic diagram of the interaction scenario between the ASK system and the cloud platform, an optional structural schematic diagram of the processing system of the above container group instance is also shown. The above serverless container orchestration system 900 can be but is not limited to the following: Figure 4 The ASK system shown in FIG. 1 may be, but is not limited to, the cloud platform 902 as follows: Figure 4 The cloud platform shown.
[0126] Based on the embodiment of the present application, the cloud platform receives the control command issued by the cloud disk controller DiskController in the serverless container orchestration ASK system, and calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0127] Therefore, the embodiment of the present application achieves the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system, thereby achieving the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform.
[0128] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0129] Example 5
[0130] According to an embodiment of the present application, an embodiment of a computer terminal is also provided, and the computer terminal can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above-mentioned computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0131] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0132] In this embodiment, the computer terminal may execute the program code of the following steps in the method for processing a container group instance: receiving a control command from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance; and creating the container group instance in the elastic container instance according to the control command.
[0133] Optionally, Fig.10 is a structural block diagram of another computer terminal according to an embodiment of the present application, such as Fig.10 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 1302 , a memory 1304 , and a peripheral interface 1306 .
[0134] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the processing method and device of the container group instance in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the processing method of the container group instance mentioned above. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] Optionally, the processor may also execute program code of the following steps: receiving a control command from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; creating the container group instance and the persistent storage volume resource in accordance with the control command; and persistently storing the data generated by the container group instance in the persistent storage volume resource using a persistent storage volume declaration method.
[0136] Optionally, the processor may also execute program code of the following steps: receiving a command to create a container group from a virtual node in the serverless container orchestration system; receiving a command to create a cloud disk from a cloud disk controller in the serverless container orchestration system.
[0137] Optionally, the processor may also execute program code of the following steps: in response to the control command, create the container group instance through the elastic container instance management and control system and mount the cloud disk type storage volume to the container group instance; format the cloud disk type storage volume through the elastic container instance agent in the container group instance and mount it to the elastic block storage device.
[0138] Optionally, the processor may also execute program codes of the following steps: expanding the storage volume types supported by the application program interface of the elastic container instance management and control system, and adding the cloud disk type storage volume; creating the container group instance by calling the elastic cloud server interface through the elastic container instance management and control system; and mounting the cloud disk type storage volume to the container group instance by calling the elastic cloud server interface through the elastic container instance management and control system based on the storage volume identifier of the cloud disk type storage volume.
[0139] Optionally, the processor may also execute program codes of the following steps: under the control of the elastic container instance management and control system, formatting the cloud disk type storage volume; under the control of the elastic container instance management and control system, mounting the cloud disk type storage volume; and under the control of the elastic container instance management and control system, unmounting the cloud disk type storage volume.
[0140] Optionally, the processor may also execute the program code of the following steps: if the formatting of the cloud disk type storage volume fails or the mounting of the cloud disk type storage volume fails by calling the container orchestration system storage plug-in in the elastic container instance agent, an alarm prompt message is issued.
[0141] Optionally, the processor may further execute program code of the following steps: sending an operation request to a cloud disk controller of the serverless container orchestration system, so that the cloud disk controller generates and issues the create cloud disk command.
[0142] Optionally, the processor may further execute program code of the following steps: when creating container resources through a serverless container orchestration system, creating a storage volume on an elastic block storage device, wherein the type of the storage volume is a container orchestration system storage plug-in type.
[0143] In an embodiment of the present application, based on compliance with the K8S system's usage specifications for persistent storage volume declaration PVC, a control command is received from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; the container group instance and the persistent storage volume resource are created in accordance with the control command; and the data generated by the container group instance is persistently stored in the persistent storage volume resource using a persistent storage volume declaration method.
[0144] Based on the embodiment of the present application, the cloud platform receives the control command issued by the cloud disk controller DiskController in the serverless container orchestration system ASK system, and calls the elastic container instance on the cloud platform according to the control command through the elastic container instance management and control system to create a container group instance and a persistent storage volume PV resource on the elastic block storage device EBS, and uses the persistent storage volume declaration PVC method to persistently store the data generated by the container group instance in the persistent storage volume PV resource, thereby achieving the purpose of persistently storing the data generated by the ECI container group instance in the persistent storage volume PV resource created by the elastic block storage device EBS by the persistent storage volume declaration PVC method, thereby providing persistent storage capabilities for user business data of the cloud platform.
[0145] Therefore, the embodiment of the present application achieves the purpose of realizing persistent storage volume declaration based on a serverless container orchestration system, thereby achieving the technical effect of providing persistent storage capabilities for user business data of the cloud platform, and further solving the technical problem in the prior art that the serverless container orchestration system does not support persistent storage volume declaration and cannot provide persistent storage capabilities for user business data of the cloud platform.
[0146] Optionally, the processor may also execute program code of the following steps: generating a control command, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; and sending a control command to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource in accordance with the control command.
[0147] Optionally, the processor may further execute program code of the following steps: performing parameter adaptation processing of the elastic container instance on a virtual node of the serverless container orchestration system to obtain an adaptation result, wherein the adaptation result is used to call the elastic container instance to create a container group instance.
[0148] Optionally, the processor may also execute program code of the following steps: using a list mechanism to check the status information of a persistent storage volume declaration on the virtual node; if it is determined that the persistent storage volume declaration is in a pending state based on the status information, then continue to wait until the persistent storage volume declaration switches from the pending state to the bound state; after determining that the persistent storage volume declaration enters the bound state, check the persistent storage volume information bound to the persistent storage volume declaration; after both the persistent storage volume declaration and the persistent storage volume bound to the persistent storage volume declaration pass the check, map the preset structure to the open interface parameters of the elastic container instance to obtain the adaptation result.
[0149] Optionally, the processor may also execute program code of the following steps: receiving an operation request through a cloud disk controller of a serverless container orchestration system; obtaining a storage type corresponding to the persistent storage volume declaration based on the operation request; and calling a storage plug-in of the storage type to create or delete a persistent storage volume resource.
[0150] Optionally, the processor may also execute program code of the following steps: creating a container orchestration system cluster; deploying a virtual node on the container orchestration system cluster; and creating a container group instance associated with the persistent storage volume declaration on the virtual node.
[0151] It can be understood by those skilled in the art that Fig.10The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.10 It does not limit the structure of the above electronic device. For example, the computer terminal may also include Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations are shown.
[0152] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0153] Example 6
[0154] According to an embodiment of the present application, an embodiment of a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for processing a container group instance provided in the above embodiment.
[0155] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0156] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: receiving a control command from a serverless container orchestration system, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; creating the container group instance and the persistent storage volume resource in accordance with the control command; and persistently storing the data generated by the container group instance in the persistent storage volume resource using a persistent storage volume declaration method.
[0157] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: receiving a command to create a container group from a virtual node in the serverless container orchestration system; receiving a command to create a cloud disk from a cloud disk controller in the serverless container orchestration system.
[0158] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: in response to the above control command, creating the above container group instance through the elastic container instance management and control system and mounting the cloud disk type storage volume to the above container group instance; formatting the above cloud disk type storage volume through the elastic container instance agent in the above container group instance and mounting it to the elastic block storage device.
[0159] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: expanding the storage volume types supported by the application program interface of the above-mentioned elastic container instance management and control system, and adding the above-mentioned cloud disk type storage volume; creating the above-mentioned container group instance by calling the elastic cloud server interface through the above-mentioned elastic container instance management and control system; and mounting the above-mentioned cloud disk type storage volume to the above-mentioned container group instance by calling the above-mentioned elastic cloud server interface based on the storage volume identifier of the above-mentioned cloud disk type storage volume through the above-mentioned elastic container instance management and control system.
[0160] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: under the control of the elastic container instance management and control system, performing a formatting operation on the cloud disk type storage volume; under the control of the elastic container instance management and control system, performing a mount operation on the cloud disk type storage volume; under the control of the elastic container instance management and control system, performing an unmounting operation on the cloud disk type storage volume.
[0161] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: if formatting of the cloud disk type storage volume fails or mounting of the cloud disk type storage volume fails by calling the container orchestration system storage plug-in in the elastic container instance agent, an alarm prompt message is issued.
[0162] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: sending an operation request to the cloud disk controller of the serverless container orchestration system, so that the cloud disk controller generates and issues the create cloud disk command.
[0163] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: when creating container resources through a serverless container orchestration system, creating a storage volume on an elastic block storage device, wherein the type of the storage volume is a container orchestration system storage plug-in type.
[0164] Optionally, in this embodiment, the storage medium is configured to store program codes for performing the following steps: generating a control command, wherein the control command is used to call an elastic container instance on a cloud platform to create a container group instance and to create a persistent storage volume resource on an elastic block storage device; and sending a control command to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource in accordance with the control command.
[0165] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: performing parameter adaptation processing of the elastic container instance on a virtual node of the serverless container orchestration system to obtain an adaptation result, wherein the adaptation result is used to call the elastic container instance to create a container group instance.
[0166] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: using a list mechanism to check the status information of the persistent storage volume declaration on the above-mentioned virtual node; if it is determined according to the above-mentioned status information that the above-mentioned persistent storage volume declaration is in a pending state, then continue to wait until the above-mentioned persistent storage volume declaration switches from the above-mentioned pending state to the bound state; after determining that the above-mentioned persistent storage volume declaration enters the above-mentioned binding state, check the persistent storage volume information bound to the above-mentioned persistent storage volume declaration; after the above-mentioned persistent storage volume declaration and the persistent storage volume bound to the above-mentioned persistent storage volume declaration pass the inspection, map the preset structure to the open interface parameters of the above-mentioned elastic container instance to obtain the above-mentioned adaptation result.
[0167] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: receiving an operation request through a cloud disk controller of a serverless container orchestration system; obtaining a storage type corresponding to the above-mentioned persistent storage volume declaration based on the above-mentioned operation request; and calling a storage plug-in of the above-mentioned storage type to create or delete a persistent storage volume resource.
[0168] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: creating a container orchestration system cluster; deploying a virtual node on the container orchestration system cluster; and creating a container group instance associated with a persistent storage volume declaration on the virtual node.
[0169] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0172] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0173] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0174] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0175] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing a container group instance, comprising: Receive a control command from a serverless container orchestration system, wherein the control command includes a create container group command issued by a virtual node in the serverless container orchestration system and a create cloud disk command issued by a cloud disk controller in the serverless container orchestration system, and the control command is used to call an elastic container instance on a cloud platform to create a container group instance based on the create container group command, and to create a persistent storage volume resource on an elastic block storage device based on the create cloud disk command; Creating the container group instance and the persistent storage volume resource according to the control command; The data generated by the container group instance is persistently stored in the persistent storage volume resource by using a persistent storage volume declaration method.
2. The method according to claim 1, wherein: Receiving the control command from the serverless container orchestration system includes: Receiving a command to create a container group from a virtual node in the serverless container orchestration system; A command to create a cloud disk is received from a cloud disk controller in the serverless container orchestration system.
3. The method according to claim 1 or 2, wherein: Creating the container group instance according to the control command includes: In response to the control command, the container group instance is created through the elastic container instance management and control system and a cloud disk type storage volume is mounted to the container group instance; The cloud disk type storage volume is formatted and mounted to the elastic block storage device through the elastic container instance agent in the container group instance.
4. The method according to claim 3, wherein: Creating the container group instance through the elastic container instance management and control system and mounting the cloud disk type storage volume to the container group instance includes: Expanding the storage volume types supported by the application program interface of the elastic container instance management and control system to add the cloud disk type storage volume; The elastic container instance management and control system calls the elastic cloud server interface to create the container group instance; Based on the storage volume identifier of the cloud disk type storage volume, the elastic container instance management and control system calls the elastic cloud server interface to mount the cloud disk type storage volume to the container group instance.
5. The method according to claim 4, wherein: The elastic container instance agent is integrated with a container orchestration system storage plug-in, wherein the container orchestration system storage plug-in supports at least one of the following functions: Under the control of the elastic container instance management and control system, formatting the cloud disk type storage volume; Under the control of the elastic container instance management and control system, a mounting operation is performed on the cloud disk type storage volume; Under the control of the elastic container instance management and control system, an unmounting operation is performed on the cloud disk type storage volume.
6. The method according to claim 5, wherein: The method further comprises: If formatting of the cloud disk type storage volume fails or mounting of the cloud disk type storage volume fails by calling the container orchestration system storage plug-in in the elastic container instance agent, an alarm prompt message is issued.
7. The method according to claim 2, wherein: The method further comprises: An operation request is sent to a cloud disk controller of the serverless container orchestration system, so that the cloud disk controller generates and issues the create cloud disk command.
8. The method according to claim 1, wherein: The method further comprises: When a container resource is created through a serverless container orchestration system, a storage volume is created on an elastic block storage device, wherein the type of the storage volume is a container orchestration system storage plug-in type.
9. A method for processing a container group instance, comprising: Generate a control command, wherein the control command includes a create container group command issued by a virtual node in the serverless container orchestration system and a create cloud disk command issued by a cloud disk controller in the serverless container orchestration system, the control command is used to call an elastic container instance on a cloud platform to create a container group instance based on the create container group command, and to create a persistent storage volume resource on an elastic block storage device based on the create cloud disk command; A control command is sent to the cloud platform so that the cloud platform creates the container group instance and the persistent storage volume resource according to the control command, wherein the cloud platform uses a persistent storage volume declaration method to persistently store the data generated by the container group instance in the persistent storage volume resource.
10. The method according to claim 9, wherein: The method further comprises: Parameter adaptation processing of the elastic container instance is performed on a virtual node of the serverless container orchestration system to obtain an adaptation result, wherein the adaptation result is used to call the elastic container instance to create a container group instance.
11. The method according to claim 10, wherein: Performing parameter adaptation processing on the elastic container instance on the virtual node to obtain the adaptation result includes: Checking the status information of the persistent storage volume declaration on the virtual node using a list mechanism; If it is determined according to the status information that the persistent storage volume declaration is in a pending state, then continue to wait until the persistent storage volume declaration switches from the pending state to a bound state; After determining that the persistent storage volume declaration enters the binding state, checking the persistent storage volume information bound to the persistent storage volume declaration; After the persistent storage volume declaration and the persistent storage volume bound to the persistent storage volume declaration pass the inspection, the preset structure is mapped to the open interface parameters of the elastic container instance to obtain the adaptation result.
12. The method according to claim 9, wherein: The method comprises: Receive operation requests through the cloud disk controller of the serverless container orchestration system; Acquire a storage type corresponding to the persistent storage volume declaration based on the operation request; Call the storage plug-in of the storage type to create or delete persistent storage volume resources.
13. The method according to claim 9, wherein: The method further comprises: Create a container orchestration system cluster; Deploy virtual nodes on the container orchestration system cluster; A container group instance associated with the persistent storage volume claim is created on the virtual node.
14. A storage medium comprising a stored program, wherein: When the program is running, the device where the storage medium is located is controlled to execute the method for processing a container group instance described in any one of claims 1 to 8 or the method for processing a container group instance described in any one of claims 9 to 13.
15. A container group instance processing device, comprising: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Receive a control command from a serverless container orchestration system, wherein the control command includes a create container group command issued by a virtual node in the serverless container orchestration system and a create cloud disk command issued by a cloud disk controller in the serverless container orchestration system, and the control command is used to call an elastic container instance on a cloud platform to create a container group instance based on the create container group command, and to create a persistent storage volume resource on an elastic block storage device based on the create cloud disk command; Creating the container group instance and the persistent storage volume resource according to the control command; The data generated by the container group instance is persistently stored in the persistent storage volume resource by using a persistent storage volume declaration method.
16. A system for processing a container group instance, comprising: Serverless container orchestration systems and cloud platforms; The serverless container orchestration system is used to generate a control command and send the control command to the cloud platform, wherein the control command is used to call the elastic container instance on the cloud platform to create a container group instance and create a persistent storage volume resource on the elastic block storage device; The cloud platform is used to receive control commands from the serverless container orchestration system, wherein the control commands include a create container group command issued by a virtual node in the serverless container orchestration system and a create cloud disk command issued by a cloud disk controller in the serverless container orchestration system, the control command is used to call an elastic container instance on the cloud platform based on the create container group command to create a container group instance, and to create a persistent storage volume resource on an elastic block storage device based on the create cloud disk command; to create the container group instance and the persistent storage volume resource in accordance with the control command; and to persistently store data generated by the container group instance in the persistent storage volume resource using a persistent storage volume declaration method.
Citation Information
Patent Citations
Kubernetes-based method and system for automatic allocation and creation of application storage
CN107193504A
Scheduling method, apparatus, medium, device and system for realizing serviced computing resources
CN109062658A
Method, apparatus, computer system and storage medium for operating redis cluster
CN109062701A
Service-function-free service method based on hybrid cloud computing platform
CN109753302A
Data persistence processing method, device and system and readable storage medium
CN110019081A
