Application delivery method and device in container cloud environment, medium and equipment
By using the control system of the Kubernetes cluster in a container cloud environment, dynamically adjusting the number of containers and slave platforms, the queuing problem caused by the fixed number of Slave nodes in the existing technology is solved, and flexible application delivery needs are achieved.
Patent Information
- Application Number
- CN202411579657.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-14
AI Technical Summary
When the existing continuous delivery platform processes application delivery requests, the number of Slave nodes is fixed and cannot automatically scale, resulting in the need to queue when there are too many tasks and cannot flexibly meet application delivery needs.
In the container cloud environment, the application delivery method is realized through the control system of the Kubernetes cluster. The specific steps include when the main platform receives an application delivery request, selecting an idle node based on the resource usage of the Kubernetes cluster node, creating a new container and creating a slave platform, registering a slave platform to the master platform, executing the application delivery process, and logging out the slave platform and deleting the container after the process is completed.
The continuous delivery platform is achieved to scale and change from the platform, and the container and the number of platforms are dynamically adjusted according to the number of application delivery requests, avoiding the queuing problem caused by the fixed number of the application platform, and flexibly meeting the application delivery needs.
Smart Images

Figure CN119621231A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application deployment technology, and in particular to an application delivery method, device, medium, and equipment in a container cloud environment. Background Art
[0002] At present, the delivery process of cloud-native applications such as code submission, testing, and deployment can be implemented using the continuous delivery platform Jenkins, which usually uses the Master / Slave architecture to run tasks. When there is a demand for application delivery, tasks can be initiated to the Master node, which forwards the tasks to the Slave node for processing after receiving them. The number of Slave nodes is fixed, and they cannot be automatically scaled up and down, which is not flexible, and they need to queue when there are a large number of tasks. Summary of the invention
[0003] In response to at least one of the above technical problems, an embodiment of the present invention provides an application delivery method, device, medium, and equipment in a container cloud environment.
[0004] According to a first aspect, an application delivery method in a container cloud environment provided by an embodiment of the present invention is executed by a control system of a Kubernetes cluster, and the method includes:
[0005] When the main platform of the continuous delivery platform receives an application delivery request, a node in an idle state is selected from each node of the Kubernetes cluster according to the resource usage of each node of the Kubernetes cluster; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container;
[0006] Create a new container on the selected idle node, create a slave platform in the new container, and register the new slave platform with the master platform, so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes;
[0007] After completing the registration on the slave platform, executing the application delivery process corresponding to the application delivery request through the slave platform;
[0008] After the slave platform completes the application delivery process, the slave platform is deregistered from the master platform, and the container where the slave platform is located is deleted.
[0009] In one embodiment, the method further comprises:
[0010] According to the health detection rules, periodically detect the health status of the main platform;
[0011] When the main platform fails, a new main platform is created in the form of a container;
[0012] The hard disk volume corresponding to the failed main platform is allocated to the newly created main platform, so that the newly created main platform provides normal services according to the main platform configuration data in the hard disk volume.
[0013] In one embodiment, the method further comprises:
[0014] Monitor the remaining resources of the Kubernetes cluster;
[0015] When the remaining resources are insufficient to cause a queuing phenomenon of application delivery requests, a new node is added to the Kubernetes cluster to create a new container and a slave platform on the newly added node.
[0016] In one embodiment, before the main platform of the continuous delivery platform receives the application delivery request, the method further includes:
[0017] Install the main platform on a node in the Kubernetes cluster, and create a deployment configuration file, storage volume declaration file, and service-related files for the main platform;
[0018] Create the resources required by the main platform and create a new entry required for external access to the main platform;
[0019] Install the plug-ins required by the main platform to provide services on the node where the main platform is located;
[0020] Configure a container template corresponding to the slave platform so that when a new container is needed, a new container operation is performed according to the container template;
[0021] Set the mounted host directory so that the newly created container can be mounted to the files in the host directory.
[0022] In one embodiment, the master platform is deployed on the nodes of the Kubernetes cluster based on the master platform image, and the slave platform is deployed on the nodes of the Kubernetes cluster based on the slave platform image.
[0023] In one embodiment, the master platform image and the slave platform image are stored in an image repository, and the image repository updates the image stored in itself upon receiving an image update notification.
[0024] In one embodiment, the application delivery request is sent to the main platform by a web hook of a warehouse management tool when a user makes an application delivery request.
[0025] According to a second aspect, an application delivery device in a container cloud environment provided by an embodiment of the present invention is deployed in a control system of a Kubernetes cluster, and the device includes:
[0026] A node selection module, configured to select an idle node from each node of the Kubernetes cluster according to resource usage of each node of the Kubernetes cluster when the main platform of the continuous delivery platform receives an application delivery request; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container;
[0027] A first new creation module is used to create a new container on the selected idle node, create a slave platform in the new container, and register the new slave platform with the master platform so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes;
[0028] A process execution module, used for executing the application delivery process corresponding to the application delivery request through the slave platform after completing the slave platform registration;
[0029] The container deletion module is used to deregister the slave platform from the master platform and delete the container where the slave platform is located after the slave platform completes the application delivery process.
[0030] In one embodiment, the device may further include:
[0031] The health detection module is used to: periodically detect the health status of the main platform according to the health detection rules; when the main platform fails, create a new main platform running in the form of a container; allocate the hard disk volume corresponding to the failed main platform to the newly created main platform, so that the newly created main platform can provide normal services according to the main platform configuration data in the hard disk volume.
[0032] In one embodiment, the device may further include:
[0033] The resource monitoring module is used to monitor the remaining resources of the Kubernetes cluster; when the remaining resources are insufficient to cause a queuing phenomenon of application delivery requests, a new node is added to the Kubernetes cluster to create a new container and slave platform on the newly added node.
[0034] In one embodiment, the device may further include:
[0035] An installation configuration module is used to install the main platform on a node in the Kubernetes cluster before the node selection module receives an application delivery request on the main platform of the continuous delivery platform, and create a new deployment configuration file, storage volume declaration file and service-related files for the main platform; create the resources required by the main platform, and create a new entry required for external access to the main platform; install the plug-ins required for the main platform to provide services on the node where the main platform is located; configure the container template corresponding to the slave platform so that a new container can be created according to the container template when a new container is needed; set the mounted host directory so that the newly created container can be mounted to the file in the host directory.
[0036] In one embodiment, the master platform is deployed on the nodes of the Kubernetes cluster based on the master platform image, and the slave platform is deployed on the nodes of the Kubernetes cluster based on the slave platform image.
[0037] In one embodiment, the master platform image and the slave platform image are stored in an image repository, and the image repository updates the image stored in itself upon receiving an image update notification.
[0038] In one embodiment, the application delivery request is sent to the main platform by a web hook of a warehouse management tool when a user makes an application delivery request.
[0039] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.
[0040] According to a fourth aspect, a computing device provided by an embodiment of the present invention includes a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided by the first aspect is implemented.
[0041] The application delivery method, apparatus, medium, and device in the container cloud environment provided by the embodiment of the present invention can select an idle node when the main platform receives an application delivery request, and then create a container on the idle node, and create a slave platform in the created container, and then register the slave platform to the main platform. After completing the registration, the slave platform can execute the corresponding application delivery process. After completing the application delivery process, the slave platform is deregistered from the main platform, and the corresponding container is deleted. It can be seen that the method provided by the embodiment of the present invention realizes the scalable change of the slave platform of the continuous delivery platform. When there are fewer application delivery requests, the number of containers and slave platforms created is relatively small, and when there are more application delivery requests, the number of containers and slave platforms created is relatively large, which flexibly meets the application delivery requirements and reduces the queuing problem caused by the fixed number of slave platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of an application delivery method in a container cloud environment according to an embodiment of the present invention;
[0043] Figure 2 This is a structural block diagram of an application delivery device in a container cloud environment in one embodiment of the present invention. DETAILED DESCRIPTION
[0044] In a first aspect, an embodiment of the present invention provides an application delivery method in a container cloud environment, wherein the method is executed by a control system of a Kubernetes cluster. Figure 1 The method comprises the following steps S110 to S140:
[0045] S110. When the main platform of the continuous delivery platform receives an application delivery request, a node in an idle state is selected from each node of the Kubernetes cluster according to resource usage of each node of the Kubernetes cluster; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container;
[0046] S120, creating a new container on the selected idle node, creating a slave platform in the new container, and registering the new slave platform with the master platform, so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes;
[0047] S130, after completing the slave platform registration, executing the application delivery process corresponding to the application delivery request through the slave platform;
[0048] S140: After the slave platform completes the application delivery process, the slave platform is deregistered from the master platform, and the container where the slave platform is located is deleted.
[0049] That is to say, when the main platform receives an application delivery request, it can select an idle node, and then create a container on the idle node, and create a slave platform in the created container, and then register the slave platform on the main platform. After completing the registration, the slave platform can execute the corresponding application delivery process, such as submission, testing, and deployment of application code. After completing the application delivery process, the slave platform is deregistered from the main platform and the corresponding container is deleted. It can be seen that the method provided by the embodiment of the present invention realizes the scalability change of the slave platform of the continuous delivery platform. When there are fewer application delivery requests, the number of containers and slave platforms created is relatively small, and when there are more application delivery requests, the number of containers and slave platforms created is relatively large, which flexibly meets the application delivery requirements and reduces the queuing problem caused by the fixed number of slave platforms.
[0050] In one embodiment, the method may further include:
[0051] According to the health detection rules, periodically detect the health status of the main platform;
[0052] When the main platform fails, a new main platform is created in the form of a container;
[0053] The hard disk volume corresponding to the failed main platform is allocated to the newly created main platform, so that the newly created main platform provides normal services according to the main platform configuration data in the hard disk volume.
[0054] It can be seen that health detection rules are set for the main platform. The health detection of the main platform is carried out at regular intervals according to the health detection rules. If a failure is detected in the main platform, a new main platform is created, and the hard disk volume originally allocated to the failed main platform is allocated to the new main platform. In this way, the new main platform will provide normal services according to the main platform configuration data in the hard disk volume, ensuring the normal operation of the continuous delivery platform.
[0055] In one embodiment, the method further comprises:
[0056] Monitor the remaining resources of the Kubernetes cluster;
[0057] When the remaining resources are insufficient to cause a queuing phenomenon of application delivery requests, a new node is added to the Kubernetes cluster to create a new container and a slave platform on the newly added node.
[0058] That is to say, the remaining resources of the Kubernetes cluster are insufficient and there are not many idle nodes. When there are too many application delivery requests, some application delivery requests will need to queue. In this case, in order to achieve fast application delivery, new nodes can be added to the Kubernetes cluster to create new containers and slave platforms on the newly added nodes, thereby executing more application delivery requests and alleviating the queuing problem.
[0059] In one embodiment, before the main platform of the continuous delivery platform receives the application delivery request, the method may further include the following five steps:
[0060] 1. Install the main platform on a node in the Kubernetes cluster, and create a deployment configuration file, storage volume declaration file, and service-related files for the main platform;
[0061] Among them, the continuous delivery platform can use Jenkins deployment. The deployment configuration file is the Jenkinsdeployment file, the storage volume declaration file is the pvc file, and the service-related file is the svc file. The deployment configuration file is used to configure related deployment information. The storage volume declaration file is used to declare the relevant information of the storage volume of the distributed file system. The service-related file defines a Service object in the Kubernetes environment. The main purpose of this file is to expose the Jenkins application so that it can be accessed by other services or users. All three files can be in yaml format.
[0062] 2. Create the resources required by the main platform and create a new entry required for external access to the main platform;
[0063] For example, use the kubectl create –f command to create the required resources. In order to allow external access to the service-related files of the main platform, you can create an ingress as the entrance for external access to the main platform. Ingress is a mechanism in Kubernetes to manage external access to services within the cluster. It uses a load balancer for HTTP and HTTPS protocols to forward requests to the backend services.
[0064] 3. Install the plug-ins required for the main platform to provide services on the node where the main platform is located;
[0065] For example, access the jenkins configuration management page through a browser. The jenkins initialization password is in the " / opt / nfs / jenkins2 / secret / initAdminPassword" file. After logging in with the initialization password, follow the prompts to install plug-ins such as kubernetes and managed scripts.
[0066] Of course, after installing the plug-in, you can further configure Kubernetes and Jenkins.
[0067] 4. Configure the container template corresponding to the slave platform so that when a new container is needed, a new container operation is performed according to the container template;
[0068] For example, use the official jnlp image as a container template for the slave platform.
[0069] 5. Set the mounted host directory so that the newly created container can be mounted to the files in the host directory.
[0070] For example, set the host directory to / var / run / docker.sock so that the container can share the host's Docker. This is what we call docker in docker, where the Docker binary is in the image file. Docker in Docker, or DinD for short, is a containerization technology that refers to running another Docker instance inside a Docker container.
[0071] Through the above 5 steps, the relevant installation and configuration can be achieved.
[0072] In one embodiment, the master platform is deployed on the nodes of the Kubernetes cluster based on the master platform image, and the slave platform is deployed on the nodes of the Kubernetes cluster based on the slave platform image.
[0073] The master platform image and the slave platform image are stored in an image repository, and the image repository updates the image stored in itself upon receiving an image update notification.
[0074] In actual scenarios, you can deploy dockerregistry to implement image warehouse services and build your own private warehouse services to store and publish images. Create and build basic images. The images generated by pipeline construction use specific tags. After receiving the image update notification, the image warehouse will trigger the process of updating the images stored in it.
[0075] In one embodiment, the application delivery request is sent to the main platform by a web hook of a warehouse management tool when a user makes an application delivery request.
[0076] For example, by configuring the webhook of gitlab, the webhook sends the application delivery request put forward by the user to the main platform, thereby starting the subsequent application delivery process. Among them, the application delivery process can drive the code pulling, building, and application release processes in the pipeline through the pipeline script written in advance.
[0077] In an embodiment of the present invention, the main platform, i.e., Jenkins Master, and the slave platform, i.e., Jenkins Slave, run on the Node of the Kubernetes cluster in the form of Pods. The Master runs on one of the nodes and stores its main platform configuration data on a hard disk volume. The Slave runs on each node and is not always in a running state. It will be dynamically created and automatically deleted as needed.
[0078] Among them, containerization technology is a type of virtualization technology. Specifically, it packages the relevant program code, function library, and environment configuration files required by an application to establish a sandbox execution environment.
[0079] Among them, Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable image and then publish it to any popular Linux or Windows machine.
[0080] Among them, K8S, namely kubernetes, is a new leading distributed architecture solution based on container technology. Based on Docker technology, it provides a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling for containerized applications, which improves the convenience of large-scale container cluster management.
[0081] Among them, Jenkins is an open source, extensible web-based platform for continuous integration, delivery, and deployment (compiling, packaging, and deploying software / code). It allows continuous integration and continuous delivery projects and can handle any type of build or continuous integration. Through more than 1,000 plug-ins in the update center, Jenkins integrates almost all tools in the continuous integration and continuous delivery tool chain. Jenkins can be extended through its plug-in architecture, providing almost unlimited possibilities for what Jenkins can do. By installing the k8s and pipeline plug-ins integrated in Jenkins, the integration and pipeline functions of Jenkins in the k8s environment are realized.
[0082] Among them, GitLab is an open source project for warehouse management systems. It uses Git as a code management tool to handle any small or large project in an agile and efficient manner. It is one of the most advanced distributed version control systems.
[0083] With the rapid development of cloud computing, container and other technologies, a new way of deployment and operation of various applications has been provided; currently, k8s+docker technology has gradually become the first choice. Under this technical architecture, applications can be quickly deployed and expanded as needed, and have automatic scheduling, automatic restart and automatic replication capabilities, supporting public cloud, private cloud, hybrid cloud and other cloud platforms.
[0084] The embodiments of the present invention have the following beneficial effects:
[0085] (1) High availability of services: When the Jenkins Master fails, the Kubernetes cluster will automatically create a new Jenkins Master container and allocate the Volume to the newly created Jenkins Master container to ensure that data is not lost, thereby achieving high availability of cluster services. That is, when the main platform fails, another main platform can be quickly started to ensure the availability of the overall platform.
[0086] (2) Dynamic scaling to improve resource utilization: Each time an application delivery request is made, a Jenkins Slave is automatically created. After the application delivery process is completed, the Slave automatically logs out and deletes the container, so that resources are automatically released. The Kubernetes cluster dynamically allocates Slaves to idle nodes based on the resource usage of each node, reducing the situation where a node has high resource utilization and is still waiting in line on that node.
[0087] (3) Good scalability: When the resources of the Kubernetes cluster are seriously insufficient and the application delivery requests are queued, a Kubernetes Node is added to the cluster to achieve expansion. That is, when the container platform resources are about to be exhausted, container nodes can be added quickly. Of course, when the container platform resources are idle, container nodes can be deleted to flexibly allocate resources.
[0088] In a second aspect, an embodiment of the present invention provides an application delivery device in a container cloud environment, wherein the device is deployed in a control system of a Kubernetes cluster, see Figure 2 , the device 100 comprises:
[0089] The node selection module 110 is used to select an idle node from each node of the Kubernetes cluster according to the resource usage of each node of the Kubernetes cluster when the main platform of the continuous delivery platform receives an application delivery request; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container;
[0090] A first new creation module 120 is used to create a new container on the selected idle node, create a slave platform in the new container, and register the new slave platform with the master platform so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes;
[0091] A process execution module 130, configured to execute the application delivery process corresponding to the application delivery request through the slave platform after completing the slave platform registration;
[0092] The container deletion module 140 is used to deregister the slave platform from the master platform and delete the container where the slave platform is located after the slave platform completes the application delivery process.
[0093] In one embodiment, the device may further include:
[0094] The health detection module is used to: periodically detect the health status of the main platform according to the health detection rules; when the main platform fails, create a new main platform running in the form of a container; allocate the hard disk volume corresponding to the failed main platform to the newly created main platform, so that the newly created main platform can provide normal services according to the main platform configuration data in the hard disk volume.
[0095] In one embodiment, the device may further include:
[0096] The resource monitoring module is used to monitor the remaining resources of the Kubernetes cluster; when the remaining resources are insufficient to cause a queuing phenomenon of application delivery requests, a new node is added to the Kubernetes cluster to create a new container and slave platform on the newly added node.
[0097] In one embodiment, the device may further include:
[0098] An installation configuration module is used to install the main platform on a node in the Kubernetes cluster before the node selection module receives an application delivery request on the main platform of the continuous delivery platform, and create a new deployment configuration file, storage volume declaration file and service-related files for the main platform; create the resources required by the main platform, and create a new entry required for external access to the main platform; install the plug-ins required for the main platform to provide services on the node where the main platform is located; configure the container template corresponding to the slave platform so that a new container can be created according to the container template when a new container is needed; set the mounted host directory so that the newly created container can be mounted to the file in the host directory.
[0099] In one embodiment, the master platform is deployed on the nodes of the Kubernetes cluster based on the master platform image, and the slave platform is deployed on the nodes of the Kubernetes cluster based on the slave platform image.
[0100] In one embodiment, the master platform image and the slave platform image are stored in an image repository, and the image repository updates the image stored in itself upon receiving an image update notification.
[0101] In one embodiment, the application delivery request is sent to the main platform by a web hook of a warehouse management tool when a user makes an application delivery request.
[0102] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0103] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.
[0104] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.
[0105] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0106] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0107] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0108] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0109] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0110] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.
[0111] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.
[0112] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0113] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0114] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for delivering applications in a container cloud environment, characterized in that: The method is executed by a control system of a Kubernetes cluster, and the method includes: When the main platform of the continuous delivery platform receives an application delivery request, a node in an idle state is selected from each node of the Kubernetes cluster according to the resource usage of each node of the Kubernetes cluster; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container; Create a new container on the selected idle node, create a slave platform in the new container, and register the new slave platform with the master platform, so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes; After completing the registration on the slave platform, executing the application delivery process corresponding to the application delivery request through the slave platform; After the slave platform completes the application delivery process, the slave platform is deregistered from the master platform, and the container where the slave platform is located is deleted.
2. The method according to claim 1, characterized in that Also includes: According to the health detection rules, periodically detect the health status of the main platform; When the main platform fails, a new main platform is created in the form of a container; The hard disk volume corresponding to the failed main platform is allocated to the newly created main platform, so that the newly created main platform provides normal services according to the main platform configuration data in the hard disk volume.
3. The method according to claim 1, characterized in that Also includes: Monitor the remaining resources of the Kubernetes cluster; When the remaining resources are insufficient to cause a phenomenon in which application delivery requests are queued, a new node is added to the Kubernetes cluster to create a new container and a slave platform on the newly added node.
4. The method according to claim 1, characterized in that: Before the main platform of the continuous delivery platform receives the application delivery request, the method further includes: Install the main platform on a node in the Kubernetes cluster, and create a deployment configuration file, storage volume declaration file, and service-related files for the main platform; Create the resources required by the main platform and create a new entry required for external access to the main platform; Install the plug-ins required by the main platform to provide services on the node where the main platform is located; Configure a container template corresponding to the slave platform so that when a new container is needed, a new container operation is performed according to the container template; Set the mounted host directory so that the newly created container can be mounted to the files in the host directory.
5. The method according to claim 1, characterized in that The master platform is deployed on the nodes of the Kubernetes cluster based on the master platform image, and the slave platform is deployed on the nodes of the Kubernetes cluster based on the slave platform image.
6. The method according to claim 5, characterized in that The master platform image and the slave platform image are stored in an image repository, and the image repository updates the image stored in itself upon receiving an image update notification.
7. The method according to claim 1, characterized in that The application delivery request is sent to the main platform by the network hook of the warehouse management tool when the user makes the application delivery request.
8. An application delivery device in a container cloud environment, characterized in that: The device is deployed in a control system of a Kubernetes cluster, and includes: A node selection module, configured to select an idle node from each node of the Kubernetes cluster according to resource usage of each node of the Kubernetes cluster when the main platform of the continuous delivery platform receives an application delivery request; wherein the main platform of the continuous delivery platform runs on the node of the Kubernetes cluster in the form of a container; A first new creation module is used to create a new container on the selected idle node, create a slave platform in the new container, and register the new slave platform with the master platform so that the slave platform runs on the node of the Kubernetes cluster in the form of a container; wherein the master platform and the slave platform are located on different nodes; A process execution module, used for executing the application delivery process corresponding to the application delivery request through the slave platform after completing the slave platform registration; The container deletion module is used to deregister the slave platform from the master platform and delete the container where the slave platform is located after the slave platform completes the application delivery process.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.