WO2021238301A1 - Application update method, apparatus and device and medium - Google Patents

Application update method, apparatus and device and medium Download PDF

Info

Publication number
WO2021238301A1
WO2021238301A1 PCT/CN2021/075692 CN2021075692W WO2021238301A1 WO 2021238301 A1 WO2021238301 A1 WO 2021238301A1 CN 2021075692 W CN2021075692 W CN 2021075692W WO 2021238301 A1 WO2021238301 A1 WO 2021238301A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
pod
update
container
target
Prior art date
Application number
PCT/CN2021/075692
Other languages
French (fr)
Chinese (zh)
Inventor
吴浩
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021238301A1 publication Critical patent/WO2021238301A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • This application relates to the field of computer technology, in particular to an application update method, device, equipment and medium.
  • applications deployed on clusters are usually containerized, so that the applications deployed on the cluster can be decoupled from the cluster's own configuration (such as the configuration of the underlying facilities or file system), so that the application can be deployed in different clusters or Migrate on different operating systems.
  • a container deployment unit Pod may be deployed on each node, and a container corresponding to each application may be deployed on each Pod.
  • the cluster includes the first node and the second node, the first pod is deployed on the first node, the second and third pods are deployed on the second node, and the first pod is deployed on the The first container and the second container, the third container and the fourth container are deployed on the second Pod, the fifth container is deployed on the third Pod, and the first to fourth containers are used To run the first application, and the fifth container is used to run the second application.
  • the embodiments of the present application provide an application update method, device, device, and medium, which can simplify application update operations and improve application update efficiency.
  • the embodiments of the present application provide an application update method, which is suitable for updating any application on the cluster, and the method specifically includes: when the cluster includes at least one first Pod, and each When the first container for running the old target application is deployed on the first Pod, after receiving the application update request for requesting to update the target application, a first container for running the updated target application is created on each first Pod. The second container, so that the updated target application replaces the old target application, so as to achieve the purpose of updating the target application on the cluster. It can be seen that when updating any application on the cluster, you only need to create a new container for running the updated application on the original Pod corresponding to the application. This can effectively simplify the application update operation and improve Improved application update efficiency.
  • the Pod template for specifying the second container is first obtained, and then the second container is created on each first Pod according to the second container specified by the Pod template.
  • the Pod template can specify the second container, when creating the second container on each first Pod, it can be created directly according to the second container specified by the Pod template, and there is no need to separately follow the above application parameters on each first Pod.
  • Creating a second container can reduce the time consumption of creating a second container on each first Pod, thereby improving the update efficiency of applications in the cluster.
  • each first Pod after receiving the application update request, first select the Pod that matches the Pod template from all Pods in the cluster, and determine the selected Pod as the first Pod; and then in each first Pod Create a second container on it.
  • each first Pod is pre-screened from all Pods in the cluster based on the Pod template, it is possible to perform other steps of the application update process only on the first selected Pods, without considering the cluster except for the first Pod. Pods other than those will help improve the efficiency of creating target applications.
  • the first container used to run the old target application on the first Pod is deleted, so that only the first Pod is deployed The latest container with the target application is no longer deployed with the historical container of the target application, which can effectively save Pod space.
  • the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  • GUI graphical user interface
  • the present application provides an application update device, which includes: an operation module, a communication module, and an update module.
  • the running module is used to run the first container of the old target application on the first container deployment unit (Pod);
  • the communication module is used to receive application update requests;
  • the update module is used to create and run the updated post on the first Pod The second container of the target application to replace the old target application.
  • the update module is also used to: obtain a Pod template, and the Pod template specifies the second container.
  • the device further includes:
  • the selection module is used to select a Pod matching the Pod template from multiple Pods, and the selected Pod is the first Pod.
  • the update module is also used to: delete the first container on the first Pod.
  • the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  • the communication module is further used to receive the application update type specified by the user through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
  • GUI graphical user interface
  • the present application provides a computer including a processor and a memory.
  • the processor and the memory are linked.
  • the processor is configured to execute the instructions stored in the memory, so that the computer executes the application update method in the first aspect or any one of the implementation manners of the first aspect.
  • the present application provides a computer-readable storage medium that includes instructions that instruct a computer to execute the application update described in the first aspect or any one of the implementation manners of the first aspect method.
  • this application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the application update method described in the first aspect or any one of the implementations of the first aspect.
  • Figure 1 is a schematic structural diagram of a k8s cluster provided by an embodiment of the application.
  • Figure 2 is a schematic diagram of the structure of k8s provided by an embodiment of the application.
  • FIG. 3 is a system architecture diagram of an application update method provided by an embodiment of the application.
  • FIG. 4 is a flowchart of an application update method provided by an embodiment of the application.
  • FIG. 5 is a flowchart of an application update method applied to k8s according to an embodiment of the application
  • FIG. 6 is a schematic structural diagram of a computer provided in an embodiment of this application.
  • Kubernetes is Google's open source container orchestration and scheduling engine, which is used to manage containerized applications on each node in the cluster.
  • k8s includes a management (master) component and a node (node) component.
  • the master component can run on any node in the cluster, and the master component is used to control and manage the cluster.
  • the node component can run on any node in the cluster, and the node component is used to provide a k8s operating environment for the node and to maintain the container deployment unit (that is, Pod) on the node.
  • the master component can run on the management node, so that the management node deployed with the master component can manage and control the cluster; and each application node The node component can be run on any application node, so that the node component running on each application node is used to maintain the Pod on that node.
  • the master component includes an interface server (that is, kube-apiserver), a management controller (that is, kube-controller-manager), and a storage system (such as etcd). Among them, etcd is used to save all cluster data.
  • kube-apiserver is the only entry point for resource operations, so that the user and any component in k8s can operate on related resources through kube-apiserver communication (as shown in Figure 2).
  • the kube-controller-manager is used to maintain the application state of each application in the cluster, and the kube-controller-manager is a collection of many controllers in the master component, which includes a stateless application controller (that is, Deployment Controller) and a copy Collective controller (that is, Replicaset Controller).
  • the Deployment Controller is used to maintain the deployment resource status; the Replicaset Controller is used to maintain the Replicaset resource status, and the Replicaset Controller can create a Pod replica corresponding to the Pod template on at least one node according to the Pod template.
  • Deployment is used to provide declarative updates for Pod and ReplicaSet, that is, users only need to describe the target state of Pod and/or Replicaset in Deployment, and Deployment Controller will control the actual status of Pod and Replicaset. The state changes to the above-mentioned target state.
  • Replcaset refers to a collection of Pod copies.
  • the node component includes a proxy component (that is, kubelet) and a running component (that is, docker). Among them, kubelet is used to maintain the Pod in the node and the container on the Pod. Docker is used to run containers on Pod.
  • proxy component that is, kubelet
  • running component that is, docker
  • Pod is the smallest unit used for creation, scheduling and management in k8s.
  • at least one container can be deployed on each Pod; moreover, containers deployed on the same Pod usually correspond to the same application, that is, all containers deployed on a Pod are used to run the same application. For example, if both container 1 and container 2 are deployed on Pod 1, then container 1 and container 2 are usually used to run the same application.
  • the method of deleting and rebuilding Pod can be used to update the applications in the cluster, which is specifically: when the target application needs to be updated, it can be created in the cluster node first A new Pod, and a container for running the updated target application is deployed on the new Pod, and then the old Pod deployed in the cluster node is deleted, and a container for running the old target application is deployed on the old Pod.
  • the container used to run the old target application is deployed on Pod1, Pod2, and Pod3, and the container used to run the updated target application is deployed on Pod4, Pod5, and Pod6. Based on this assumption, when the target application needs to be updated, Pod4, Pod5, and Pod6 can be created in the cluster, and Pod1, Pod2, and Pod3 can be deleted from the cluster to enable the updated target application to run in the cluster.
  • the embodiment of this application does not limit the execution order of multiple Pod creation and multiple Pod deletion. You can create all new Pods and then delete all old Pods, such as the Recreate Update method in k8s; you can also create the first Pod first. Batch new Pods and delete the first batch of old Pods, then create the second batch of new Pods and delete the second batch of old Pods,... (until the creation of all new Pods and the deletion of all old Pods are completed), such as Rolling in k8s Update method.
  • the application update process described above is implemented by the delete and re-rebuild process of the Pod, so that the Pod corresponding to the application before the update is different from the Pod corresponding to the application after the update, so that the application before the update corresponds to the Pod Basic information (such as Pod name, Pod name identification, Pod IP address, node information of the node where Pod is located, etc.) is different from the basic information of the Pod corresponding to the updated application, resulting in applications in the cluster (especially those that have a strong dependence on Pod basic information Sexual applications) are prone to abnormalities (such as abnormal applications such as failure to operate normally) due to changes in the basic information of the Pod.
  • abnormalities such as abnormal applications such as failure to operate normally
  • an embodiment of the present application provides an application update method, which specifically includes: when the cluster includes at least one first Pod, and each first Pod is deployed for running old When the first container of the target application is received, after receiving the application update request for requesting to update the target application, a second container for running the updated target application is created on each first Pod, so that the updated target The application replaces the old target application, thus achieving the purpose of updating the target application on the cluster.
  • the application update process is realized by rebuilding the container corresponding to the updated application on the original Pod
  • the container corresponding to the old target application and the container corresponding to the updated target application are both located on the same Pod, thus
  • the basic information of the Pod corresponding to the target application remains unchanged during the application update process, which can prevent applications on the cluster (especially those applications that have a strong dependence on the basic information of the Pod) from being prone to changes in the basic information of the Pod. abnormal.
  • FIG. 3 is a system architecture diagram of an application update method provided by an embodiment of the application.
  • the application scenario shown in FIG. 3 includes an application update device 301, a graphical user interface (GUI) 302, and a user 303.
  • the application update device 301 is deployed in the cluster, and the application update device 301 updates the applications in the cluster by executing the application update method provided in the embodiments of the present application.
  • the GUI 302 is used to receive the data information input by the user 303 and the triggered instruction request.
  • the user 303 when the user 303 wants to update the target application, the user 303 can trigger an application update request on the GUI302 for requesting to update the target application, so that the GUI302 sends the application update request to the application update
  • the device 301 enables the application update device 301 to create a second container for running the updated target application on the first Pod, so that the purpose of replacing the old target application with the updated target application in the cluster can be achieved.
  • the first Pod refers to the Pod deployed with the first container for running the old target application.
  • the application update device 301 includes an operation module 3011, an update module 3012, and a communication module 3013.
  • the running module 3011 is used to run the container on the cluster nodes. For example, the running module 3011 is used to run the first container of the old target application on the first Pod.
  • the communication module 3013 is used to receive information (such as data information, instruction requests, etc.) sent by the user 303 through the GUI 302. For example, the communication module 3013 is used to receive application update requests.
  • the update module 3012 is used to update applications in the cluster. For example, the update module 3012 can be used to create a second container for running the updated target application on the first Pod to replace the old target application.
  • the GUI 302 is a terminal device.
  • the GUI 302 may be a terminal device such as a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PDA), or a tablet computer.
  • PDA Personal Digital Assistant
  • FIG. 4 is a flowchart of an application update method provided by an embodiment of the application.
  • the application update method provided by an embodiment of the application includes S401-S403:
  • the application updating apparatus 301 runs the first container of the old target application on the first Pod.
  • the first container refers to the container used to run the old target application (that is, the target application before the update) in the cluster.
  • the first Pod refers to the Pod in which the first container is deployed in the cluster, and this embodiment of the present application does not limit the number of first Pods, nor does it limit the number of first containers deployed on each first Pod.
  • the GUI302 sends the application running request to the application update device 301 to
  • the application update apparatus 301 is made to run the first container of the old target application on the first Pod in the cluster.
  • the cluster includes node 1, node 2, and node 3.
  • Pod1, Pod2, and Pod3 are deployed on node 1
  • Pod3 and Pod4 are deployed on node 2
  • Pod5 is deployed on node 3
  • Pod1, Pod2, and Pod5 are all deployed There is the first container.
  • the application update device 301 receives an application update request.
  • the application update request is used to request to update the target application, and the application update request is triggered by the user 303 through the GUI302.
  • Example 1 The application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  • the application update request when the application update request is used to request to update the current version of the target application to the target version, the application update request carries the application version information of the target version (that is, the updated version information of the target application); When the application update request is used to request to update the current application configuration information of the target application to the target application configuration information, the application update request carries the target application configuration information (that is, the updated application configuration information of the target application); When the application update request is used to request that the current version of the target application be updated to the target version, and the current application configuration information of the target application is updated to the target application configuration information, the application update request carries the target application configuration information and the target version App version information for.
  • Example 2 When the application update apparatus 301 can use multiple types of application update processes to update applications in the cluster, the application update request can carry the application update type and the updated application parameters of the target application.
  • the application update type is specified by the user 303 through the GUI 302, and the application update device 301 can determine the application update process used when updating the target application according to the application update type. In this way, the application update device 301 can not only extract the updated application parameters of the target application from the application update request, but also extract the selection information of the application update process used to update the target application from the application update request.
  • the GUI302 when the user 303 triggers an application update request through the GUI302, and the application update request is used to request to update the target application, the GUI302 sends the application update request to the application update device 301, so that the The application update device 301 can update the target application in the cluster based on the information carried in the application update request.
  • the application updating device 301 creates a second container for running the updated target application on the first Pod to replace the old target application.
  • the second container refers to the container used to run the updated target application in the cluster.
  • the application update device 301 uses the application parameters carried in the application update request to create a second container on each first Pod, so that Use the updated target application to replace the old target application.
  • the cluster includes Pod1, Pod2, and Pod5, and the first container is deployed on Pod1, Pod2, and Pod5, Pod1, Pod2, and Pod5 are all the first Pod, and S403 is specifically: the application update device 301 is on Create a second container on Pod1, create a second container on Pod2, and create a second container on Pod5, so that the subsequent application update device 301 can run the second container on Pod1, the second container on Pod2, or the second container on Pod5.
  • the second container approach realizes the purpose of running the updated target application in the cluster.
  • the application update process is implemented by rebuilding the container corresponding to the updated application on the original Pod, the old target application and the updated target application are both located on the same Pod, so that the Pod corresponding to the target application
  • the basic information always remains the same during the application update process, which can prevent the applications on the cluster (especially those applications that have a strong dependence on the basic information of the Pod) from being abnormal due to the changes of the basic information of the Pod.
  • the second container on the first Pod can be created with reference to the second container on the Pod template.
  • the embodiment of the present application also provides a possible implementation manner of the application update method.
  • the application update method includes S401-S403 as well as S404:
  • the application updating device 301 obtains a Pod template, the Pod template designating the aforementioned second container.
  • Pod templates refer to objects that need to be referenced when creating a Pod on a node and creating a container on the Pod. For example, in k8s, a copy of the Pod template can be deployed on the node as a Pod on the node; you can also create a corresponding container on the Pod based on the container deployed on the Pod template, so that the container deployed on the Pod is the same as the Pod. The containers deployed on the template are consistent.
  • the Pod template can be created according to the updated application parameters of the target application, so that the second container is deployed on the Pod template, so that the Pod template can specify the second container.
  • the application update device 301 after the application update device 301 receives the application update request, the application update device 301 first creates a Pod template according to the updated application parameters of the target application carried in the application update request, so that the Pod A second container is deployed on the template; then follow the second container deployed on the Pod template to create a second container on each first Pod, so that the second container on each first Pod is the same as the second container on the Pod template , So the creation of the second container is realized.
  • the Pod template can specify the second container, when creating the second container on each first Pod, it can be created directly according to the second container specified by the Pod template, and there is no need to separately follow the above application parameters on each first Pod. Creating a second container can reduce the time consumption of creating a second container on each first Pod, thereby improving the update efficiency of applications in the cluster.
  • each first Pod can be filtered from all the Pods in the cluster based on the result of matching each Pod in the cluster with the aforementioned Pod template.
  • the embodiment of the present application also provides a possible implementation manner of the application update method.
  • the application update method includes S401-S404 as well as S405:
  • the application update device 301 selects a Pod matching the above-mentioned Pod template from a plurality of Pods, and the selected Pod is the first Pod.
  • the Pod that matches the above Pod template satisfies the condition that: the difference between the application corresponding to the container deployed on the Pod and the application corresponding to the container deployed on the Pod template is only in the application parameters.
  • the application update device 301 is k8s
  • the Pod that matches the above Pod template satisfies the conditions: the Pod is deployed with a container corresponding to the target application, and the container corresponding to the target application deployed on the Pod is different from that deployed on the Pod template
  • the target application corresponds to the container.
  • step S405 may be executed after S404 is executed and before S403 is executed.
  • the application update device 301 after obtaining the Pod template for specifying the second container, the application update device 301 first matches each Pod in the cluster with the Pod template, and matches each pod template that has been successfully matched with the Pod template.
  • the Pods are all determined to be the first Pod, and then a second container is created on each of the determined first Pods.
  • each first Pod is pre-screened from all Pods in the cluster based on the Pod template, it is possible to perform other steps of the application update process only on the first selected Pods, without considering the cluster except for the first Pod. Pods other than those will help improve the efficiency of creating target applications.
  • a corresponding relationship may be established between the application identifier of the containerized application deployed on the Pod and the Pod in advance, so that the Pod on which the containerized application is deployed can be found subsequently based on the application identifier.
  • the embodiment of the present application can also filter out each first Pod from all Pods in the cluster based on the application identifier of the target application. Therefore, the embodiment of the present application also provides a possible implementation of the application update method.
  • the application update method includes not only some or all of the above steps, but also includes S406:
  • the application updating device 301 determines the Pod corresponding to the target application identifier among the multiple Pods as the first Pod.
  • the target application identifier is used to uniquely identify the target application.
  • the embodiment of the present application does not limit the method of obtaining the target application identifier.
  • the application update device 301 may obtain the target application identifier according to the application update request.
  • the application update device 301 after the application update device 301 obtains the application update request, the application update device 301 first determines the target application identifier according to the application update request, and then filters out all Pods in the cluster that correspond to the target application Each identified Pod is used as the first Pod, so that the subsequent application update device 301 can directly create a second container on each of the determined first Pods, which is beneficial to improve the efficiency of creating the second container.
  • the embodiment of the present application also provides a possible implementation manner of the application update method.
  • the application update method includes not only some or all of the above steps, but also includes S407:
  • the application updating apparatus 301 deletes the first container on the first Pod.
  • the application update apparatus 301 may create a second container on each first Pod and delete the first container, so that only the target is deployed on each first Pod The latest container of the application is no longer deployed with the historical container of the target application, which can effectively save Pod space.
  • the implementation of this application does not limit the execution order of deleting the first container and creating the second container on the first Pod. For example, on any first Pod, you can delete the first container and then create the second container. You can create the second container first and then delete the first container.
  • the embodiment of the present application does not limit the execution time for the application update apparatus 301 to delete the first container on each first Pod, and the following describes with two examples.
  • the application update apparatus 301 may delete the first container on all the first Pods, and then create the second container on each first Pod. For example, when the first container is deployed on Pod1, Pod2, Pod5, and Pod6, the application update device 301 can delete the first container on Pod1, delete the first container on Pod2, delete the first container on Pod5, and delete the first container on Pod5. After deleting the first container on Pod6, create a second container on Pod1, create a second container on Pod2, create a second container on Pod5, and create a second container on Pod6.
  • the application update device 301 can create the second container on the first Pod and delete the first container in a mode in which the number of Pods in the container update state remains unchanged. For example, when the first container is deployed on Pod1, Pod2, Pod5, and Pod6, and the number of Pods in the container update state in the application update device 301 is 2, the application update device 301 performs container update on Pod1 and Pod2 ( That is, delete the first container and create a second container); when Pod1 and Pod2 complete the container update at the same time, the application update device 301 starts to update the container on Pod5 and Pod6 respectively; when Pod1 and Pod2 do not complete the container update at the same time (for example , Pod1 completes the container update but Pod2 does not complete the container update, or Pod2 completes the container update but Pod1 does not complete the container update), the application update device 301 starts to update the container on Pod5, so that the application update device 301 always maintains the second position A Pod is in
  • the number of Pods in the container update state can be designated by the user 303 through the GUI 302, and can be preset in the application update device 301.
  • the application update device 301 can use multiple types of application update processes to update applications in the cluster, so the application update device 301 can determine the application update process according to the application update type specified by the user 303 through the GUI302. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes not only some or all of the above steps, but also includes S408:
  • the application update apparatus 301 receives the application update type specified by the user 303 through the GUI 302, and the application with the application update type is the target application to be updated.
  • the application update apparatus 301 when the application update apparatus 301 receives the application update type of the target application specified by the user 303 through the GUI 302, the application update apparatus 301 first determines the application update process corresponding to the application update type according to the application update type. This allows the subsequent application update device 301 to update the target application in the cluster according to the determined application update process. For example, when the application update process determined by the application update apparatus 301 according to the application update type includes the steps in any implementation manner of the application update method provided in the embodiment of the present application, the application update apparatus 301 follows the application update provided in the embodiment of the present application. Any implementation of the method updates the target application.
  • the user 303 does not directly specify the application update type through the GUI302, but enters the description information of the application update process through the GUI302 (for example, the basic information of the Pod cannot be changed during the application update process).
  • the application update device 301 can be based on The description information determines the type of application update.
  • the embodiment of the present application also provides a possible implementation manner of the application update method.
  • the application update method includes S409-S412 in addition to some or all of the above steps:
  • the application update apparatus 301 receives the target process information input by the user 303 through the GUI302.
  • the target process information is the description information of the application update process of the target application.
  • the embodiment of the present application does not limit the target process information.
  • the target process information includes constraint conditions of the application update process, and/or description information of part or all of the steps in the application update process.
  • the constraint condition of the application update process is used to describe the constraint condition that the application update process should meet.
  • the constraint condition of the application update process may be that the basic information of the Pod cannot be changed during the application update process.
  • the application update device 301 determines the application update type according to the target process information.
  • S410 may specifically be: the application update apparatus 301 first obtains the preset description information corresponding to each application update type, and then compares the target process information with the target process information. The preset description information corresponding to each application update type is matched, and the application update type corresponding to the preset description information with the highest matching degree is determined.
  • the preset description information is preset and stored in a preset storage location, and the application update device 301 can obtain the preset description information from the preset storage location.
  • the application update device 301 after the application update device 301 receives the target process information, it first obtains the preset description information corresponding to each application update type from the preset storage location, and compares the preset description information corresponding to each application update type with the target The process information is matched separately to obtain the matching degree corresponding to each application update type; then the matching degree corresponding to each application update type is compared, and the application update type corresponding to the highest matching degree is determined as the final application update type.
  • the application update device 301 displays the application update type through the GUI 302, so that the user 303 determines whether to select the application update type.
  • the application update apparatus 301 receives the selection result input by the user 303 through the GUI302.
  • the GUI302 when the user 303 enters the target process information on the GUI302, the GUI302 sends the target process information to the application update device 301, so that the application update device 301 first determines the application update according to the target process information Type, and then feedback the application update type to GUI302, so that GUI302 displays the application update type to user 303, and user 303 confirms whether to select the displayed application update type through GUI302, so that GUI302 will feed back user 303’s selection result to The application update device 301, so that the application update device 301 determines whether the determined application update type is the application update type specified by the user for the target application based on the selection result, and if so, directly uses the application update corresponding to the determined application update type
  • the process updates the target application; if not, ends the current application update process or recommends another application update type to the user 303 again.
  • the application update device 301 can automatically determine the application update type according to the target process information provided by the user 303, there is no need for the user 303 to directly specify the application update type, which reduces the technical threshold for the user to use the application update device 301 and is beneficial to improve user experience.
  • FIG. 5 is a flowchart of an application update method applied to k8s according to an embodiment of the application.
  • the application update method applied to k8s provided by the embodiment of the present application includes S501-S505:
  • the kube-apiserver receives an application update request triggered by the user through the GUI, the application update request is used to request to update the target application, and the application update request carries the updated application parameters of the target application and the application update of the target application specified by the user type.
  • k8s application update types include Recreate Update type, Rolling Update type, and Inplace Rolling Update type
  • the Recreate Update type corresponds to the above Recreate Update method
  • Rolling The Update type corresponds to the above Rolling Update method
  • the Inplace Rolling Update type corresponds to the application update method provided in the embodiment of the present application.
  • the kube-apiserver in k8s can directly carry the application update request with the updated application parameters of the target application and the application of the target application specified by the user
  • the update type is stored in etcd so that other components in subsequent k8s (such as Deployment Controller) can use the above information stored in etcd.
  • S502 The Deployment Controller judges whether the application parameters of the target application stored in etcd are updated, if yes, execute S503; if not, end.
  • the Deployment Controller is used to monitor whether the data information stored in etcd (such as the application parameters of the target application) changes in real time through the kube-apiserver.
  • the Deployment Controller can monitor that the application parameters corresponding to the target application are updated through the kube-apiserver. Therefore, the Deployment Controller needs to perform S503 and subsequent steps in order to complete the update process of the target application.
  • the Deployment Controller after the Deployment Controller determines that the application parameters of the target application stored in etcd are updated, the Deployment Controller first determines the application update process of the target application according to the application update type of the target application stored in etcd, which is specifically: When the Deployment Controller determines that the application update type of the target application is the Recreate Update type, it uses the Recreate Update method described above to update the target application; when the Deployment Controller determines that the application update type of the target application is the Rolling Update type, it uses the above The introduced Rolling Update method updates the target application; when the Deployment Controller determines that the application update type of the target application is the InplaceRolling Update type, S503 to S505 are used to update the target application.
  • the application update type of the target application stored in etcd which is specifically: When the Deployment Controller determines that the application update type of the target application is the Recreate Update type, it uses the Recreate Update method described above to update the target application; when the Deployment Controller determine
  • the embodiment of the present application does not limit the update process of the Pod template of the target application.
  • the update process of the Pod template of the target application may specifically be: Deployment Controller creates a new Pod template of the target application according to the updated application parameters of the target application The Deployment Controller stores the new Pod template of the target application in etcd, and sets the new template as the Pod template of the target application, so that the kubelet on the node where the first Pod is deployed can update the first Pod based on the Pod template.
  • the Deployment Controller determines each first Pod according to the application identifier of the target application.
  • the application identifier of the target application may be the first label; moreover, the first container is deployed on all Pods with the first label.
  • the embodiment of the present application does not limit the method for determining the application identifier of the target application. For example, it may be determined based on the relevant information of the target application carried in the application update request.
  • each Pod replica in the Replicaset whose selector field is the application identifier of the target application can be determined as the first Pod.
  • the selector field of the Replicaset corresponding to the target application can be modified to the application ID of the old target application and after the update After confirming that all Pods corresponding to the target application are deployed with the second container, modify the selector field of the Replicaset corresponding to the target application to the updated application identifier of the target application, so that the Deployment Controller can Always use the selector field of the Replicaset corresponding to the target application to query all Pods corresponding to the target application.
  • the embodiment of this application does not limit the specific implementation manner in which the kubelet determines that the first Pod needs to be updated. For example, for each kubelet corresponding to the first Pod, the kubelet performs the Pod template of the first Pod and the target application stored in etcd. By comparison, when it is determined that the container corresponding to the target application deployed on the first Pod is different from the container corresponding to the target application deployed on the above Pod template, it is determined that the first Pod needs to be updated, and the first Pod is created on the first Pod. Second container and delete the first container, so that the first Pod can run the updated target application in the second container.
  • the following description is combined with an example.
  • the cluster includes node 1, node 2, and node 3; Pod1, Pod2, and Pod3 are deployed on node 1, Pod3 and Pod4 are deployed on node 2, Pod5 is deployed on node 3, and Pod1, Pod2, and Pod5 are all deployed There is a first container; kubelet1 is deployed on node 1, kubelet2 is deployed on node 2, and kubelet3 is deployed on node 3.
  • kubelet1 compares the Pod1 deployed on node 1 with the Pod template of the target application stored in etcd, and determines the first container on Pod1 When it is different from the second container on the Pod template, it is determined that Pod1 needs to be updated. At this time, the kubelet1 creates a second container on Pod1 according to the Pod template and deletes the first container, so that the target application deployed on Pod1 corresponds to the container and Pod The target application deployed on the template corresponds to the same container.
  • kubelet1 compares the Pod2 deployed on node 1 with the Pod template of the target application stored in etcd, and when it determines that the first container on Pod2 is different from the second container on the Pod template, it determines that Pod2 needs to be updated. At this time, the kubelet1 creates a second container on Pod2 according to the Pod template and deletes the first container, so that the container corresponding to the target application deployed on Pod2 is the same as the container corresponding to the target application deployed on the Pod template.
  • kubelet3 compares the Pod5 deployed on node 3 with the Pod template of the target application stored in etcd, and when it determines that the first container on Pod5 is different from the second container on the Pod template, it determines that Pod5 needs to be updated. At this time, the kubelet3 creates a second container on Pod5 according to the Pod template and deletes the first container, so that the container corresponding to the target application deployed on Pod5 is the same as the container corresponding to the target application deployed on the Pod template. In this way, the target application in the cluster is updated.
  • all containers on the first Pod can be updated according to the mode that the number of Pods in the container update state remains unchanged, and the number of Pods in the container update state can be determined according to the MaxUnavailable field, for example, set MaxUnavailable The value of the field is determined as the number of Pods in the container update state.
  • the value of the MaxUnavailable field can be preset or specified by the user through the GUI.
  • the docker on each node is used to run the containers deployed on the Pod. For example, when Pod1 and docker1 are deployed on node 1, and the first container is deployed on Pod1, docker1 runs the first container on Pod1 so that the old target application can run in the cluster.
  • the container corresponding to the old target application can be directly deleted on the original Pod and the container corresponding to the updated target application can be created, so that the Pod corresponding to the target application is in the target application’s
  • the update process is always the same, so that the basic Pod information corresponding to the target application always remains the same, which can effectively avoid abnormalities caused by changes in the basic information of the Pod due to changes in the basic information of the applications on the cluster.
  • the application update apparatus 301 provided by the embodiment of the present application includes:
  • the running module 3011 is used to run the first container of the old target application on the first container deployment unit (Pod);
  • the communication module 3013 is used to receive application update requests
  • the update module 3012 is used to create a second container for running the updated target application on the first Pod to replace the old target application.
  • running module 3011 refers to the description of related content in S401 in the embodiment shown in FIG. 4.
  • communication module 3013 refers to the description of related content in S402 in the embodiment shown in FIG. 4.
  • update module 3012 refers to the description of S403 in the embodiment shown in FIG. 4.
  • the update module 3012 is also used to:
  • the application update apparatus 301 further includes:
  • the selection module is used to select a Pod matching the Pod template from multiple Pods, and the selected Pod is the first Pod.
  • the update module 3012 is also used to:
  • the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  • the communication module 3013 is also used to:
  • the application update type specified by the user is received through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
  • GUI graphical user interface
  • the application update apparatus 301 of the embodiment of the present application may correspond to the implementation of the application update method described in the embodiment of the present application, and the above and other operations and/or functions of the modules/units of the application update apparatus 301 are respectively intended to implement FIG. 4 and FIG. For the sake of brevity, the corresponding procedures of the methods in the embodiment shown in 5 will not be repeated here.
  • the embodiment of the present application also provides a computer.
  • the computer may be a server or a cloud server, and is specifically used to implement the functions of the application update apparatus 301 in the embodiment shown in FIG. 3.
  • FIG. 6 provides a schematic structural diagram of a computer.
  • the computer 600 includes a bus 601, a processor 602, a communication interface 603 and a memory 604.
  • the processor 602, the memory 604, and the communication interface 603 communicate through a bus 601.
  • the bus 601 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 603 is used to communicate with the outside. For example, receiving a first query request based on the graph traversal language, receiving a second query request based on the graph traversal language, and so on.
  • the processor 602 may be a central processing unit (CPU).
  • the memory 604 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM).
  • the memory 604 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), flash memory, HDD or SSD.
  • the memory 604 stores executable code, and the processor 602 executes the executable code to execute the aforementioned application update method.
  • the running module 3011 and the update module in FIG. 3 are executed.
  • the software or program code required for the function of 3012 is stored in the memory 604.
  • the function of the communication module 3013 is implemented through the communication interface 603.
  • the communication interface 603 receives the application update request and transmits it to the processor 602 via the bus 601.
  • the processor 602 executes the program code corresponding to each module stored in the memory 604, such as the program code corresponding to the running module 3011 and the update module 3012, so as to realize The first container of the old target application is run on the first container deployment unit (Pod), and the second container for running the updated target application is created on the first Pod to replace the old target application.
  • the processor 602 can also execute the program code corresponding to the selection module, select a Pod matching the Pod template from a plurality of Pods, and the selected Pod is the first Pod. In this way, the application update device 301 can perform an update on the first Pod.
  • the container corresponding to the target application is updated.
  • An embodiment of the present application also provides a computer-readable storage medium, which includes instructions that instruct a computer to execute the above-mentioned application update method applied to the application update apparatus 301.
  • An embodiment of the present application also provides a computer-readable storage medium, which includes instructions that instruct a computer to execute the above-mentioned application update method applied to the application update apparatus 301.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is executed by a computer, the computer executes any one of the aforementioned application update methods.
  • the computer program product may be a software installation package. In the case where any method of the aforementioned application update method needs to be used, the computer program product can be downloaded and executed on the computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

An application update method, apparatus and device and a medium. The method comprises: when a cluster comprises at least one first Pod, and a first container for running an old target application is deployed on each first Pod, after an application update request for requesting to update the target application is received, creating a second container for running the updated target application on each first Pod, so as to replace the old target application with the updated target application, thereby achieving the purpose of updating the target application on the cluster. It can be seen that when any application on the cluster is updated, only a new container for running the updated application needs to be created on an original Pod corresponding to the application, thereby effectively simplifying the application updating operation and improving the application updating efficiency.

Description

一种应用更新方法、装置、设备及介质Application update method, device, equipment and medium 技术领域Technical field
本申请涉及计算机技术领域,特别是涉及一种应用更新方法、装置、设备及介质。This application relates to the field of computer technology, in particular to an application update method, device, equipment and medium.
背景技术Background technique
目前,通常将部署于集群上的应用进行容器化处理,以使部署于集群上的应用能够与集群自身配置(如底层设施或文件系统等配置)解耦,从而使得该应用能够在不同集群或不同操作系统上进行迁移。Currently, applications deployed on clusters are usually containerized, so that the applications deployed on the cluster can be decoupled from the cluster's own configuration (such as the configuration of the underlying facilities or file system), so that the application can be deployed in different clusters or Migrate on different operating systems.
在包括多个节点的集群中,各节点上可以部署有容器部署单元Pod,而且各Pod上可以部署有各应用对应的容器。例如,集群包括第1个节点和第2个节点,第1个节点上部署有第1个Pod,第2个节点上部署有第2个Pod和第3个Pod,第1个Pod上部署有第1个容器和第2个容器,第2个Pod上部署有第3个容器和第4个容器,第3个Pod上部署有第5个容器,第1个容器至第4个容器均用于运行第1个应用,而且第5个容器用于运行第2个应用。In a cluster including multiple nodes, a container deployment unit Pod may be deployed on each node, and a container corresponding to each application may be deployed on each Pod. For example, the cluster includes the first node and the second node, the first pod is deployed on the first node, the second and third pods are deployed on the second node, and the first pod is deployed on the The first container and the second container, the third container and the fourth container are deployed on the second Pod, the fifth container is deployed on the third Pod, and the first to fourth containers are used To run the first application, and the fifth container is used to run the second application.
在一些情况下,需要对集群上的应用进行更新,以使集群上的应用能够更好的为用户提供业务服务。然而,因集群上的应用更新操作比较繁琐,导致应用更新效率较低。In some cases, it is necessary to update the applications on the cluster so that the applications on the cluster can better provide business services to users. However, because the application update operation on the cluster is relatively cumbersome, the application update efficiency is low.
发明内容Summary of the invention
基于此,本申请实施例提供了一种应用更新方法、装置、设备及介质,能够简化应用更新操作,提高应用更新效率。Based on this, the embodiments of the present application provide an application update method, device, device, and medium, which can simplify application update operations and improve application update efficiency.
第一方面,本申请实施例提供了一种应用更新方法,该方法适用于对集群上的任一应用进行更新,而且该方法具体包括:当集群中包括至少一个第一Pod,且在每个第一Pod上部署有用于运行旧的目标应用的第一容器时,在接收到用于请求更新目标应用的应用更新请求之后,在各第一Pod上创建用于运行更新后的目标应用的第二容器,以使更新后的目标应用替代旧的目标应用,如此实现对集群上的目标应用进行更新的目的。可见,在对集群上的任一应用进行更新时,只需通过在该应用对应的原有Pod上创建用于运行更新后应用的新容器即可,如此能够有效地简化应用更新操作,从而提高了应用更新效率。In the first aspect, the embodiments of the present application provide an application update method, which is suitable for updating any application on the cluster, and the method specifically includes: when the cluster includes at least one first Pod, and each When the first container for running the old target application is deployed on the first Pod, after receiving the application update request for requesting to update the target application, a first container for running the updated target application is created on each first Pod. The second container, so that the updated target application replaces the old target application, so as to achieve the purpose of updating the target application on the cluster. It can be seen that when updating any application on the cluster, you only need to create a new container for running the updated application on the original Pod corresponding to the application. This can effectively simplify the application update operation and improve Improved application update efficiency.
在一些可能的实现方式中,在接收到应用更新请求之后,先获取用于指定第二容器的Pod模板,再按照该Pod模板指定的第二容器,在各第一Pod上创建第二容器。其中,因Pod模板能够指定第二容器,使得在各第一Pod上创建第二容器时,直接根据Pod模板指定的第二容器进行创建即可,无需在各第一Pod上分别依据上述应用参数创建第二容器,如此能够减少在各第一Pod上创建第二容器的耗时,从而能够提高集群中应用的更新效率。In some possible implementation manners, after receiving the application update request, the Pod template for specifying the second container is first obtained, and then the second container is created on each first Pod according to the second container specified by the Pod template. Among them, because the Pod template can specify the second container, when creating the second container on each first Pod, it can be created directly according to the second container specified by the Pod template, and there is no need to separately follow the above application parameters on each first Pod. Creating a second container can reduce the time consumption of creating a second container on each first Pod, thereby improving the update efficiency of applications in the cluster.
在一些可能的实现方式中,在接收到应用更新请求之后,先从集群中所有Pod中选择与该Pod模板匹配的Pod,并将选出的Pod确定为第一Pod;再在各第一Pod上创建第二容器。其中,因各第一Pod是预先基于Pod模板从集群中所有Pod中筛选得到的,使得后续可以只在这些筛选出的第一Pod执行应用更新过程的其他步骤,无需考虑集群中除了第一Pod以外 的其他Pod,如此有利于提高目标应用的创建效率。In some possible implementations, after receiving the application update request, first select the Pod that matches the Pod template from all Pods in the cluster, and determine the selected Pod as the first Pod; and then in each first Pod Create a second container on it. Among them, because each first Pod is pre-screened from all Pods in the cluster based on the Pod template, it is possible to perform other steps of the application update process only on the first selected Pods, without considering the cluster except for the first Pod. Pods other than those will help improve the efficiency of creating target applications.
在一些可能的实现方式中,为了节约Pod空间,在第一Pod上创建完成第二容器之后,删除第一Pod上用于运行旧的目标应用的第一容器,以使第一Pod上只部署有目标应用的最新容器,不再部署有目标应用的历史容器,如此能够有效地节约Pod空间。In some possible implementations, in order to save Pod space, after the second container is created on the first Pod, the first container used to run the old target application on the first Pod is deleted, so that only the first Pod is deployed The latest container with the target application is no longer deployed with the historical container of the target application, which can effectively save Pod space.
在一些可能的实现方式中,应用更新请求携带有更新后的目标应用的应用参数,所述应用参数包括应用版本信息和/或应用配置信息。In some possible implementation manners, the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
在一些可能的实现方式中,当存在多种类型的应用更新过程对集群中应用进行更新时,先通过图形用户界面(GUI)接收用户指定的目标应用的应用更新类型,并确定对应于该应用更新类型的应用更新过程,再按照该确定的应用更新过程对集群中目标应用进行更新。如此能够实现按照用户需求更新目标应用,从而有利于提高用户体验。In some possible implementations, when there are multiple types of application update processes to update applications in the cluster, first receive the application update type of the target application specified by the user through the graphical user interface (GUI), and determine the application update type corresponding to the application In the application update process of the update type, the target application in the cluster is updated according to the determined application update process. In this way, the target application can be updated according to the user's needs, which is beneficial to improve the user experience.
第二方面,本申请提供了一种应用更新装置,该装置包括:运行模块、通信模块和更新模块。其中,运行模块用于在第一容器部署单元(Pod)上运行旧的目标应用的第一容器;通信模块用于接收应用更新请求;更新模块用于在第一Pod上创建用于运行更新后的目标应用的第二容器,以替代旧的目标应用。In a second aspect, the present application provides an application update device, which includes: an operation module, a communication module, and an update module. Among them, the running module is used to run the first container of the old target application on the first container deployment unit (Pod); the communication module is used to receive application update requests; the update module is used to create and run the updated post on the first Pod The second container of the target application to replace the old target application.
在一些可能的实现方式中,更新模块还用于:获取Pod模板,Pod模板指定第二容器。In some possible implementations, the update module is also used to: obtain a Pod template, and the Pod template specifies the second container.
在一些可能的实现方式中,该装置还包括:In some possible implementation manners, the device further includes:
选择模块,用于从多个Pod中选择与Pod模板匹配的Pod,选出的Pod为第一Pod。The selection module is used to select a Pod matching the Pod template from multiple Pods, and the selected Pod is the first Pod.
在一些可能的实现方式中,更新模块还用于:在第一Pod上删除第一容器。In some possible implementation manners, the update module is also used to: delete the first container on the first Pod.
在一些可能的实现方式中,应用更新请求携带有更新后的目标应用的应用参数,应用参数包括应用版本信息和/或应用配置信息。In some possible implementation manners, the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
在一些可能的实现方式中,通信模块还用于:通过图形用户界面(GUI)接收用户指定的应用更新类型,具有应用更新类型的应用为待更新的目标应用。In some possible implementation manners, the communication module is further used to receive the application update type specified by the user through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
第三方面,本申请提供了一种计算机,所述计算机包括处理器和存储器。所述处理器和所述存储器链接。所述处理器用于执行所述存储器中存储的指令,以使得计算机执行如第一方面或第一方面的任一种实现方式中的应用更新方法。In a third aspect, the present application provides a computer including a processor and a memory. The processor and the memory are linked. The processor is configured to execute the instructions stored in the memory, so that the computer executes the application update method in the first aspect or any one of the implementation manners of the first aspect.
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质包括指令,所述指令指示计算机执行上述第一方面或第一方面的任一种实现方式所述的应用更新方法。In a fourth aspect, the present application provides a computer-readable storage medium that includes instructions that instruct a computer to execute the application update described in the first aspect or any one of the implementation manners of the first aspect method.
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面的任一种实现方式所述的应用更新方法。In a fifth aspect, this application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the application update method described in the first aspect or any one of the implementations of the first aspect.
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。On the basis of the implementation manners provided in the above aspects, this application can be further combined to provide more implementation manners.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some of the implementations recorded in the present application. For example, for those of ordinary skill in the art, other drawings can be obtained based on these drawings.
图1为本申请实施例提供的k8s集群的结构示意图;Figure 1 is a schematic structural diagram of a k8s cluster provided by an embodiment of the application;
图2为本申请实施例提供的k8s的结构示意图;Figure 2 is a schematic diagram of the structure of k8s provided by an embodiment of the application;
图3为本申请实施例提供的应用更新方法的系统架构图;FIG. 3 is a system architecture diagram of an application update method provided by an embodiment of the application;
图4为本申请实施例提供的一种应用更新方法的流程图;FIG. 4 is a flowchart of an application update method provided by an embodiment of the application;
图5为本申请实施例提供的应用于k8s的应用更新方法流程图;FIG. 5 is a flowchart of an application update method applied to k8s according to an embodiment of the application;
图6为本申请实施例提供了一种计算机的结构示意图。FIG. 6 is a schematic structural diagram of a computer provided in an embodiment of this application.
具体实施方式Detailed ways
下面将结合本申请中的附图,对本申请提供的实施例中的方案进行描述。The solutions in the embodiments provided in this application will be described below in conjunction with the drawings in this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。The terms "first", "second", etc. in the description and claims of the application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, and this is only used to describe the method of distinguishing objects with the same attribute in the description of the embodiments of the present application.
为了便于理解本申请的技术方案,下面对本申请涉及的一些技术术语进行介绍。In order to facilitate the understanding of the technical solutions of this application, some technical terms involved in this application are introduced below.
kubernetes(简称k8s)是谷歌开源的容器编排调度引擎,用于管理集群中各节点上的容器化的应用。k8s包括管理(master)组件和节点(node)组件。其中,master组件可以在集群中任一节点上运行,而且master组件用于对集群进行控制管理。node组件可以在集群中任一节点上运行,而且node组件用于为节点提供k8s运行环境并用于维护该节点上的容器部署单元(也就是,Pod)。例如,如图1所示,当集群包括管理节点和N个应用节点时,则master组件可以在管理节点上运行,以使部署有master组件的管理节点能够管理控制该集群;而且每个应用节点上均可以运行node组件,以使每个应用节点上运行的node组件用于维护该节点上的Pod。Kubernetes (k8s for short) is Google's open source container orchestration and scheduling engine, which is used to manage containerized applications on each node in the cluster. k8s includes a management (master) component and a node (node) component. Among them, the master component can run on any node in the cluster, and the master component is used to control and manage the cluster. The node component can run on any node in the cluster, and the node component is used to provide a k8s operating environment for the node and to maintain the container deployment unit (that is, Pod) on the node. For example, as shown in Figure 1, when the cluster includes a management node and N application nodes, the master component can run on the management node, so that the management node deployed with the master component can manage and control the cluster; and each application node The node component can be run on any application node, so that the node component running on each application node is used to maintain the Pod on that node.
master组件包括接口服务器(也就是,kube-apiserver)、管理控制器(也就是,kube-controller-manager)和存储系统(如etcd)。其中,etcd用于保存所有集群数据。kube-apiserver为资源操作的唯一入口,以使用户和k8s中任一组件均是借助kube-apiserver通信实现对相关资源进行操作(如图2所示)。kube-controller-manager用于维护集群中各应用的应用状态,而且该kube-controller-manager是master组件中众多控制器的集合,该集合包括无状态应用控制器(也就是,Deployment Controller)和副本集合控制器(也就是,Replicaset Controller)。Deployment Controller用于维护Deployment资源状态;Replicaset Controller用于维护Replicaset资源状态,而且Replicaset Controller能够根据Pod模板在至少一个节点上创建该Pod模板对应的Pod副本。The master component includes an interface server (that is, kube-apiserver), a management controller (that is, kube-controller-manager), and a storage system (such as etcd). Among them, etcd is used to save all cluster data. kube-apiserver is the only entry point for resource operations, so that the user and any component in k8s can operate on related resources through kube-apiserver communication (as shown in Figure 2). The kube-controller-manager is used to maintain the application state of each application in the cluster, and the kube-controller-manager is a collection of many controllers in the master component, which includes a stateless application controller (that is, Deployment Controller) and a copy Collective controller (that is, Replicaset Controller). The Deployment Controller is used to maintain the deployment resource status; the Replicaset Controller is used to maintain the Replicaset resource status, and the Replicaset Controller can create a Pod replica corresponding to the Pod template on at least one node according to the Pod template.
需要说明的是,在k8s中,Deployment用于为Pod和ReplicaSet提供声明式更新,也就是,用户只需要在Deployment中描述Pod和/或Replicaset的目标状态,则Deployment Controller会控制Pod和Replicaset的实际状态改变成上述目标状态。Replcaset是指Pod副本集合。It should be noted that in k8s, Deployment is used to provide declarative updates for Pod and ReplicaSet, that is, users only need to describe the target state of Pod and/or Replicaset in Deployment, and Deployment Controller will control the actual status of Pod and Replicaset. The state changes to the above-mentioned target state. Replcaset refers to a collection of Pod copies.
node组件包括代理组件(也就是,kubelet)和运行组件(也就是,docker)。其中,kubelet用于维护节点中的Pod以及Pod上的容器。docker用于在Pod上运行容器。The node component includes a proxy component (that is, kubelet) and a running component (that is, docker). Among them, kubelet is used to maintain the Pod in the node and the container on the Pod. Docker is used to run containers on Pod.
Pod是k8s中用于创建、调度和管理的最小单位。另外,每个Pod上均可以部署有至少一个容器;而且,部署在同一Pod上的容器通常对应于同一个应用,也就是,一个Pod上部署的所有容器均用于运行相同应用。例如,若容器1和容器2均部署在Pod1上,则容器1和容器2通常用于运行相同应用。Pod is the smallest unit used for creation, scheduling and management in k8s. In addition, at least one container can be deployed on each Pod; moreover, containers deployed on the same Pod usually correspond to the same application, that is, all containers deployed on a Pod are used to run the same application. For example, if both container 1 and container 2 are deployed on Pod 1, then container 1 and container 2 are usually used to run the same application.
另外,为了便于理解本申请的技术方案,下面对用于更新集群中应用的相关技术进行介绍。In addition, in order to facilitate the understanding of the technical solution of the present application, the following introduces related technologies for updating applications in the cluster.
在相关技术中,可以采用删除重建Pod的方式(例如,k8s中的Recreate Update方式或Rolling Update方式)来更新集群中应用,其具体为:当需要更新目标应用时,可以先在集群节点中创建新Pod,且该新Pod上部署有用于运行更新后的目标应用的容器,再将集群节点中已部署的旧Pod删除,且该旧Pod上部署有用于运行旧的目标应用的容器。例如,假设用于运行旧的目标应用的容器部署在Pod1、Pod2和Pod3上,而且用于运行更新后的目标应用的容器部署在Pod4、Pod5和Pod6上。基于该假设可知,当需要更新目标应用时,可以在集群中创建Pod4、Pod5和Pod6,并在集群中删除Pod1、Pod2和Pod3,以使集群中能够运行更新后的目标应用。In related technologies, the method of deleting and rebuilding Pod (for example, the Recreate Update method or the Rolling Update method in k8s) can be used to update the applications in the cluster, which is specifically: when the target application needs to be updated, it can be created in the cluster node first A new Pod, and a container for running the updated target application is deployed on the new Pod, and then the old Pod deployed in the cluster node is deleted, and a container for running the old target application is deployed on the old Pod. For example, suppose that the container used to run the old target application is deployed on Pod1, Pod2, and Pod3, and the container used to run the updated target application is deployed on Pod4, Pod5, and Pod6. Based on this assumption, when the target application needs to be updated, Pod4, Pod5, and Pod6 can be created in the cluster, and Pod1, Pod2, and Pod3 can be deleted from the cluster to enable the updated target application to run in the cluster.
需要说明的是,本申请实施例不限定多个Pod创建和多个Pod删除的执行顺序,可以先创建所有新Pod再删除所有旧Pod,如k8s中的Recreate Update方式;也可以先创建第1批新Pod并删除第1批旧Pod,再创建第2批新Pod并删除第2批旧Pod,……(直至完成所有新Pod的创建以及所有旧Pod的删除工作),如k8s中的Rolling Update方式。It should be noted that the embodiment of this application does not limit the execution order of multiple Pod creation and multiple Pod deletion. You can create all new Pods and then delete all old Pods, such as the Recreate Update method in k8s; you can also create the first Pod first. Batch new Pods and delete the first batch of old Pods, then create the second batch of new Pods and delete the second batch of old Pods,... (until the creation of all new Pods and the deletion of all old Pods are completed), such as Rolling in k8s Update method.
基于上述相关技术提供的应用更新过程可知,因上述应用更新过程是借助Pod的删除再重建过程实现的,使得更新前应用对应的Pod和更新后应用对应的Pod不同,从而使得更新前应用对应Pod基本信息(如Pod名称、Pod名称标识、Pod的IP地址、Pod所处节点的节点信息等)不同于更新后应用对应Pod基本信息,导致集群中应用(尤其是那些对Pod基本信息具有强依赖性的应用)易因Pod基本信息的变动而出现异常(如应用无法正常运行等异常)。Based on the application update process provided by the above-mentioned related technologies, it can be seen that the application update process described above is implemented by the delete and re-rebuild process of the Pod, so that the Pod corresponding to the application before the update is different from the Pod corresponding to the application after the update, so that the application before the update corresponds to the Pod Basic information (such as Pod name, Pod name identification, Pod IP address, node information of the node where Pod is located, etc.) is different from the basic information of the Pod corresponding to the updated application, resulting in applications in the cluster (especially those that have a strong dependence on Pod basic information Sexual applications) are prone to abnormalities (such as abnormal applications such as failure to operate normally) due to changes in the basic information of the Pod.
为了解决上述相关技术存在的缺点,本申请实施例提供了一种应用更新方法,该方法具体包括:当集群中包括至少一个第一Pod,且在每个第一Pod上均部署有用于运行旧的目标应用的第一容器时,在接收到用于请求更新目标应用的应用更新请求之后,在各第一Pod上创建用于运行更新后的目标应用的第二容器,以使更新后的目标应用替代旧的目标应用,如此实现对集群上的目标应用进行更新的目的。其中,因该应用更新过程是通过在原有Pod上重建更新后应用对应的容器的方式实现的,使得旧的目标应用对应的容器和更新后的目标应用对应的容器均位于同一个Pod上,从而使得目标应用对应的Pod基本信息在应用更新过程中始终保持不变,如此能够避免因集群上的应用(尤其是那些对Pod基本信息具有强依赖性的应用)易因Pod基本信息的变化而发生异常。In order to solve the shortcomings of the above-mentioned related technologies, an embodiment of the present application provides an application update method, which specifically includes: when the cluster includes at least one first Pod, and each first Pod is deployed for running old When the first container of the target application is received, after receiving the application update request for requesting to update the target application, a second container for running the updated target application is created on each first Pod, so that the updated target The application replaces the old target application, thus achieving the purpose of updating the target application on the cluster. Among them, because the application update process is realized by rebuilding the container corresponding to the updated application on the original Pod, the container corresponding to the old target application and the container corresponding to the updated target application are both located on the same Pod, thus The basic information of the Pod corresponding to the target application remains unchanged during the application update process, which can prevent applications on the cluster (especially those applications that have a strong dependence on the basic information of the Pod) from being prone to changes in the basic information of the Pod. abnormal.
为了便于理解本申请的技术方案,下面结合图3对本申请实施例提供的应用更新方法的应用场景进行示例性介绍。其中,图3为本申请实施例提供的应用更新方法的系统架构图。In order to facilitate the understanding of the technical solution of the present application, the application scenario of the application update method provided in the embodiment of the present application will be exemplarily introduced below in conjunction with FIG. 3. Among them, FIG. 3 is a system architecture diagram of an application update method provided by an embodiment of the application.
图3所示的应用场景包括应用更新装置301、图形用户界面(Graphical User Interface,GUI)302和用户303。其中,应用更新装置301部署于集群中,且应用更新装置301通过执行本申请实施例提供的应用更新方法对集群中应用进行更新。GUI302用于接收用户303输入的数据信息以及触发的指令请求。The application scenario shown in FIG. 3 includes an application update device 301, a graphical user interface (GUI) 302, and a user 303. Wherein, the application update device 301 is deployed in the cluster, and the application update device 301 updates the applications in the cluster by executing the application update method provided in the embodiments of the present application. The GUI 302 is used to receive the data information input by the user 303 and the triggered instruction request.
在图3所示的应用场景中,当用户303想要更新目标应用时,用户303可以在GUI302上触发用于请求更新目标应用的应用更新请求,以使GUI302将该应用更新请求发送至应用更新装置301,使得应用更新装置301在第一Pod上创建用于运行更新后的目标应用的第二容器,如此能够实现在集群中利用更新后的目标应用替代旧的目标应用的目的。其中,第一Pod是指部署有用于运行旧的目标应用的第一容器的Pod。In the application scenario shown in Figure 3, when the user 303 wants to update the target application, the user 303 can trigger an application update request on the GUI302 for requesting to update the target application, so that the GUI302 sends the application update request to the application update The device 301 enables the application update device 301 to create a second container for running the updated target application on the first Pod, so that the purpose of replacing the old target application with the updated target application in the cluster can be achieved. Among them, the first Pod refers to the Pod deployed with the first container for running the old target application.
另外,应用更新装置301包括运行模块3011、更新模块3012和通信模块3013。其中,运行模块3011用于在集群节点上运行容器,例如,运行模块3011用于在第一Pod上运行旧的目标应用的第一容器。通信模块3013用于接收用户303通过GUI302发送的信息(如数据信息、指令请求等信息),例如,通信模块3013用于接收应用更新请求。更新模块3012用于对集群中应用进行更新,例如,更新模块3012可以用于在第一Pod上创建用于运行更新后的目标应用的第二容器,以替代旧的目标应用。In addition, the application update device 301 includes an operation module 3011, an update module 3012, and a communication module 3013. The running module 3011 is used to run the container on the cluster nodes. For example, the running module 3011 is used to run the first container of the old target application on the first Pod. The communication module 3013 is used to receive information (such as data information, instruction requests, etc.) sent by the user 303 through the GUI 302. For example, the communication module 3013 is used to receive application update requests. The update module 3012 is used to update applications in the cluster. For example, the update module 3012 can be used to create a second container for running the updated target application on the first Pod to replace the old target application.
另外,本申请实施例不限定GUI302。在一种可能的实施方式中,GUI302是终端设备,例如,GUI302可以是智能手机、计算机、个人数字助理(Personal Digital Assitant,PDA)或平板电脑等终端设备。In addition, the embodiment of the present application does not limit the GUI 302. In a possible implementation manner, the GUI 302 is a terminal device. For example, the GUI 302 may be a terminal device such as a smart phone, a computer, a personal digital assistant (Personal Digital Assistant, PDA), or a tablet computer.
为了使得本申请实施例的技术方案更加清楚、易于理解,下面结合图3所示的应用场景中的交互过程对本申请实施例提供的应用更新方法进行具体介绍。其中,图4为本申请实施例提供的一种应用更新方法的流程图,如图4所示,本申请实施例提供的应用更新方法,包括S401-S403:In order to make the technical solutions of the embodiments of the present application clearer and easier to understand, the application update method provided by the embodiments of the present application will be specifically introduced below in conjunction with the interaction process in the application scenario shown in FIG. 3. Among them, FIG. 4 is a flowchart of an application update method provided by an embodiment of the application. As shown in FIG. 4, the application update method provided by an embodiment of the application includes S401-S403:
S401:应用更新装置301在第一Pod上运行旧的目标应用的第一容器。S401: The application updating apparatus 301 runs the first container of the old target application on the first Pod.
第一容器是指集群中用于运行旧的目标应用(也就是,更新前的目标应用)的容器。The first container refers to the container used to run the old target application (that is, the target application before the update) in the cluster.
第一Pod是指集群中部署有第一容器的Pod,而且本申请实施例不限定第一Pod的个数,也不限定每个第一Pod上部署的第一容器的个数。The first Pod refers to the Pod in which the first container is deployed in the cluster, and this embodiment of the present application does not limit the number of first Pods, nor does it limit the number of first containers deployed on each first Pod.
基于上述内容可知,本申请实施例中,当用户303通过GUI302触发应用运行请求,且该应用运行请求用于请求运行旧的目标应用时,GUI302将该应用运行请求发送给应用更新装置301,以使应用更新装置301在集群中的第一Pod上运行旧的目标应用的第一容器。作为示例,假设集群包括节点1、节点2和节点3,节点1上部署有Pod1、Pod2和Pod3,节点2上部署有Pod3和Pod4,节点3上部署有Pod5,Pod1、Pod2和Pod5上均部署有第一容器。基于该假设可知,因Pod1、Pod2和Pod5上均部署有第一容器,使得Pod1、Pod2和Pod5均是第一Pod,故在应用更新装置301接收到上述应用运行请求之后,该应用更新装置301可以在Pod1、Pod2或Pod5上运行第一容器,以实现在集群中运行旧的目标应用。Based on the above content, in this embodiment of the application, when the user 303 triggers an application running request through the GUI302, and the application running request is used to request to run an old target application, the GUI302 sends the application running request to the application update device 301 to The application update apparatus 301 is made to run the first container of the old target application on the first Pod in the cluster. As an example, suppose the cluster includes node 1, node 2, and node 3. Pod1, Pod2, and Pod3 are deployed on node 1, Pod3 and Pod4 are deployed on node 2, Pod5 is deployed on node 3, and Pod1, Pod2, and Pod5 are all deployed There is the first container. Based on this assumption, it can be known that since the first container is deployed on Pod1, Pod2, and Pod5, Pod1, Pod2, and Pod5 are all the first Pod. Therefore, after the application update device 301 receives the above application running request, the application update device 301 You can run the first container on Pod1, Pod2, or Pod5 to run the old target application in the cluster.
S402:应用更新装置301接收应用更新请求。S402: The application update device 301 receives an application update request.
应用更新请求用于请求更新目标应用,而且应用更新请求是由用户303通过GUI302触发的。The application update request is used to request to update the target application, and the application update request is triggered by the user 303 through the GUI302.
另外,本申请实施例不限定应用更新请求携带的信息。下面结合两种示例进行说明。In addition, the embodiment of this application does not limit the information carried in the application update request. The following describes with two examples.
示例一,应用更新请求携带有更新后的目标应用的应用参数,且该应用参数包括应用版本信息和/或应用配置信息。Example 1: The application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
具体地,当应用更新请求用于请求将目标应用的当前版本更新为目标版本时,则该应用更新请求携带有该目标版本的应用版本信息(也就是,更新后的目标应用的版本信息);当应用更新请求用于请求将目标应用的当前应用配置信息更新为目标应用配置信息时,则该应用更新请求携带有该目标应用配置信息(也就是,更新后的目标应用的应用配置信息);当应用更新请求用于请求将目标应用的当前版本更新为目标版本,并将目标应用的当前应用配置信息更新为目标应用配置信息时,则该应用更新请求携带有目标应用配置信息和该目标版本的应用版本信息。Specifically, when the application update request is used to request to update the current version of the target application to the target version, the application update request carries the application version information of the target version (that is, the updated version information of the target application); When the application update request is used to request to update the current application configuration information of the target application to the target application configuration information, the application update request carries the target application configuration information (that is, the updated application configuration information of the target application); When the application update request is used to request that the current version of the target application be updated to the target version, and the current application configuration information of the target application is updated to the target application configuration information, the application update request carries the target application configuration information and the target version App version information for.
示例二,当应用更新装置301可以采用多种类型的应用更新过程对集群中应用进行更新时,应用更新请求可以携带有应用更新类型和更新后的目标应用的应用参数。其中,应用更新类型是由用户303通过GUI302指定的,而且应用更新装置301能够根据该应用更新类型确定更新目标应用时所使用的应用更新过程。如此,应用更新装置301不仅能够从该应用更新请求中提取出更新后的目标应用的应用参数,还能够从该应用更新请求中提取出更新目标应用所使用的应用更新过程的选择信息。Example 2: When the application update apparatus 301 can use multiple types of application update processes to update applications in the cluster, the application update request can carry the application update type and the updated application parameters of the target application. The application update type is specified by the user 303 through the GUI 302, and the application update device 301 can determine the application update process used when updating the target application according to the application update type. In this way, the application update device 301 can not only extract the updated application parameters of the target application from the application update request, but also extract the selection information of the application update process used to update the target application from the application update request.
基于上述内容可知,本申请实施例中,当用户303通过GUI302触发应用更新请求,且该应用更新请求用于请求更新目标应用时,GUI302将该应用更新请求发送给应用更新装置301,以使该应用更新装置301能够基于该应用更新请求携带的信息对集群中的目标应用进行更新。Based on the foregoing content, in this embodiment of the application, when the user 303 triggers an application update request through the GUI302, and the application update request is used to request to update the target application, the GUI302 sends the application update request to the application update device 301, so that the The application update device 301 can update the target application in the cluster based on the information carried in the application update request.
S403:应用更新装置301在第一Pod上创建用于运行更新后的目标应用的第二容器,以替代旧的目标应用。S403: The application updating device 301 creates a second container for running the updated target application on the first Pod to replace the old target application.
第二容器是指集群中用于运行更新后的目标应用的容器。The second container refers to the container used to run the updated target application in the cluster.
本申请实施例中,在应用更新装置301获取到应用更新请求之后,应用更新装置301利用该应用更新请求携带的应用参数,在各第一Pod上创建第二容器,以使在各第一Pod上利用更新后的目标应用替代旧的目标应用。作为示例,当集群中包括Pod1、Pod2和Pod5,且Pod1、Pod2和Pod5上均部署有第一容器时,Pod1、Pod2和Pod5上均为第一Pod,而且S403具体为:应用更新装置301在Pod1上创建第二容器、在Pod2上创建第二容器、以及在Pod5上创建第二容器,以使后续应用更新装置301通过运行Pod1上的第二容器、Pod2上的第二容器或者Pod5上的第二容器的方式,实现在集群中运行更新后的目标应用的目的。In the embodiment of the present application, after the application update device 301 obtains the application update request, the application update device 301 uses the application parameters carried in the application update request to create a second container on each first Pod, so that Use the updated target application to replace the old target application. As an example, when the cluster includes Pod1, Pod2, and Pod5, and the first container is deployed on Pod1, Pod2, and Pod5, Pod1, Pod2, and Pod5 are all the first Pod, and S403 is specifically: the application update device 301 is on Create a second container on Pod1, create a second container on Pod2, and create a second container on Pod5, so that the subsequent application update device 301 can run the second container on Pod1, the second container on Pod2, or the second container on Pod5. The second container approach realizes the purpose of running the updated target application in the cluster.
基于上述S401至S403的相关内容可知,在本申请实施例提供的应用更新方法中,当集群中包括至少一个第一Pod,且在每个第一Pod上部署有用于运行旧的目标应用的第一容器时,在接收到用于请求更新目标应用的应用更新请求之后,在各第一Pod上创建用于运行更新后的目标应用的第二容器,以使更新后的目标应用替代旧的目标应用,如此实现对集群上的目标应用进行更新的目的。可见,在对集群上的任一应用进行更新时,只需通过在该应用对应的原有Pod上创建用于运行更新后应用的新容器即可,如此能够有效地简化应用更新操作,从而提高了应用更新效率。另外,因该应用更新过程是通过在原有Pod上重建更新后应用对应的容器的方式实现的,使得旧的目标应用和更新后的目标应用均位于同一个Pod上,从而使得目标应用对应的Pod基本信息在应用更新过程中始终保持不变,如此能够避免因集群上的应用(尤其是那些对Pod基本信息具有强依赖性的应用)易因Pod基本信息的变化而发生异常。Based on the above related content of S401 to S403, it can be known that in the application update method provided in the embodiment of the present application, when the cluster includes at least one first Pod, and each first Pod is deployed with a first Pod for running the old target application In the case of a container, after receiving an application update request for requesting to update the target application, create a second container for running the updated target application on each first Pod, so that the updated target application replaces the old target Application, so as to achieve the purpose of updating the target application on the cluster. It can be seen that when updating any application on the cluster, you only need to create a new container for running the updated application on the original Pod corresponding to the application. This can effectively simplify the application update operation and improve Improved application update efficiency. In addition, because the application update process is implemented by rebuilding the container corresponding to the updated application on the original Pod, the old target application and the updated target application are both located on the same Pod, so that the Pod corresponding to the target application The basic information always remains the same during the application update process, which can prevent the applications on the cluster (especially those applications that have a strong dependence on the basic information of the Pod) from being abnormal due to the changes of the basic information of the Pod.
在一些情况(如应用更新装置301为k8s)下,第一Pod上的第二容器可以参照Pod模板上的第二容器进行创建。基于此,本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括S401-S403以外,还包括S404:In some cases (for example, the application update device 301 is k8s), the second container on the first Pod can be created with reference to the second container on the Pod template. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes S401-S403 as well as S404:
S404:应用更新装置301获取Pod模板,该Pod模板指定上述第二容器。S404: The application updating device 301 obtains a Pod template, the Pod template designating the aforementioned second container.
Pod模板是指在节点上创建Pod以及在Pod上创建容器时需要参照的对象。例如,在k8s中,可以将Pod模板的副本部署到节点上,作为节点上Pod;也可以依据Pod模 板上部署的容器,在Pod上创建相应容器,以使该Pod上部署的容器与该Pod模板上部署的容器保持一致。Pod templates refer to objects that need to be referenced when creating a Pod on a node and creating a container on the Pod. For example, in k8s, a copy of the Pod template can be deployed on the node as a Pod on the node; you can also create a corresponding container on the Pod based on the container deployed on the Pod template, so that the container deployed on the Pod is the same as the Pod. The containers deployed on the template are consistent.
另外,Pod模板可以依据更新后的目标应用的应用参数进行创建,以使该Pod模板上部署有上述第二容器,从而使得该Pod模板能够指定上述第二容器。In addition, the Pod template can be created according to the updated application parameters of the target application, so that the second container is deployed on the Pod template, so that the Pod template can specify the second container.
基于上述内容可知,本申请实施例中,在应用更新装置301接收到应用更新请求之后,应用更新装置301先根据该应用更新请求携带的更新后的目标应用的应用参数创建Pod模板,以使Pod模板上部署有第二容器;再按照Pod模板上部署的第二容器,在各第一Pod上创建第二容器,以使各第一Pod上的第二容器与Pod模板上的第二容器相同,如此实现了第二容器的创建。其中,因Pod模板能够指定第二容器,使得在各第一Pod上创建第二容器时,直接根据Pod模板指定的第二容器进行创建即可,无需在各第一Pod上分别依据上述应用参数创建第二容器,如此能够减少在各第一Pod上创建第二容器的耗时,从而能够提高集群中应用的更新效率。Based on the above content, in this embodiment of the application, after the application update device 301 receives the application update request, the application update device 301 first creates a Pod template according to the updated application parameters of the target application carried in the application update request, so that the Pod A second container is deployed on the template; then follow the second container deployed on the Pod template to create a second container on each first Pod, so that the second container on each first Pod is the same as the second container on the Pod template , So the creation of the second container is realized. Among them, because the Pod template can specify the second container, when creating the second container on each first Pod, it can be created directly according to the second container specified by the Pod template, and there is no need to separately follow the above application parameters on each first Pod. Creating a second container can reduce the time consumption of creating a second container on each first Pod, thereby improving the update efficiency of applications in the cluster.
另外,为了提高目标应用的更新效率,可以基于集群中各Pod与上述Pod模板匹配结果,从集群中所有Pod中筛选出各第一Pod。基于此,本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括S401-S404以外,还包括S405:In addition, in order to improve the update efficiency of the target application, each first Pod can be filtered from all the Pods in the cluster based on the result of matching each Pod in the cluster with the aforementioned Pod template. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes S401-S404 as well as S405:
S405:应用更新装置301从多个Pod中选择与上述Pod模板匹配的Pod,选出的Pod为第一Pod。S405: The application update device 301 selects a Pod matching the above-mentioned Pod template from a plurality of Pods, and the selected Pod is the first Pod.
与上述Pod模板匹配的Pod满足的条件为:该Pod上部署的容器对应的应用与Pod模板上部署的容器对应的应用之间的区别仅在于应用参数不同。例如,当应用更新装置301为k8s时,与上述Pod模板匹配的Pod满足的条件可以为:该Pod上部署有目标应用对应容器,且该Pod上部署的目标应用对应容器不同于Pod模板上部署的目标应用对应容器。The Pod that matches the above Pod template satisfies the condition that: the difference between the application corresponding to the container deployed on the Pod and the application corresponding to the container deployed on the Pod template is only in the application parameters. For example, when the application update device 301 is k8s, the Pod that matches the above Pod template satisfies the conditions: the Pod is deployed with a container corresponding to the target application, and the container corresponding to the target application deployed on the Pod is different from that deployed on the Pod template The target application corresponds to the container.
需要说明的是,步骤S405可以在执行S404之后且执行S403之前完成执行。It should be noted that step S405 may be executed after S404 is executed and before S403 is executed.
基于上述内容可知,本申请实施例中,应用更新装置301在获取到用于指定第二容器的Pod模板之后,先将集群中各Pod与Pod模板进行匹配,并将与Pod模板匹配成功的各Pod均确定为第一Pod,再在这些确定出的各第一Pod上创建第二容器。其中,因各第一Pod是预先基于Pod模板从集群中所有Pod中筛选得到的,使得后续可以只在这些筛选出的第一Pod执行应用更新过程的其他步骤,无需考虑集群中除了第一Pod以外的其他Pod,如此有利于提高目标应用的创建效率。Based on the above content, in this embodiment of the application, after obtaining the Pod template for specifying the second container, the application update device 301 first matches each Pod in the cluster with the Pod template, and matches each pod template that has been successfully matched with the Pod template. The Pods are all determined to be the first Pod, and then a second container is created on each of the determined first Pods. Among them, because each first Pod is pre-screened from all Pods in the cluster based on the Pod template, it is possible to perform other steps of the application update process only on the first selected Pods, without considering the cluster except for the first Pod. Pods other than those will help improve the efficiency of creating target applications.
在一些情况下,可以预先将Pod上部署的容器化应用的应用标识与该Pod之间建立对应关系,以便后续能够基于该应用标识查找出部署有该容器化应用的Pod。基于此可知,本申请实施例还可以基于目标应用的应用标识,从集群中所有Pod中筛选出各第一Pod,故本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括上述部分步骤或全部步骤以外,还包括S406:In some cases, a corresponding relationship may be established between the application identifier of the containerized application deployed on the Pod and the Pod in advance, so that the Pod on which the containerized application is deployed can be found subsequently based on the application identifier. Based on this, the embodiment of the present application can also filter out each first Pod from all Pods in the cluster based on the application identifier of the target application. Therefore, the embodiment of the present application also provides a possible implementation of the application update method. In this implementation manner, the application update method includes not only some or all of the above steps, but also includes S406:
S406:应用更新装置301将多个Pod中对应于目标应用标识的Pod,确定为第一Pod。S406: The application updating device 301 determines the Pod corresponding to the target application identifier among the multiple Pods as the first Pod.
目标应用标识用于唯一标识目标应用。另外,本申请实施例不限定目标应用标识的获取方式,例如,当应用更新请求中携带有目标应用标识的相关信息时,则应用更新装置301可以根据该应用更新请求,获得目标应用标识。The target application identifier is used to uniquely identify the target application. In addition, the embodiment of the present application does not limit the method of obtaining the target application identifier. For example, when the application update request carries related information about the target application identifier, the application update device 301 may obtain the target application identifier according to the application update request.
基于上述内容可知,本申请实施例中,在应用更新装置301获取到应用更新请求之后,应用更新装置301先根据应用更新请求确定目标应用标识,再从集群中所有Pod中筛选出对应于目标应用标识的各Pod,均作为第一Pod,以便后续应用更新装置301能够直接在这些确定出的各第一Pod上创建第二容器,如此有利于提高第二容器的创建效率。Based on the above content, in this embodiment of the application, after the application update device 301 obtains the application update request, the application update device 301 first determines the target application identifier according to the application update request, and then filters out all Pods in the cluster that correspond to the target application Each identified Pod is used as the first Pod, so that the subsequent application update device 301 can directly create a second container on each of the determined first Pods, which is beneficial to improve the efficiency of creating the second container.
另外,为了节约Pod空间,可以删除第一Pod上用于运行旧的目标应用的第一容器,以使第一Pod上不再部署有旧的目标应用对应的容器。基于此,本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括上述部分步骤或全部步骤以外,还包括S407:In addition, in order to save Pod space, the first container used to run the old target application on the first Pod may be deleted, so that the container corresponding to the old target application is no longer deployed on the first Pod. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes not only some or all of the above steps, but also includes S407:
S407:应用更新装置301在第一Pod上删除第一容器。S407: The application updating apparatus 301 deletes the first container on the first Pod.
本申请实施例中,在应用更新装置301接收到应用更新请求之后,应用更新装置301可以在各第一Pod上创建第二容器并删除第一容器,以使各第一Pod上只部署有目标应用的最新容器,不再部署有目标应用的历史容器,如此能够有效地节约Pod空间。In this embodiment of the application, after the application update apparatus 301 receives the application update request, the application update apparatus 301 may create a second container on each first Pod and delete the first container, so that only the target is deployed on each first Pod The latest container of the application is no longer deployed with the historical container of the target application, which can effectively save Pod space.
需要说明的是,本申请实施不限定在第一Pod上删除第一容器和创建第二容器的执行顺序,例如,在任一第一Pod上,可以先删除第一容器再创建第二容器,也可以先创建第二容器再删除第一容器。It should be noted that the implementation of this application does not limit the execution order of deleting the first container and creating the second container on the first Pod. For example, on any first Pod, you can delete the first container and then create the second container. You can create the second container first and then delete the first container.
另外,本申请实施例不限定应用更新装置301在各第一Pod上删除第一容器的执行时间,下面结合两个示例进行说明。In addition, the embodiment of the present application does not limit the execution time for the application update apparatus 301 to delete the first container on each first Pod, and the following describes with two examples.
示例一,应用更新装置301可以在所有第一Pod上均删除第一容器之后,再分别在各第一Pod上创建第二容器。例如,当Pod1、Pod2、Pod5和Pod6上均部署有第一容器时,应用更新装置301可以在Pod1上删除第一容器、在Pod2上删除第一容器、在Pod5上删除第一容器、以及在Pod6上删除第一容器之后,在Pod1上创建第二容器、在Pod2上创建第二容器、在Pod5上创建第二容器、以及在Pod6上创建第二容器。Example 1: The application update apparatus 301 may delete the first container on all the first Pods, and then create the second container on each first Pod. For example, when the first container is deployed on Pod1, Pod2, Pod5, and Pod6, the application update device 301 can delete the first container on Pod1, delete the first container on Pod2, delete the first container on Pod5, and delete the first container on Pod5. After deleting the first container on Pod6, create a second container on Pod1, create a second container on Pod2, create a second container on Pod5, and create a second container on Pod6.
示例二,应用更新装置301可以按照处于容器更新状态的Pod个数保持不变的模式进行第一Pod上第二容器的创建及第一容器的删除。例如,当Pod1、Pod2、Pod5和Pod6上均部署有第一容器,且应用更新装置301中处于容器更新状态的Pod个数为2时,应用更新装置301分别在Pod1和Pod2上进行容器更新(也就是,删除第一容器并创建第二容器);当Pod1和Pod2同时完成容器更新时,应用更新装置301分别开始在Pod5和Pod6上进行容器更新;当Pod1和Pod2没有同时完成容器更新(例如,Pod1完成容器更新但Pod2未完成容器更新,或者Pod2完成容器更新但Pod1未完成容器更新)时,应用更新装置301开始在Pod5上进行容器更新,以使应用更新装置301中始终保持2个第一Pod处于容器更新状态。如此能够保证应用更新装置301中始终保持2个第一Pod处于容器更新状态。Example 2: The application update device 301 can create the second container on the first Pod and delete the first container in a mode in which the number of Pods in the container update state remains unchanged. For example, when the first container is deployed on Pod1, Pod2, Pod5, and Pod6, and the number of Pods in the container update state in the application update device 301 is 2, the application update device 301 performs container update on Pod1 and Pod2 ( That is, delete the first container and create a second container); when Pod1 and Pod2 complete the container update at the same time, the application update device 301 starts to update the container on Pod5 and Pod6 respectively; when Pod1 and Pod2 do not complete the container update at the same time (for example , Pod1 completes the container update but Pod2 does not complete the container update, or Pod2 completes the container update but Pod1 does not complete the container update), the application update device 301 starts to update the container on Pod5, so that the application update device 301 always maintains the second position A Pod is in a container update state. In this way, it can be ensured that the two first Pods are always kept in the container update state in the application update device 301.
另外,在示例二中,处于容器更新状态的Pod个数可以由用户303通过GUI302指定,可以在应用更新装置301中预先设定。In addition, in the second example, the number of Pods in the container update state can be designated by the user 303 through the GUI 302, and can be preset in the application update device 301.
在一些情况下,应用更新装置301可以采用多种类型的应用更新过程对集群中应用进行更新,故应用更新装置301可以根据用户303通过GUI302指定的应用更新类型确定应用更新过程。基于此,本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括上述部分步骤或全部步骤以外,还包括S408:In some cases, the application update device 301 can use multiple types of application update processes to update applications in the cluster, so the application update device 301 can determine the application update process according to the application update type specified by the user 303 through the GUI302. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes not only some or all of the above steps, but also includes S408:
S408:应用更新装置301通过GUI302接收用户303指定的应用更新类型,具有该 应用更新类型的应用为待更新的目标应用。S408: The application update apparatus 301 receives the application update type specified by the user 303 through the GUI 302, and the application with the application update type is the target application to be updated.
本申请实施例中,当应用更新装置301通过GUI302接收到用户303指定的目标应用的应用更新类型时,应用更新装置301先根据该应用更新类型,确定对应于该应用更新类型的应用更新过程,以使后续应用更新装置301按照该确定的应用更新过程对集群中目标应用进行更新。例如,当应用更新装置301根据该应用更新类型确定的应用更新过程包括本申请实施例提供的应用更新方法任一实施方式中的步骤时,则应用更新装置301按照本申请实施例提供的应用更新方法任一实施方式更新目标应用。In the embodiment of the present application, when the application update apparatus 301 receives the application update type of the target application specified by the user 303 through the GUI 302, the application update apparatus 301 first determines the application update process corresponding to the application update type according to the application update type. This allows the subsequent application update device 301 to update the target application in the cluster according to the determined application update process. For example, when the application update process determined by the application update apparatus 301 according to the application update type includes the steps in any implementation manner of the application update method provided in the embodiment of the present application, the application update apparatus 301 follows the application update provided in the embodiment of the present application. Any implementation of the method updates the target application.
在一些情况下,用户303没有通过GUI302直接指定应用更新类型,而是通过GUI302输入应用更新过程的描述信息(如应用更新过程不能变更Pod基本信息等信息),此时,应用更新装置301可以基于这些描述信息确定出应用更新类型。基于此,本申请实施例还提供了应用更新方法的一种可能的实施方式,在该实施方式中,应用更新方法除了包括上述部分步骤或全部步骤以外,还包括S409-S412:In some cases, the user 303 does not directly specify the application update type through the GUI302, but enters the description information of the application update process through the GUI302 (for example, the basic information of the Pod cannot be changed during the application update process). At this time, the application update device 301 can be based on The description information determines the type of application update. Based on this, the embodiment of the present application also provides a possible implementation manner of the application update method. In this implementation manner, the application update method includes S409-S412 in addition to some or all of the above steps:
S409:应用更新装置301通过GUI302接收用户303输入的目标过程信息。S409: The application update apparatus 301 receives the target process information input by the user 303 through the GUI302.
目标过程信息为目标应用的应用更新过程的描述信息。另外,本申请实施例不限定目标过程信息。作为示例,目标过程信息包括应用更新过程的约束条件,和/或应用更新过程中部分或全部步骤的描述信息。其中,应用更新过程的约束条件用于描述应用更新过程应该满足的限制条件,例如,应用更新过程的约束条件可以为应用更新过程不能变更Pod基本信息。The target process information is the description information of the application update process of the target application. In addition, the embodiment of the present application does not limit the target process information. As an example, the target process information includes constraint conditions of the application update process, and/or description information of part or all of the steps in the application update process. Among them, the constraint condition of the application update process is used to describe the constraint condition that the application update process should meet. For example, the constraint condition of the application update process may be that the basic information of the Pod cannot be changed during the application update process.
S410:应用更新装置301根据目标过程信息确定应用更新类型。S410: The application update device 301 determines the application update type according to the target process information.
本申请实施例不限定应用更新装置301确定应用更新类型的具体实施方式,例如,S410具体可以为:应用更新装置301先获取各应用更新类型对应的预设描述信息,再将目标过程信息分别与各应用更新类型对应的预设描述信息进行匹配,确定对应于匹配度最高的预设描述信息的应用更新类型。The embodiment of the application does not limit the specific implementation manner for the application update apparatus 301 to determine the application update type. For example, S410 may specifically be: the application update apparatus 301 first obtains the preset description information corresponding to each application update type, and then compares the target process information with the target process information. The preset description information corresponding to each application update type is matched, and the application update type corresponding to the preset description information with the highest matching degree is determined.
其中,预设描述信息是预先设定并存储在预设存储位置的,而且应用更新装置301能够从该预设存储位置获取该预设描述信息。The preset description information is preset and stored in a preset storage location, and the application update device 301 can obtain the preset description information from the preset storage location.
本申请实施例中,在应用更新装置301接收到目标过程信息之后,先从预设存储位置获取各应用更新类型对应的预设描述信息,并将各应用更新类型对应的预设描述信息与目标过程信息分别进行匹配,得到各应用更新类型对应的匹配度;再比较各应用更新类型对应的匹配度,并将对应于最高匹配度的应用更新类型,确定为最终的应用更新类型。In this embodiment of the application, after the application update device 301 receives the target process information, it first obtains the preset description information corresponding to each application update type from the preset storage location, and compares the preset description information corresponding to each application update type with the target The process information is matched separately to obtain the matching degree corresponding to each application update type; then the matching degree corresponding to each application update type is compared, and the application update type corresponding to the highest matching degree is determined as the final application update type.
S411:应用更新装置301将应用更新类型通过GUI302进行显示,以使用户303确定是否选择该应用更新类型。S411: The application update device 301 displays the application update type through the GUI 302, so that the user 303 determines whether to select the application update type.
S412:应用更新装置301接收用户303通过GUI302输入的选择结果。S412: The application update apparatus 301 receives the selection result input by the user 303 through the GUI302.
基于上述内容可知,本申请实施例中,当用户303在GUI302上输入目标过程信息时,GUI302将该目标过程信息发送给应用更新装置301,以使应用更新装置301先根据目标过程信息确定应用更新类型,再将该应用更新类型反馈给GUI302,以使GUI302将应用更新类型显示给用户303,并由用户303通过GUI302确认是否选择该显示的应用更新类型,以便GUI302将用户303的选择结果反馈给应用更新装置301,以使应用更新装置301基于该选择结果确定上述确定的应用更新类型是否为用户为目标应用指定的应用更新类 型,若是,则直接利用对应于上述确定的应用更新类型的应用更新过程进行目标应用的更新;若否,则结束当前的应用更新过程或者重新向用户303推荐其他的应用更新类型。可见,因应用更新装置301能够根据用户303提供的目标过程信息自动确定应用更新类型,无需用户303直接指定应用更新类型,如此降低了用户使用应用更新装置301的技术门槛,有利于提高用户体验。Based on the above content, in this embodiment of the application, when the user 303 enters the target process information on the GUI302, the GUI302 sends the target process information to the application update device 301, so that the application update device 301 first determines the application update according to the target process information Type, and then feedback the application update type to GUI302, so that GUI302 displays the application update type to user 303, and user 303 confirms whether to select the displayed application update type through GUI302, so that GUI302 will feed back user 303’s selection result to The application update device 301, so that the application update device 301 determines whether the determined application update type is the application update type specified by the user for the target application based on the selection result, and if so, directly uses the application update corresponding to the determined application update type The process updates the target application; if not, ends the current application update process or recommends another application update type to the user 303 again. It can be seen that because the application update device 301 can automatically determine the application update type according to the target process information provided by the user 303, there is no need for the user 303 to directly specify the application update type, which reduces the technical threshold for the user to use the application update device 301 and is beneficial to improve user experience.
为了便于理解上述技术方案,下面结合图2和图5并以应用更新装置为k8s为例对本申请实施例提供的应用更新方法进行说明。其中,图5为本申请实施例提供的应用于k8s的应用更新方法流程图。如图5所示,本申请实施例提供的应用于k8s的应用更新方法,包括S501-S505:In order to facilitate the understanding of the foregoing technical solution, the application update method provided by the embodiment of the present application will be described below in conjunction with FIG. 2 and FIG. 5 and taking the application update device as k8s as an example. Wherein, FIG. 5 is a flowchart of an application update method applied to k8s according to an embodiment of the application. As shown in Figure 5, the application update method applied to k8s provided by the embodiment of the present application includes S501-S505:
S501:kube-apiserver接收用户通过GUI触发的应用更新请求,该应用更新请求用于请求更新目标应用,且该应用更新请求携带有更新后的目标应用的应用参数和用户指定的目标应用的应用更新类型。S501: The kube-apiserver receives an application update request triggered by the user through the GUI, the application update request is used to request to update the target application, and the application update request carries the updated application parameters of the target application and the application update of the target application specified by the user type.
应用更新类型与应用更新过程一一对应,且该对应关系具体为:k8s的应用更新类型包括Recreate Update类型、Rolling Update类型和InplaceRolling Update类型,而且Recreate Update类型对应于上文的Recreate Update方式,Rolling Update类型对应于上文的Rolling Update方式,InplaceRolling Update类型对应于本申请实施例提供的应用更新方法。There is a one-to-one correspondence between application update types and application update processes, and the corresponding relationship is specifically: k8s application update types include Recreate Update type, Rolling Update type, and Inplace Rolling Update type, and the Recreate Update type corresponds to the above Recreate Update method, Rolling The Update type corresponds to the above Rolling Update method, and the Inplace Rolling Update type corresponds to the application update method provided in the embodiment of the present application.
本申请实施例中,当k8s中的kube-apiserver通过GUI接收到应用更新请求之后,kube-apiserver可以直接将该应用更新请求携带的更新后的目标应用的应用参数和用户指定的目标应用的应用更新类型存储到etcd,以便后续k8s中的其他组件(如Deployment Controller)能够使用etcd中存储的上述信息。In the embodiment of this application, after the kube-apiserver in k8s receives the application update request through the GUI, the kube-apiserver can directly carry the application update request with the updated application parameters of the target application and the application of the target application specified by the user The update type is stored in etcd so that other components in subsequent k8s (such as Deployment Controller) can use the above information stored in etcd.
S502:Deployment Controller判断etcd中存储的目标应用的应用参数是否发生更新,若是,则执行S503;若否,则结束。S502: The Deployment Controller judges whether the application parameters of the target application stored in etcd are updated, if yes, execute S503; if not, end.
Deployment Controller用于通过kube-apiserver实时监控etcd中存储的数据信息(如,目标应用的应用参数)是否发生变化。The Deployment Controller is used to monitor whether the data information stored in etcd (such as the application parameters of the target application) changes in real time through the kube-apiserver.
本申请实施例中,当k8s中的kube-apiserver将应用更新请求携带的更新后的目标应用的应用参数存储至etcd之后,Deployment Controller能够通过kube-apiserver监控到目标应用对应的应用参数发生更新,从而Deployment Controller需要执行S503及其后续步骤,以便完成目标应用的更新过程。In the embodiment of this application, after the kube-apiserver in k8s stores the updated application parameters of the target application carried in the application update request in etcd, the Deployment Controller can monitor that the application parameters corresponding to the target application are updated through the kube-apiserver. Therefore, the Deployment Controller needs to perform S503 and subsequent steps in order to complete the update process of the target application.
S503:在Deployment Controller确定etcd中存储的目标应用的应用更新类型为InplaceRolling Update类型时,Deployment Controller根据更新后的目标应用的应用参数,更新目标应用的Pod模板。S503: When the Deployment Controller determines that the application update type of the target application stored in etcd is the InplaceRolling Update type, the Deployment Controller updates the Pod template of the target application according to the updated application parameters of the target application.
本申请实施例中,在Deployment Controller确定etcd中存储的目标应用的应用参数发生更新之后,Deployment Controller先根据etcd中存储的目标应用的应用更新类型,确定目标应用的应用更新过程,其具体为:当Deployment Controller确定目标应用的应用更新类型为Recreate Update类型时,则利用上文介绍的Recreate Update方式对目标应用进行更新;当Deployment Controller确定目标应用的应用更新类型为Rolling Update类型,则利用上文介绍的Rolling Update方式对目标应用进行更新;在Deployment Controller 确定目标应用的应用更新类型为InplaceRolling Update类型时,则利用S503至S505对目标应用进行更新。In the embodiment of this application, after the Deployment Controller determines that the application parameters of the target application stored in etcd are updated, the Deployment Controller first determines the application update process of the target application according to the application update type of the target application stored in etcd, which is specifically: When the Deployment Controller determines that the application update type of the target application is the Recreate Update type, it uses the Recreate Update method described above to update the target application; when the Deployment Controller determines that the application update type of the target application is the Rolling Update type, it uses the above The introduced Rolling Update method updates the target application; when the Deployment Controller determines that the application update type of the target application is the InplaceRolling Update type, S503 to S505 are used to update the target application.
另外,本申请实施例不限定目标应用的Pod模板的更新过程,例如,目标应用的Pod模板的更新过程具体可以为:Deployment Controller根据更新后的目标应用的应用参数,创建目标应用的新Pod模板;Deployment Controller将目标应用的新Pod模板存储至etcd中,并将该新模板设置为目标应用的Pod模板,以使部署有第一Pod的节点上的kubelet能够基于该Pod模板更新第一Pod。In addition, the embodiment of the present application does not limit the update process of the Pod template of the target application. For example, the update process of the Pod template of the target application may specifically be: Deployment Controller creates a new Pod template of the target application according to the updated application parameters of the target application The Deployment Controller stores the new Pod template of the target application in etcd, and sets the new template as the Pod template of the target application, so that the kubelet on the node where the first Pod is deployed can update the first Pod based on the Pod template.
S504:Deployment Controller根据目标应用的应用标识确定各第一Pod。S504: The Deployment Controller determines each first Pod according to the application identifier of the target application.
在k8s中,目标应用的应用标识可以是第一标签;而且,具有第一标签的Pod上均部署有第一容器。另外,本申请实施例不限定目标应用的应用标识的确定方式,例如,可以基于上述应用更新请求中携带的目标应用的相关信息确定。In k8s, the application identifier of the target application may be the first label; moreover, the first container is deployed on all Pods with the first label. In addition, the embodiment of the present application does not limit the method for determining the application identifier of the target application. For example, it may be determined based on the relevant information of the target application carried in the application update request.
另外,在k8s中,本申请实施例不限定各第一Pod的确定方式,例如,可以将selector字段为目标应用的应用标识的Replicaset中的各Pod副本确定为第一Pod。In addition, in k8s, the embodiment of the present application does not limit the determination method of each first Pod. For example, each Pod replica in the Replicaset whose selector field is the application identifier of the target application can be determined as the first Pod.
需要说明的是,为了保证在容器更新过程中,目标应用对应的Replicaset能够始终包括目标应用对应的所有Pod,可以将目标应用对应的Replicaset的selector字段修改为旧的目标应用的应用标识和更新后的目标应用的应用标识,直至在确定目标应用对应的所有Pod均部署有第二容器之后,再次将目标应用对应的Replicaset的selector字段修改为更新后的目标应用的应用标识,以使Deployment Controller能够始终利用目标应用对应的Replicaset的selector字段,查询得到目标应用对应的所有Pod。It should be noted that in order to ensure that during the container update process, the Replicaset corresponding to the target application can always include all Pods corresponding to the target application, the selector field of the Replicaset corresponding to the target application can be modified to the application ID of the old target application and after the update After confirming that all Pods corresponding to the target application are deployed with the second container, modify the selector field of the Replicaset corresponding to the target application to the updated application identifier of the target application, so that the Deployment Controller can Always use the selector field of the Replicaset corresponding to the target application to query all Pods corresponding to the target application.
S505:各第一Pod对应的kubelet在确定该第一Pod需要更新时,在该第一Pod上创建第二容器并删除第一容器。S505: When the kubelet corresponding to each first Pod determines that the first Pod needs to be updated, it creates a second container on the first Pod and deletes the first container.
本申请实施例不限定kubelet确定第一Pod需要更新的具体实施方式,例如,对于每个第一Pod对应的kubelet来说,该kubelet将该第一Pod与etcd中存储的目标应用的Pod模板进行比对,在确定该第一Pod上部署的目标应用对应的容器与上述Pod模板上部署的目标应用对应的容器存在区别时,确定该第一Pod需要更新,并在该第一Pod上创建第二容器并删除第一容器,以使该第一Pod能够在第二容器中运行更新后的目标应用。为了便于理解S505,下面结合示例进行说明。The embodiment of this application does not limit the specific implementation manner in which the kubelet determines that the first Pod needs to be updated. For example, for each kubelet corresponding to the first Pod, the kubelet performs the Pod template of the first Pod and the target application stored in etcd. By comparison, when it is determined that the container corresponding to the target application deployed on the first Pod is different from the container corresponding to the target application deployed on the above Pod template, it is determined that the first Pod needs to be updated, and the first Pod is created on the first Pod. Second container and delete the first container, so that the first Pod can run the updated target application in the second container. In order to facilitate the understanding of S505, the following description is combined with an example.
作为示例,假设集群包括节点1、节点2和节点3;节点1上部署有Pod1、Pod2和Pod3,节点2上部署有Pod3和Pod4,节点3上部署有Pod5;Pod1、Pod2和Pod5上均部署有第一容器;节点1上部署有kubelet1,节点2上部署有kubelet2,节点3上部署有kubelet3。As an example, suppose the cluster includes node 1, node 2, and node 3; Pod1, Pod2, and Pod3 are deployed on node 1, Pod3 and Pod4 are deployed on node 2, Pod5 is deployed on node 3, and Pod1, Pod2, and Pod5 are all deployed There is a first container; kubelet1 is deployed on node 1, kubelet2 is deployed on node 2, and kubelet3 is deployed on node 3.
基于上述假设可知,当etcd中存储的目标应用的Pod模板更新完成时,kubelet1将节点1上部署的Pod1与etcd中存储的目标应用的Pod模板进行比对,并在确定Pod1上的第一容器不同于Pod模板上的第二容器时,确定Pod1需要更新,此时该kubelet1按照该Pod模板在Pod1上创建第二容器并删除第一容器,以使Pod1上部署的目标应用对应的容器与Pod模板上部署的目标应用对应的容器相同。同样,kubelet1将节点1上部署的Pod2与etcd中存储的目标应用的Pod模板进行比对,并在确定Pod2上的第一容器不同于Pod模板上的第二容器时,确定Pod2需要更新,此时该kubelet1按照该Pod模板在Pod2上创建第二容器并删除第一容器,以使Pod2上部署的目标应用对应的容器与Pod 模板上部署的目标应用对应的容器相同。同样,kubelet3将节点3上部署的Pod5与etcd中存储的目标应用的Pod模板进行比对,并在确定Pod5上的第一容器不同于Pod模板上的第二容器时,确定Pod5需要更新,此时该kubelet3按照该Pod模板在Pod5上创建第二容器并删除第一容器,以使Pod5上部署的目标应用对应的容器与Pod模板上部署的目标应用对应的容器相同。如此实现了集群中目标应用的更新。Based on the above assumptions, when the Pod template of the target application stored in etcd is updated, kubelet1 compares the Pod1 deployed on node 1 with the Pod template of the target application stored in etcd, and determines the first container on Pod1 When it is different from the second container on the Pod template, it is determined that Pod1 needs to be updated. At this time, the kubelet1 creates a second container on Pod1 according to the Pod template and deletes the first container, so that the target application deployed on Pod1 corresponds to the container and Pod The target application deployed on the template corresponds to the same container. Similarly, kubelet1 compares the Pod2 deployed on node 1 with the Pod template of the target application stored in etcd, and when it determines that the first container on Pod2 is different from the second container on the Pod template, it determines that Pod2 needs to be updated. At this time, the kubelet1 creates a second container on Pod2 according to the Pod template and deletes the first container, so that the container corresponding to the target application deployed on Pod2 is the same as the container corresponding to the target application deployed on the Pod template. Similarly, kubelet3 compares the Pod5 deployed on node 3 with the Pod template of the target application stored in etcd, and when it determines that the first container on Pod5 is different from the second container on the Pod template, it determines that Pod5 needs to be updated. At this time, the kubelet3 creates a second container on Pod5 according to the Pod template and deletes the first container, so that the container corresponding to the target application deployed on Pod5 is the same as the container corresponding to the target application deployed on the Pod template. In this way, the target application in the cluster is updated.
另外,在k8s中为了避免Pod空间资源不足,可以在第一Pod上先删除第一容器再创建第二容器,以使第二容器的创建过程中能够使用通过删除第一容器所释放的Pod空间资源,如此有效地避免了Pod空间资源不足的发生。In addition, in order to avoid insufficient Pod space resources in k8s, you can delete the first container on the first Pod and then create the second container, so that the Pod space released by deleting the first container can be used during the creation of the second container. Resources, so effectively avoid the occurrence of insufficient Pod space resources.
另外,在k8s中可以按照处于容器更新状态的Pod个数保持不变的模式对所有第一Pod上的容器进行更新,而且处于容器更新状态的Pod个数可以根据MaxUnavailable字段确定,例如,将MaxUnavailable字段的值确定为处于容器更新状态的Pod个数。其中,MaxUnavailable字段的值可以预先设定,也可以由用户通过GUI指定。In addition, in k8s, all containers on the first Pod can be updated according to the mode that the number of Pods in the container update state remains unchanged, and the number of Pods in the container update state can be determined according to the MaxUnavailable field, for example, set MaxUnavailable The value of the field is determined as the number of Pods in the container update state. Among them, the value of the MaxUnavailable field can be preset or specified by the user through the GUI.
另外,每个节点上的docker用于运行Pod上部署的容器。例如,当节点1上部署有Pod1和docker1,且Pod1上部署有第一容器时,docker1在Pod1上运行第一容器,以使旧的目标应用能够在集群中运行。In addition, the docker on each node is used to run the containers deployed on the Pod. For example, when Pod1 and docker1 are deployed on node 1, and the first container is deployed on Pod1, docker1 runs the first container on Pod1 so that the old target application can run in the cluster.
基于上述S501至S505的相关内容可知,在k8s中,可以在原有Pod上直接删除旧的目标应用对应的容器并创建更新后的目标应用对应的容器,以使目标应用对应的Pod在目标应用的更新过程中始终保持不变,从而使得目标应用对应的Pod基本信息始终保持不变,如此能够有效地避免因集群上的应用易因Pod基本信息的变化而发生异常。Based on the above related content of S501 to S505, it can be seen that in k8s, the container corresponding to the old target application can be directly deleted on the original Pod and the container corresponding to the updated target application can be created, so that the Pod corresponding to the target application is in the target application’s The update process is always the same, so that the basic Pod information corresponding to the target application always remains the same, which can effectively avoid abnormalities caused by changes in the basic information of the Pod due to changes in the basic information of the applications on the cluster.
上文结合图1至图5,详细描述了本申请实施例提供的应用更新方法,下面结合附图对本申请实施例提供的应用更新装置以及相应的设备进行介绍。The application update method provided by the embodiment of the present application is described in detail above with reference to FIGS. 1 to 5, and the application update apparatus provided by the embodiment of the present application and the corresponding equipment are introduced below with reference to the accompanying drawings.
如图3所示,本申请实施例提供的应用更新装置301包括:As shown in FIG. 3, the application update apparatus 301 provided by the embodiment of the present application includes:
运行模块3011,用于在第一容器部署单元(Pod)上运行旧的目标应用的第一容器;The running module 3011 is used to run the first container of the old target application on the first container deployment unit (Pod);
通信模块3013,用于接收应用更新请求;The communication module 3013 is used to receive application update requests;
更新模块3012,用于在第一Pod上创建用于运行更新后的目标应用的第二容器,以替代旧的目标应用。The update module 3012 is used to create a second container for running the updated target application on the first Pod to replace the old target application.
其中,运行模块3011的具体实现可以参见图4所示实施例中S401相关内容描述。通信模块3013的具体实现可以参见图4所示实施例中S402相关内容描述。更新模块3012的具体实现可以参见图4所示实施例中S403相关内容描述。For the specific implementation of the running module 3011, refer to the description of related content in S401 in the embodiment shown in FIG. 4. For the specific implementation of the communication module 3013, refer to the description of related content in S402 in the embodiment shown in FIG. 4. For the specific implementation of the update module 3012, refer to the description of S403 in the embodiment shown in FIG. 4.
在一些可能的实现方式中,更新模块3012还用于:In some possible implementations, the update module 3012 is also used to:
获取Pod模板,Pod模板指定第二容器。Obtain the Pod template, and the Pod template specifies the second container.
在一些可能的实现方式中,应用更新装置301还包括:In some possible implementation manners, the application update apparatus 301 further includes:
选择模块,用于从多个Pod中选择与Pod模板匹配的Pod,选出的Pod为第一Pod。The selection module is used to select a Pod matching the Pod template from multiple Pods, and the selected Pod is the first Pod.
在一些可能的实现方式中,更新模块3012还用于:In some possible implementations, the update module 3012 is also used to:
在第一Pod上删除第一容器。Delete the first container on the first Pod.
在一些可能的实现方式中,应用更新请求携带有更新后的目标应用的应用参数,应用参数包括应用版本信息和/或应用配置信息。In some possible implementation manners, the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
在一些可能的实现方式中,通信模块3013还用于:In some possible implementations, the communication module 3013 is also used to:
通过图形用户界面(GUI)接收用户指定的应用更新类型,具有应用更新类型的应用为待更新的目标应用。The application update type specified by the user is received through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
本申请实施例的应用更新装置301可对应于执行本申请实施例中描述的应用更新方法,并且应用更新装置301的各个模块/单元的上述和其它操作和/或功能分别为了实现图4、图5所示实施例中的各个方法的相应流程,为了简洁,在此不再赘述。The application update apparatus 301 of the embodiment of the present application may correspond to the implementation of the application update method described in the embodiment of the present application, and the above and other operations and/or functions of the modules/units of the application update apparatus 301 are respectively intended to implement FIG. 4 and FIG. For the sake of brevity, the corresponding procedures of the methods in the embodiment shown in 5 will not be repeated here.
本申请实施例还提供了一种计算机。该计算机可以是服务器或者云服务器,具体用于实现如图3所示实施例中应用更新装置301的功能。The embodiment of the present application also provides a computer. The computer may be a server or a cloud server, and is specifically used to implement the functions of the application update apparatus 301 in the embodiment shown in FIG. 3.
图6提供了一种计算机的结构示意图,如图6所示,计算机600包括总线601、处理器602、通信接口603和存储器604。处理器602、存储器604和通信接口603之间通过总线601通信。总线601可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口603用于与外部通信。例如,接收基于图遍历语言的第一查询请求,接收基于图遍历语言的第二查询请求等等。FIG. 6 provides a schematic structural diagram of a computer. As shown in FIG. 6, the computer 600 includes a bus 601, a processor 602, a communication interface 603 and a memory 604. The processor 602, the memory 604, and the communication interface 603 communicate through a bus 601. The bus 601 may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus. The communication interface 603 is used to communicate with the outside. For example, receiving a first query request based on the graph traversal language, receiving a second query request based on the graph traversal language, and so on.
其中,处理器602可以为中央处理器(central processing unit,CPU)。存储器604可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器604还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,HDD或SSD。The processor 602 may be a central processing unit (CPU). The memory 604 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM). The memory 604 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), flash memory, HDD or SSD.
存储器604中存储有可执行代码,处理器602执行该可执行代码以执行前述应用更新方法。The memory 604 stores executable code, and the processor 602 executes the executable code to execute the aforementioned application update method.
具体地,在实现图3所示实施例的情况下,且图3实施例中所描述的应用更新装置301的各模块为通过软件实现的情况下,执行图3中的运行模块3011和更新模块3012功能所需的软件或程序代码存储在存储器604中。通信模块3013功能通过通信接口603实现。通信接口603接收应用更新请求,将其通过总线601传输至处理器602,处理器602执行存储器604中存储的各模块对应的程序代码,如运行模块3011和更新模块3012对应的程序代码,从而实现在第一容器部署单元(Pod)上运行旧的目标应用的第一容器,以及在第一Pod上创建用于运行更新后的目标应用的第二容器,以替代旧的目标应用。当然,处理器602还可以执行选择模块对应的程序代码,从多个Pod中选择与与Pod模板匹配的Pod,选出的Pod为第一Pod,如此,应用更新装置301可以对第一Pod上目标应用对应的容器进行更新。Specifically, in the case where the embodiment shown in FIG. 3 is implemented, and the modules of the application update apparatus 301 described in the embodiment in FIG. 3 are implemented by software, the running module 3011 and the update module in FIG. 3 are executed. The software or program code required for the function of 3012 is stored in the memory 604. The function of the communication module 3013 is implemented through the communication interface 603. The communication interface 603 receives the application update request and transmits it to the processor 602 via the bus 601. The processor 602 executes the program code corresponding to each module stored in the memory 604, such as the program code corresponding to the running module 3011 and the update module 3012, so as to realize The first container of the old target application is run on the first container deployment unit (Pod), and the second container for running the updated target application is created on the first Pod to replace the old target application. Of course, the processor 602 can also execute the program code corresponding to the selection module, select a Pod matching the Pod template from a plurality of Pods, and the selected Pod is the first Pod. In this way, the application update device 301 can perform an update on the first Pod. The container corresponding to the target application is updated.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括指令,所述指令指示计算机执行上述应用于应用更新装置301的应用更新方法。An embodiment of the present application also provides a computer-readable storage medium, which includes instructions that instruct a computer to execute the above-mentioned application update method applied to the application update apparatus 301.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质包括指令,所述指令指示计算机执行上述应用于应用更新装置301的应用更新方法。An embodiment of the present application also provides a computer-readable storage medium, which includes instructions that instruct a computer to execute the above-mentioned application update method applied to the application update apparatus 301.
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品被计算机执行时,所述计算机执行前述应用更新方法的任一方法。该计算机程序产品可以为一个软件安装包,在需要使用前述应用更新方法的任一方法的情况下,可以下载该计算机程序产品并在计算机上执行该计算机程序产品。The embodiment of the present application also provides a computer program product. When the computer program product is executed by a computer, the computer executes any one of the aforementioned application update methods. The computer program product may be a software installation package. In the case where any method of the aforementioned application update method needs to be used, the computer program product can be downloaded and executed on the computer.

Claims (14)

  1. 一种应用更新方法,其特征在于,所述方法包括:An application update method, characterized in that the method includes:
    在第一容器部署单元(Pod)上运行旧的目标应用的第一容器;Run the first container of the old target application on the first container deployment unit (Pod);
    接收应用更新请求;Receive application update request;
    在所述第一Pod上创建用于运行更新后的目标应用的第二容器,以替代所述旧的目标应用。A second container for running the updated target application is created on the first Pod to replace the old target application.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    获取Pod模板,所述Pod模板指定所述第二容器。Obtain a Pod template, where the Pod template specifies the second container.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    从多个Pod中选择与所述Pod模板匹配的Pod,选出的Pod为所述第一Pod。A Pod matching the Pod template is selected from a plurality of Pods, and the selected Pod is the first Pod.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, wherein the method further comprises:
    在所述第一Pod上删除所述第一容器。Delete the first container on the first Pod.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述应用更新请求携带有更新后的目标应用的应用参数,所述应用参数包括应用版本信息和/或应用配置信息。The method according to any one of claims 1 to 4, wherein the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    通过图形用户界面(GUI)接收用户指定的应用更新类型,具有所述应用更新类型的应用为待更新的所述目标应用。The application update type specified by the user is received through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
  7. 一种应用更新装置,其特征在于,所述装置包括:An application update device, characterized in that the device includes:
    运行模块,用于在第一容器部署单元(Pod)上运行旧的目标应用的第一容器;The running module is used to run the first container of the old target application on the first container deployment unit (Pod);
    通信模块,用于接收应用更新请求;The communication module is used to receive application update requests;
    更新模块,用于在所述第一Pod上创建用于运行更新后的目标应用的第二容器,以替代所述旧的目标应用。The update module is used to create a second container for running the updated target application on the first Pod to replace the old target application.
  8. 根据权利要求7所述的装置,其特征在于,所述更新模块还用于:The device according to claim 7, wherein the update module is further used for:
    获取Pod模板,所述Pod模板指定所述第二容器。Obtain a Pod template, where the Pod template specifies the second container.
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, wherein the device further comprises:
    选择模块,用于从多个Pod中选择与所述Pod模板匹配的Pod,选出的Pod为所述第一Pod。The selection module is configured to select a Pod matching the Pod template from a plurality of Pods, and the selected Pod is the first Pod.
  10. 根据权利要求7-9任一项所述的装置,其特征在于,所述更新模块还用于:The device according to any one of claims 7-9, wherein the update module is further configured to:
    在所述第一Pod上删除所述第一容器。Delete the first container on the first Pod.
  11. 根据权利要求7-10任一项所述的装置,其特征在于,所述应用更新请求携带有更新后的目标应用的应用参数,所述应用参数包括应用版本信息和/或应用配置信息。The device according to any one of claims 7-10, wherein the application update request carries updated application parameters of the target application, and the application parameters include application version information and/or application configuration information.
  12. 根据权利要求7-11任一项所述的装置,其特征在于,所述通信模块还用于:The device according to any one of claims 7-11, wherein the communication module is further configured to:
    通过图形用户界面(GUI)接收用户指定的应用更新类型,具有所述应用更新类型的应用为待更新的所述目标应用。The application update type specified by the user is received through a graphical user interface (GUI), and the application with the application update type is the target application to be updated.
  13. 一种计算机,其特征在于,所述计算机包括处理器和存储器;A computer, characterized in that the computer includes a processor and a memory;
    所述处理器用于执行所述存储器中存储的指令,以使得所述计算机执行如权利要求1至6中任一项所述的应用更新方法。The processor is configured to execute instructions stored in the memory, so that the computer executes the application update method according to any one of claims 1 to 6.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括指令,所述指令指示计算机执行如权利要求1至6中任一项所述的应用更新方法。A computer-readable storage medium, wherein the computer-readable storage medium includes instructions that instruct a computer to execute the application update method according to any one of claims 1 to 6.
PCT/CN2021/075692 2020-05-27 2021-02-06 Application update method, apparatus and device and medium WO2021238301A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010461558.5 2020-05-27
CN202010461558.5A CN113741923A (en) 2020-05-27 2020-05-27 Application updating method, device, equipment and medium

Publications (1)

Publication Number Publication Date
WO2021238301A1 true WO2021238301A1 (en) 2021-12-02

Family

ID=78723805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/075692 WO2021238301A1 (en) 2020-05-27 2021-02-06 Application update method, apparatus and device and medium

Country Status (2)

Country Link
CN (1) CN113741923A (en)
WO (1) WO2021238301A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448895A (en) * 2022-04-11 2022-05-06 苏州浪潮智能科技有限公司 Application access method, device, equipment and medium
CN115150292A (en) * 2022-05-17 2022-10-04 深圳萨摩耶数字科技有限公司 Monitoring method and device for k8s cluster, electronic equipment and storage medium
WO2024001403A1 (en) * 2022-06-27 2024-01-04 华为云计算技术有限公司 Application update method, apparatus and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572845A (en) * 2018-03-15 2018-09-25 华为技术有限公司 The upgrade method and related system of distributed micro services cluster
CN109831500A (en) * 2019-01-30 2019-05-31 无锡华云数据技术服务有限公司 The synchronous method of configuration file and Pod in Kubernetes cluster
CN110427249A (en) * 2019-07-26 2019-11-08 重庆紫光华山智安科技有限公司 Method for allocating tasks, pod initial method and relevant apparatus
CN110569109A (en) * 2019-09-11 2019-12-13 广州虎牙科技有限公司 container updating method, control node and edge node

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108572845A (en) * 2018-03-15 2018-09-25 华为技术有限公司 The upgrade method and related system of distributed micro services cluster
CN109831500A (en) * 2019-01-30 2019-05-31 无锡华云数据技术服务有限公司 The synchronous method of configuration file and Pod in Kubernetes cluster
CN110427249A (en) * 2019-07-26 2019-11-08 重庆紫光华山智安科技有限公司 Method for allocating tasks, pod initial method and relevant apparatus
CN110569109A (en) * 2019-09-11 2019-12-13 广州虎牙科技有限公司 container updating method, control node and edge node

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114448895A (en) * 2022-04-11 2022-05-06 苏州浪潮智能科技有限公司 Application access method, device, equipment and medium
CN115150292A (en) * 2022-05-17 2022-10-04 深圳萨摩耶数字科技有限公司 Monitoring method and device for k8s cluster, electronic equipment and storage medium
WO2024001403A1 (en) * 2022-06-27 2024-01-04 华为云计算技术有限公司 Application update method, apparatus and system

Also Published As

Publication number Publication date
CN113741923A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
WO2021238301A1 (en) Application update method, apparatus and device and medium
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN111258609B (en) Upgrading method and device of Kubernetes cluster, electronic equipment and medium
CN109992354B (en) Container processing method, device, main body server, system and storage medium
JP2017084334A (en) Method and device for extracting virtual machine image file
CN105677250B (en) The update method and updating device of object data in object storage system
WO2019028992A1 (en) Multi-module version dependency relationship construction method, device, server and storage medium
CN107992537B (en) Service attribute transmission method, device, computer equipment and storage medium
CN109344006A (en) A kind of mirror image management method and mirror image management module
CN109857723B (en) Dynamic data migration method based on expandable database cluster and related equipment
CN110520844A (en) Cloud management platform, virtual machine management method and its system
CN111800468A (en) Cloud-based multi-cluster management method, device, medium and electronic equipment
CN114265680A (en) Mass data processing method and device, electronic equipment and storage medium
CN112905306A (en) Multi-cluster container management method and device, electronic equipment and storage medium
CN108536541B (en) Process engine object processing method and device
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN107547593B (en) Method, device and distributed system for realizing log synchronization
CN110045983B (en) Version library management method and device and server
CN109614383B (en) Data copying method and device, electronic equipment and storage medium
CN111399866B (en) Updating method and device of VNF (virtual network function) package
CN109144638B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
CN114615263A (en) Cluster online migration method, device, equipment and storage medium
CN109165067B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
CN109189498B (en) Android horizontal and vertical screen data synchronization method and device, terminal and readable medium
CN108376104B (en) Node scheduling method and device and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21812070

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21812070

Country of ref document: EP

Kind code of ref document: A1