Container orchestration system upgrade method and apparatus
By using step-by-step upgrade and associated manifest technology, the problem of resource versions not being automatically converted during cross-version upgrades of container orchestration systems such as Kubernetes has been solved, enabling efficient and automated upgrades to use new features in a timely manner and ensuring the security of user business.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2026-03-19
AI Technical Summary
When upgrading container orchestration systems such as Kubernetes across versions, if it spans three versions, the resource versions before and after the upgrade cannot be automatically converted, making the upgrade difficult and preventing the timely use of new features or functions.
A step-by-step upgrade approach is adopted, which automatically converts resource versions step by step through the intermediate container orchestration system version, ensuring that the resource versions before and after each upgrade have overlap. The associated list and prompt module are used to assist in address conversion, thereby automating cross-version upgrades.
It improves the efficiency of cross-version upgrades of container orchestration systems, saves manual operations, enables timely use of new features or functions of resources, extends the usage time of resource addresses recorded by containers, and ensures the security of user business.
Smart Images

Figure CN2025104506_19032026_PF_FP_ABST
Abstract
Description
Container orchestration system upgrading method and device
[0001] The present application claims priority to the Chinese patent application No. 202411295415.6, filed on September 14, 2024, and entitled "A container orchestration system upgrading method and device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the field of cloud technology, and in particular to a container orchestration system upgrading method and device. BACKGROUND
[0003] Kubernetes is an open-source container orchestration system, which is widely used in the field of cloud technology. Kubernetes can implement the orchestration and management of containerized applications on multiple hosts. Among them, kubernetes can issue containers and provide resources required by the containers.
[0004] The Kubernetes community is highly active, and almost every three months a new version of Kubernetes is released. The new version of Kubernetes introduces a new version of resources. Generally, the resource versions of three adjacent versions of Kubernetes can be converted to each other. When cross-version upgrading is performed on Kubernetes, if the versions crossed are more than three versions of Kubernetes, the resource version conversion between the upgraded version of Kubernetes and the pre-upgraded version of Kubernetes cannot be performed, thereby causing the containers issued before the upgrading to be difficult to utilize the resource version of the upgraded version of Kubernetes. SUMMARY
[0005] The present application provides a container orchestration system upgrading method and device, which can guarantee the automatic conversion of resource versions when the container orchestration system is cross-version upgraded, and improve the upgrading efficiency when the container orchestration system is cross-version upgraded.
[0006] In a first aspect, a container orchestration system upgrading method is provided. The method is used to upgrade a container orchestration system of a computing platform from a current container orchestration system version to a target container orchestration system version. The current container orchestration system version is used to provide services for at least one container in the computing platform by using a first version of resources. The method comprises: confirming that a version of resources available to the target container orchestration system version does not include the first version; upgrading the container orchestration system of the computing platform from the current container orchestration system version to a first intermediate container orchestration system version, wherein a version of resources available to the first intermediate container orchestration system version includes the first version and a second version; and in a case where the first intermediate container orchestration system version is used to switch the version of resources used to provide services for the at least one container from the first version to the second version, and the version of resources available to the target container orchestration system version includes the second version, upgrading the container orchestration system of the computing platform from the first intermediate container orchestration system version to the target container orchestration system version.
[0007] The at least one container can be a container issued by the container orchestration system of the computing platform when the container orchestration system is in the current container orchestration system version or a version before the current container orchestration system version. The current container orchestration system is a version of the container orchestration system of the computing platform before the upgrade, and the target container orchestration system version is a version to which the upgrade is performed.
[0008] The container orchestration system can be kubernetes. The resources include any one or a combination of batch resources, service discovery resources, event resources, elastic scaling resources, policy resources, and flow control resources.
[0009] The version of resources available to the current container orchestration system version and the version of resources available to the target container orchestration system version have no intersection, so that the automatic conversion of the version of resources between the current container orchestration system version and the target container orchestration system version cannot be performed for the issued containers. The method performs the upgrade step by step. The versions of resources available to the container orchestration system versions before and after each step have an intersection, so that the automatic conversion of the version of resources between the container orchestration system versions before and after the upgrade can be performed for the issued containers. In this way, the method can ensure the automatic conversion of the version of resources under the cross-version upgrade of the container orchestration system, improve the efficiency of the upgrade of the container orchestration system, save manual operations, and enable the new features or new functions of the resources to be used in time.
[0010] In a possible implementation, the target container orchestration system version is used to provide services for the at least one container by using the second version.
[0011] In the implementation, the version of the resource available to the target container orchestration system can only include the second version, or the second version is the latest version of the version of the resource available to the target container orchestration system. In this case, after the container orchestration system of the computing platform is upgraded to the target container orchestration system version, the second version is used to provide services for the container, and the new features or new functions of the resource can be used in time.
[0012] In a possible implementation, the version of the resource available to the target container orchestration system version further includes a third version of the resource, and the third version is a version after the second version; and the target container orchestration system version is configured to switch the version of the resource used to provide services for the at least one container from the second version to the third version.
[0013] The version of the resource available to the target container orchestration system version and the version of the resource available to the first intermediate container orchestration system version both include the second version, that is, there is an intersection. When or after the first intermediate container orchestration system version is upgraded to the target container orchestration system version, the target container orchestration system version can automatically complete the conversion from the second version to the third version for the issued container, and use the third version to provide services for the issued container.
[0014] In a possible implementation, when the target container orchestration system version is configured to use the second version to provide services for the at least one container, the method further includes: establishing an association list of the address of the first version and the address of the second version; and in a case where the resource address in the resource access request issued by the at least one container is the address of the first version, the association list is used to forward, by the target container orchestration system version, the resource access request to the second version, so that the second version responds to the resource access request and provides services for the at least one container.
[0015] In the implementation, after the version of the resource used to provide services is changed, the association list is used to request services from the changed version by the container without changing the resource address of the container record, thereby prolonging the use time of the resource address of the container record.
[0016] In a possible implementation, the at least one container belongs to a user, and when the target container orchestration system version is configured to use the second version to provide services for the at least one container, the method further includes: issuing a prompt information, and the prompt information is used to prompt the user to modify the address used by the at least one container to access the resource from the address of the first version to the address of the second version.
[0017] The container belongs to a user, in order to guarantee the security of the user's business, an operator other than the user cannot modify the container internal data such as the resource address recorded by the container. In the implementation mode, a prompt information can be sent to the user, the prompt information is used to prompt the user to modify the resource address recorded by the container to the address of the available resource version of the target container orchestration system, in this way, the container can use the address of the available resource version of the target container orchestration system to request the resource service.
[0018] In a possible implementation mode, the method further comprises: in a case where the version of the resource to be provided by the first intermediate container orchestration system version for the at least one container is switched from the first version to the second version, and the version of the available resource of the target container orchestration system version does not include the second version, upgrading the container orchestration system version of the computing platform from the first intermediate container orchestration system version to a second intermediate container orchestration system version; wherein the version of the available resource of the second intermediate container orchestration system version includes the second version and a third version; in a case where the version of the resource to be provided by the second intermediate container orchestration system version for the at least one container is switched from the second version to the third version, and the version of the available resource of the target container orchestration system version includes the third version, upgrading the container orchestration system of the computing platform from the second intermediate container orchestration system version to the target container orchestration system version.
[0019] In the implementation mode, in a case where there is no intersection between the version of the available resource of the first intermediate container orchestration system and the version of the available resource of the target container orchestration system, the container orchestration system of the computing platform can be first upgraded from the first intermediate container orchestration system version to the second intermediate container orchestration system version, so as to complete the conversion of the resource from the second version to the third version for the issued container. Then, the container orchestration system of the computing platform is upgraded from the second intermediate container orchestration system version to the target container orchestration system version. In this way, the automatic conversion of the resource version is realized when the container orchestration system is cross-version upgraded.
[0020] In a second aspect, a container orchestration system upgrading apparatus is provided. The apparatus is configured to upgrade a container orchestration system of a computing platform from a current container orchestration system version to a target container orchestration system version. The current container orchestration system version is configured to provide services for at least one container in the computing platform using a first version of resources. The apparatus comprises a confirmation module configured to confirm that a version of resources available to the target container orchestration system version does not include the first version. The apparatus comprises an upgrading module configured to upgrade the container orchestration system of the computing platform from the current container orchestration system version to a first intermediate container orchestration system version. The first intermediate container orchestration system version is configured to use a version of resources that includes the first version and a second version. The upgrading module is further configured to upgrade the container orchestration system of the computing platform from the first intermediate container orchestration system version to the target container orchestration system version, when the first intermediate container orchestration system version switches the version of resources used to provide services for the at least one container from the first version to the second version, and the version of resources available to the target container orchestration system version includes the second version.
[0021] In a possible implementation, the target container orchestration system version is configured to use the second version to provide services for the at least one container.
[0022] In a possible implementation, the version of resources available to the target container orchestration system version further includes a third version of resources, and the third version is a version after the second version. The target container orchestration system version is configured to switch the version of resources used to provide services for the at least one container from the second version to the third version.
[0023] In a possible implementation, when the target container orchestration system version is configured to use the second version to provide services for the at least one container, the upgrading module is further configured to establish an association list between an address of the first version and an address of the second version. When an address of a resource in a resource access request issued by the at least one container is the address of the first version, the association list is configured to cause the target container orchestration system version to forward the resource access request to the second version, so that the second version provides services for the at least one container in response to the resource access request.
[0024] In a possible implementation, the at least one container belongs to a user. When the target container orchestration system version is configured to use the second version to provide services for the at least one container, the upgrading module is further configured to issue a prompt information. The prompt information is configured to prompt the user to modify an address of a resource used by the at least one container from the address of the first version to the address of the second version.
[0025] In a possible implementation, the upgrading module is further configured to: in a case where the first intermediate container orchestration system version switches the version of the resource for serving the at least one container from the first version to a second version, and the version of the resource available to the target container orchestration system version does not include the second version, upgrade the container orchestration system version of the computing platform from the first intermediate container orchestration system version to a second intermediate container orchestration system version; the second intermediate container orchestration system version includes the second version and a third version; in a case where the second intermediate container orchestration system version switches the version of the resource for serving the at least one container from the second version to the third version, and the version of the resource available to the target container orchestration system version includes the third version, upgrade the container orchestration system of the computing platform from the second intermediate container orchestration system version to the target container orchestration system version.
[0026] In a possible implementation, the container orchestration system of the computing platform is kubernetes.
[0027] In a possible implementation, the resource includes any one or a combination of a batch processing resource, a service discovery resource, an event resource, an elastic scaling resource, a policy resource, and a flow control resource.
[0028] In a third aspect, a computing device cluster is provided, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method provided in the first aspect.
[0029] In a fourth aspect, a computer-readable storage medium is provided, including computer program instructions, when the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method provided in the first aspect.
[0030] In a fifth aspect, a computer program product including instructions is provided, when the instructions are executed by a computing device cluster, the computing device cluster executes the method provided in the first aspect.
[0031] The beneficial effects of the second aspect to the fifth aspect can be referred to the description of the beneficial effects of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0032] FIG. 1 is a schematic diagram of versions of resources available to kubernetes versions;
[0033] FIG. 2 is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0034] FIG. 3 is a flowchart of a container orchestration system upgrading method provided by an embodiment of the present application;
[0035] FIG. 4 is a schematic diagram of a container orchestration system upgrading method according to an embodiment of the present application;
[0036] FIG. 5 is a schematic diagram of a container orchestration system upgrading method according to an embodiment of the present application;
[0037] FIG. 6 is a schematic diagram of a container orchestration system upgrading method according to an embodiment of the present application;
[0038] FIG. 7 is a schematic diagram of a container orchestration system upgrading apparatus according to an embodiment of the present application;
[0039] FIG. 8 is a schematic diagram of a computing device according to an embodiment of the present application;
[0040] FIG. 9 is a schematic diagram of a computing device cluster according to an embodiment of the present application;
[0041] FIG. 10 is a schematic diagram of a computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] The schemes provided by the embodiments of the present application will be described below with reference to the accompanying drawings. In the embodiments of the present application, "multiple" refers to two or more, and "multiple kinds" refers to two or more kinds. "First", "second", and the like are only used to distinguish similar objects, and do not necessarily indicate a specific order or number of objects.
[0043] To facilitate understanding of the schemes provided by the embodiments of the present application, the technical terms that may be involved in the embodiments of the present application will be introduced first.
[0044] Cloud technology: refers to a kind of hosting service that unifies hardware, software, network, etc. in a wide area network or a local area network to realize data calculation, storage, processing and sharing. Usually, in cloud technology, a user's application instance can be run through a container to provide services for the user.
[0045] User: a tenant who rents services provided by cloud technology. The user can register an account on a management platform operated by a service provider through a browser or other client. The computing service provider will record different user accounts to realize the isolation of services for different users. The user has complete access to the services he owns.
[0046] A container is a lightweight virtualization program running environment that can isolate processes. Containers can be applied to a microservice architecture. In the microservice architecture, microservices are run by containers. Containers in which multiple microservices with high dependency between them can form a container group. In a kubernetes cluster, a container group can be encapsulated into a pod.
[0047] A container orchestration system, also known as a container orchestration engine, is a tool for automating the deployment, management, and scaling of containerized applications. The container orchestration system can allocate multiple containers in a computing cluster and manage the multiple containers to ensure that the multiple containers can run normally in the computing cluster. Common container orchestration systems include kubernetes, application container engine (docker), etc.
[0048] Resources: Resources are used by the container orchestration system to provide services for the running of containers. There can be various resources, such as batch resources, service discovery resources, events resources, autoscaling resources, policy resources, flow control resources, etc. Different resources can provide different services for containers, for example, batch resources provide batch services for containers, autoscaling resources provide autoscaling for containers, etc. Different versions of the same resource can have differences in characteristics or functions, etc. Generally speaking, compared with the previous version of the resource, the next version of the resource has new characteristics or functions. In addition, containers also belong to the resources of the container orchestration system, which are resources for running application instances, etc. allocated by the container orchestration system.
[0049] Kubernetes: Kubernetes, also known as k8s, is an open source container orchestration system. Kubernetes supports automated deployment, large-scale scalability, and application container management. Kubernetes can deploy multiple containers in multiple hosts and run an application instance in each container. Kubernetes includes components such as kube-apiserver, kube-controller, kube-sheduler, kubelet, and kube-proxy. Among them, kube-apiserver, kube-controller, and kube-sheduler run in control nodes, and kubelet and kube-proxy are deployed on computing nodes.
[0050] Webhook: an extension mechanism of Kubernetes, which passes the request obtained by Kubernetes to an external web server for processing through an HTTP callback, and then returns it to Kubernetes for processing.
[0051] As described above, there can be multiple versions of the same resource, and the versions of the resources available to different container orchestration systems for the same resource can have no intersection. Taking Kubernetes as an example, as shown in FIG. 1, it can be set that the Kubernetes community has released kubernetes version 1.19, kubernetes version 1.21, kubernetes version 1.22, kubernetes version 1.23, kubernetes version 1.25, kubernetes version 1.26, kubernetes version 1.27, kubernetes version 1.29, and the like in sequence. In addition, the batch resource has version v1beta1 and version v1, the service discovery resource has version v1beta1 and version v1, the event resource has version v1beta1 and version v1, the elastic scaling resource has version v2beta1, v2beta2, and version v2, the policy resource has version v1beta1 and version v1, and the flow control resource has version v1beta1, v1beta2, v1beta3, and version v1. As shown in FIG. 1, the available resource versions of the three adjacent kubernetes versions have intersections, and the available resource versions of the two kubernetes versions across 3 versions do not necessarily have intersections. For example, kubernetes version 1.19 and kubernetes version 1.23 span 3 kubernetes versions, kubernetes version 1.19 can utilize batch resource version v1beta1, and kubernetes version 1.23 can utilize batch resource version v1, and they have no intersection.
[0052] When the container orchestration system is upgraded, if there is no intersection between the versions of the resources available to the container orchestration system version before the upgrade and the versions of the resources available to the container orchestration system version after the upgrade, the resource versions used to provide services for containers before the upgrade and the resource versions used to provide services for containers after the upgrade cannot be automatically converted, resulting in no resource version available to provide services for the containers issued before the upgrade after the upgrade. Among them, the issued container refers to the container issued before the upgrade of the orchestration system version.
[0053] In order to solve the above problems, the related art adopts the following two schemes.
[0054] Scheme one: the container orchestration system does not use the resource version that belongs to beta version, so as to avoid the intersection between the available resource versions of the container orchestration system before and after the upgrade. Since the new features or new functions of the resource are first introduced into the beta version, the available resource versions of the container orchestration system used in this scheme are all non-beta versions, so that this scheme cannot use the new features or new functions of the resource in time.
[0055] Scheme two: after the upgrade of the container orchestration system, manually find the resources that have not completed version conversion, and manually complete the version conversion of the resources. This scheme needs manual operation, which is high in cost and low in efficiency.
[0056] Therefore, the embodiments of the present application provide a container orchestration system upgrade method. The method can be used to upgrade the container orchestration system across versions. In the method, the feature that the available resource versions of the container orchestration system versions have intersections can automatically complete the resource version conversion, and the two-step or more than two-step step-by-step upgrade is adopted, the available resource versions of the container orchestration system versions before and after each step have intersections, so that the resource version conversion can be automatically completed. In this way, the method can realize the automatic conversion of the resource version under the container orchestration system across versions, can improve the upgrade efficiency of the container orchestration system in the case of using the new features or new functions of the resource in time, and does not need manual operation.
[0057] Next, the container orchestration system upgrade method provided by the embodiments of the present application is introduced.
[0058] FIG. 2 shows a system architecture that can implement the method. The system architecture includes an upgrade device 100, a container orchestration system version warehouse 200, and a computing platform 300.
[0059] The computing platform 300 is deployed with the container orchestration system and the containers distributed and managed by the container orchestration system. As shown in FIG. 3, the computing platform 300 includes at least one control node 310 and at least one computing node 320. The control node 310 and / or the computing node 320 are devices, apparatuses, etc. with data processing capability, for example, servers, virtual machines (VMs), etc.
[0060] The container orchestration system deployed in the computing platform 300 is specifically deployed in the control node 310 and the computing node 320. Among them, the control node 310 and the computing node 320 are respectively used to deploy different components of the container orchestration system. Taking kubernetes as an example, the control node 310 is used to deploy components such as kube-apiserver, kube-controller, kube-sheduler, and the computing node 320 is used to deploy components such as kubelet and kube-proxy. The computing node 320 is also used to deploy containers, such as at least one container 321. The container deployed in the computing node 320 can be a container issued and managed by the container orchestration system.
[0061] The version of the container orchestration system deployed in the computing platform 300 can be changed by upgrading. Different versions of the container orchestration system can use different versions of resources. Taking resource A as an example, resource A can have versions A1, A2, etc. For example, resource A can be any one or a combination of batch processing resources, service discovery resources, event resources, elastic scaling resources, policy resources, and flow control resources.
[0062] The container orchestration system version repository 200 is used to store the container orchestration system versions required for the upgrade of the container orchestration system. Among them, the container orchestration system version repository 200 specifically stores the installation package of the container orchestration system version. The container orchestration system version required for the upgrade of the container orchestration system includes the target container orchestration system version, the intermediate container orchestration system version required during the upgrade process. For convenience of analysis, in some embodiments, the container orchestration system version required for the upgrade of the container orchestration system can also include the current container orchestration system version. Among them, the current container orchestration system version refers to the container orchestration system version currently deployed in the computing platform 300, that is, the container orchestration system version deployed in the computing platform 300 before this upgrade. The target container orchestration system version refers to the target of this upgrade, that is, the container orchestration system version to which this upgrade is upgraded.
[0063] The upgrade device 100 can be any device, apparatus, cluster or platform with data processing capability. The upgrade device 100 upgrades the container orchestration system deployed in the control node 310 and the computing node 320. Among them, the upgrade device 100 can realize the upgrade of the container orchestration system in the control node 310 and the computing node 320 by executing the container orchestration system upgrade method provided in the embodiments of the present application.
[0064] In some embodiments, as shown in FIG. 2, the upgrade device 100 can include a control module 110, a conversion module 120, and a prompt module 130.
[0065] The control module 110 can identify whether there is an intersection between the available resource version of the current container orchestration system version and the available resource version of the target container orchestration system version. If there is no intersection between the available resource version of the current container orchestration system version and the available resource version of the target container orchestration system version, the control module 110 can obtain at least one intermediate container orchestration system version. When the at least one intermediate container orchestration system version is one intermediate container orchestration system version, the available resource version of the intermediate container orchestration system and the available resource version of the current container orchestration system have an intersection, and the available resource version of the intermediate container orchestration system and the available resource version of the target container orchestration system have an intersection. When the at least one intermediate container orchestration system version is a plurality of intermediate container orchestration system versions, the available resource version of the first intermediate container orchestration system in the plurality of intermediate container orchestration system versions and the available resource version of the current container orchestration system have an intersection, the available resource version of the last intermediate container orchestration system in the plurality of intermediate container orchestration system versions and the available resource version of the target container orchestration system have an intersection, and the available resource version of any two adjacent container orchestration system versions in the plurality of intermediate container orchestration system versions have an intersection.
[0066] The control module 110 can upgrade the container orchestration system of the computing platform 300 from the current container orchestration system version to the at least one intermediate container orchestration system version, and then to the target container orchestration system version.
[0067] A container triggers a resource to provide a related service for the container by sending a resource access request to the resource. The resource access request needs to carry a resource address, so that the resource access request can be forwarded to the resource. For the same resource, the addresses of different versions are different. For the container issued before the upgrade, the resource address recorded by the container is the address of the available resource version of the current container orchestration system. After the upgrade is completed, if the available resource version of the target container orchestration system is different from the available resource version of the current container orchestration system, the addresses of the resource versions are also different. The conversion module 120 can perform an address conversion operation, which is used to convert the address of the available resource version of the current container orchestration system in the resource access request to the address of the available resource version of the target container orchestration system, so that the resource access request can be forwarded to the available resource version of the target container orchestration system, so that the available resource version of the target container orchestration system provides a service for the container.
[0068] The container belongs to a user. In order to guarantee the security of the user's business, an operator (for example, an operation and maintenance or management personnel of the computing platform 300, an upgrading device 100, etc.) other than the user cannot modify the data inside the container, for example, the resource address recorded by the container. The prompting module 130 can send prompt information to the user, which is used to prompt the user to modify the resource address recorded by the container to the address of the available resource version of the target container orchestration system. In this way, the container can send a resource access request by using the address of the available resource version of the target container orchestration system, without the address conversion operation of the conversion module 120.
[0069] The above examples introduce a system architecture provided by an embodiment of the present application. Next, taking implementation in the system architecture as an example, the process of the container orchestration system upgrading method provided by an embodiment of the present application is introduced.
[0070] The method can be configured to upgrade the container orchestration system of the computing platform 300 from the container orchestration system version B1 to the container orchestration system version B2. The container orchestration system version B1 is the version to which the container orchestration system currently deployed by the computing platform 300 belongs, which can be referred to as the current container orchestration system version. The container orchestration system version B2 is the target version of the upgrade, which can be referred to as the target container orchestration system. The container orchestration system version B1 uses the version A1 of the resource A to provide the service C for at least one container (for example, the container 321) in the computing platform 300. The at least one container is a container issued by the container orchestration system of the computing platform 300 before the upgrade, and the at least one container can be a container issued by the container orchestration system version B1, for example. Next, taking the resource A and the at least one container as the description objects, the container orchestration system upgrading method provided by an embodiment of the present application is exemplarily introduced.
[0071] As shown in FIG. 3, the method includes the following steps.
[0072] First, in step 301, the upgrading device 100 confirms that the version of the available resource A of the container orchestration system version B2 does not include the version A1.
[0073] In some embodiments, if a version of resource A is a version available to the container orchestration system, the container orchestration system version has description information of the version of resource A. The description information is used to describe relevant information of the version of resource A, so that the container orchestration system can provide service C for the at least one container based on the description information of the version of resource A. For example, the container orchestration system can create an instance of the version based on the description information of the version, and the instance is used to provide service C for the at least one container. For example, the description information of the version of resource A further includes an address of the version of resource A, and the container orchestration system version can store the version of resource A based on the address. When the container orchestration system receives a resource access request issued by the container, if the address in the resource access request is consistent with the address in the description information, the container orchestration system can forward the resource access request to the version of resource A, so that the version can respond to the resource access request and provide service C for the container. The address in the resource access request is a resource address, which is an address of a resource requested to be accessed by the resource access request. For example, the address can be an application programming interface (API).
[0074] The version of resource A available to the container orchestration system version B2 does not include version A1, which indicates that the container orchestration system version B2 does not have description information of version A1, and the container orchestration system version B2 cannot provide service C for the at least one container based on version A1. Moreover, since the container orchestration system version B2 does not have description information of version A1, the container orchestration system version B2 does not know version A1, and thus cannot convert version A1 to a version of resource A available to the container orchestration system version B2 for the at least one container. For example, it can be set that the version of resource A available to the container orchestration system version B2 includes version A2. Since the container orchestration system version B2 does not have description information of version A1, the container orchestration system version B2 cannot identify an instance of version A1 used to provide service C for the at least one container, cannot use configuration information of the instance of version A1 used to provide service C for the at least one container to create an instance of version A2 used to provide service C for the at least one container, and thus cannot convert version A1 to version A2 for the at least one container. For example, since the container orchestration system version B2 does not have description information of version A1, the container orchestration system version B2 cannot identify a resource address in a resource access request (i.e., cannot identify which resource the address belongs to) when the container orchestration system version B2 receives the resource access request issued by the at least one container, and thus cannot process the resource access request, i.e., cannot convert version A1 to a version of resource A available to the container orchestration system version B2 for the at least one container.
[0075] In this embodiment, the upgrading apparatus 100 can detect whether the installation package of the container orchestration system version B2 includes the description information of the version A1. If not, it can be confirmed that the version of the resource A available to the container orchestration system version B2 does not include the version A1.
[0076] Then, in step 302, the upgrading apparatus 100 upgrades the container orchestration system of the computing platform 300 from the container orchestration system version B1 to the container orchestration system version B3, where the version of the resource A available to the container orchestration system version B3 includes the version A1 and the version A2. The version A2 is a version after the version A1, i.e., the version A2 is a version of the resource A updated relative to the version A1.
[0077] The container orchestration system version B3 is a version between the container orchestration system version B1 and the container orchestration system version B2, which can be referred to as an intermediate container orchestration system. The version of the resource A available to the container orchestration system version B3 includes the version A1, and the version of the resource A available to the container orchestration system version B1 also includes the version A1, and there is an intersection between the versions of the resource A available to them, so the intermediate container orchestration system version B3 can complete the conversion from the version A1 to the version A2 for the at least one container.
[0078] Specifically, the version of the resource A available to the container orchestration system version B3 includes the version A1, which indicates that the container orchestration system version B3 has the description information of the version A1. The container orchestration system version B3 can understand the version A1 based on the description information of the version A1, so it can perform the conversion from the version A1 to the version A2 for the at least one container. For example, the container orchestration system version B3 can identify the configuration information of the instance of the version A1 for providing the service C for the at least one container based on the description information of the version A1, and create an instance of the version A2 for providing the service C for the at least one container using the configuration information, so as to complete the conversion from the version A1 to the version A2 for the at least one container. For example, the container orchestration system version B3 has the description information of the version A1, and when the container orchestration system version B3 receives a resource access request issued by the at least one container, it can identify the address in the resource access request, and then identify the resource A to which the resource access request is directed, and process the resource access request, so as to complete the conversion from the version A1 to the version A2 for the at least one container.
[0079] In some embodiments, the container orchestration system of the computing platform 300 can be kuberenetes, and the container orchestration system version B1 can be set as kuberenetes1.19, and the container orchestration system version B2 can be set as kuberenetes1.25. There are 4 kuberenetes versions between kuberenetes1.19 and kuberenetes1.25, and there is no intersection between the versions of the resources A that can be utilized by kuberenetes1.19 and kuberenetes1.25, and the version conversion cannot be completed for the at least one container. For this case, referring to FIG. 4, the step 302 includes a step 3021, a step 3022, a step 3023, a step 3024 and a step 3025.
[0080] In the step 3021, kuberenetes1.25 and necessary intermediate kuberenetes versions are stored in the container orchestration system version repository 200. The upgrade step size can be set, and the step size is less than or equal to 3. Then, based on the step size, the intermediate kuberenetes versions are selected from kuberenetes1.19 to kuberenetes1.25. It can be assumed that the selected intermediate kuberenetes version is kubernetes1.22. The kubernetes1.22 can be set as the container orchestration system version B3.
[0081] In the step 3022, the control module 110 divides the upgrade steps according to the current kuberenetes version (i.e., kuberenetes version 1.19) of the computing platform 300, the target kuberenetes version (i.e., kuberenetes1.25) of the upgrade and the step size. The divided upgrade steps are kuberenetes1.19->kubernetes1.22->kuberenetes1.25.
[0082] At step 3023, the control module 110 instructs the kube-apiserver deployed by the computing platform 300 to read the resource list of the currently deployed kuberenetes version (i.e., kuberenetes version 1.19) of the computing platform 300. The resource list includes the version A1 of the resource A available to the kuberenetes version 1.19. For example, at step 3023, the control module 110 can instruct the kube-apiserver to adjust the pod-eviction-timeout parameter to avoid unnecessary container migration during the upgrade process. If the disconnection duration of the control node 310 and the computing node 320 exceeds the pod-eviction-timeout parameter, container migration in the computing node 320 is triggered. During the kuberenetes upgrade, the control node 310 and the computing node 320 can be disconnected, which is normal and does not require container migration. Therefore, at step 3023, the pod-eviction-timeout parameter is adjusted to avoid unnecessary container migration during the upgrade process.
[0083] At step 3024, the control module 110 can control the control node 310 in the computing platform 300 to upgrade the kuberenetes from kuberenetes 1.19 to kubernetes 1.22. By using the capabilities provided by the kubernetes community, the conversion from the version A1 of the resource A to the version A2 of the resource A can be completed for the at least one container. Specifically, the control node 310 upgrades the kuberenetes component in the control node 310 from kuberenetes 1.19 to kubernetes 1.22.
[0084] At step 3025, the control module 110 can control the computing node 320 in the computing platform 300 to upgrade the kuberenetes from kuberenetes 1.19 to kubernetes 1.22. Specifically, the computing node 320 upgrades the kuberenetes component in the computing node 320 from kuberenetes 1.19 to kubernetes 1.22.
[0085] In some embodiments, during or after the upgrade of the container orchestration system version B1 to the container orchestration system version B3, the upgrade device 100 can establish a correlation list of the address of the version A1 of the resource A and the address of the version A2. As described above, the versions of the resource A available to the container orchestration system version B3 include the version A1 and the version A2, and the container orchestration system version B3 has the description information of the version A1 and the description information of the version A2. The upgrade device 100 can read the description information of the version A1 and the description information of the version A2 from the container orchestration system (i.e., the container orchestration system version B3) of the computing platform 300, and based on the description information, establish the correlation list of the address of the version A1 and the address of the version A2.
[0086] The upgrade device 100 can mount the correlation list to the resource access request interface of the container orchestration system (i.e., the container orchestration system version B3) of the computing platform 300. In this way, when the resource access request interface of the container orchestration system version B3 receives the resource access request issued by the at least one container, the address of the version A2 can be obtained based on the correlation list and the address of the version A1 in the access request. Then, the container orchestration system version B3 forwards the access request to the version A2 based on the address of the version A2, so that the version A2 responds to the access request and provides the service C for the at least one container. That is, in the case that the resource address in the resource access request issued by the at least one container is the address of the version A1, the correlation list is used for the container orchestration system version B3 to forward the resource access request to the version A2, so that the version A2 responds to the resource access request and provides the service C for the at least one container.
[0087] In some embodiments, the container orchestration system of the computing platform 300 can be set as kuberenetes, the container orchestration system version B1 as kuberenetes 1.19, and the container orchestration system version B3 as kuberenetes 1.22, and then the step 302 can include a step 3026, a step 3027 and a step 3028.
[0088] After the kubernetes deployed by the computing platform 300 is upgraded to kubernetes 1.22, the control module 110 performs step 3026 to read, by the kube-apiserver deployed by the computing platform 300, a resource list of the kubernetes version (i.e., kubernetes version 1.22) currently deployed by the computing platform 300. The resource list includes version A1 and version A2 of the resource A available to the kubernetes version 1.22. In step 3026, the control module 110 can establish an association list of the address of version A1 and the address of version A2. The association list can be a mapping table. For example, the address of the version of the resource A can be an API, the prefix of the API of different versions of the same resource is different, and the association list of the address of version A1 and the address of version A2 is specifically an association list of the API prefix of version A1 and the API prefix of version A2. In one example, the association list of the API prefix of version A1 and the API prefix of version A2 is shown in Table 1.
[0089] Table 1
[0090] After obtaining the association list, the control module 110 can record the association list in the database, and call the interface of the kube-apiserver to mount the conversion module 120 to the kube-apiserver in the form of a webhook.
[0091] In step 3027, when the kube-apiserver receives the resource access request sent by the at least one container, the kube-apiserver can read the association list from the database through the conversion module 120, and obtain the address of version A2 based on the association list and the address of version A1 in the resource access request, so that the kube-apiserver can forward the resource access request to version A2 based on the address of version A2, and version A2 responds to the resource access request to provide service C for the at least one container. In addition, the conversion module 120 can record the address of version A1 in the database every time the conversion module 120 is called.
[0092] In step 3028, the prompt module 130 can query the address of version A1 recorded by the conversion module 120 in the database, and if the address of version A1 is queried and the kube-apiserver is found to still receive the resource access request including the address of version A1, the prompt module 130 can issue a prompt information for prompting the user of the at least one container to modify the address used by the at least one container to access the resource A from the address of version A1 to the address of version A2.
[0093] Continuing to refer to FIG. 3, at step 303a, the upgrading apparatus 100 switches the version of the resource A providing the service C for the at least one container from version A1 to version A2 at the container orchestration system B3, and in the case that the version of the resource A available to the container orchestration system version B2 includes version A2, upgrades the container orchestration system of the computing platform 300 from the container orchestration system version B3 to the container orchestration system version B2.
[0094] In the case that the container orchestration system of the computing platform 300 is upgraded from the container orchestration system version B1 to the container orchestration system version B2, the container orchestration system version B3 can complete the switching from version A1 to version A2 for the at least one container, i.e., switches the version of the resource A providing the service C for the at least one container from version A1 to version A2. For example, an instance of version A2 is created for the at least one container, and the instance is used to provide the service C for the at least one container. For example, an association list of the address of version A1 and the address of version A2 is established, so that the container orchestration system version B2 can match the address of version A2 based on the address of version A1 in a resource access request issued by the at least one container, and then can forward the resource access request to version A2.
[0095] In the case that the version of the resource A available to the container orchestration system version B2 includes version A2, it indicates that there is an intersection between the version of the resource available to the container orchestration system version B2 and the version of the resource available to the container orchestration system version B3, and the switching of the version of the resource A can be automatically completed for the at least one container from the container orchestration system version B3 to the container orchestration system version B2.
[0096] In some embodiments, the version of the resource A available to the container orchestration system version B2 only includes version A2, or the latest version in the version of the resource A available to the container orchestration system version B2 is version A2, and the container orchestration system version B2 uses version A2 to provide the service C for the at least one container.
[0097] In some embodiments, when the container orchestration system version B2 is used to provide the service C for the at least one container using version A1, the upgrading apparatus 100 can establish an association list of the address of version A1 and the address of version A2. In the case that the resource address in a resource access request issued by the at least one container is the address of version A1, the association list is used to forward the resource access request to version A2 at the container orchestration system, so that version A2 provides the service C for the at least one container in response to the resource access request. The association list can be established based on the version of the resource A available to the container orchestration system version B2, and details can be referred to the foregoing description, which will not be repeated here.
[0098] In some embodiments, the at least one container belongs to a user, and the upgrade device 100 can send a prompt message when the container orchestration system version B2 is used to provide the service C for the at least one container by using the version A2. The prompt message is used to prompt the user to modify the address of the resource A accessed by the at least one container from the address of the version Al to the address of the version A2. For example, the prompt message can be sent in the form of an alarm to remind the user. For example, the prompt message can be sent by the prompt module 130 in the upgrade device 100, and details can be referred to the description of step 3028 above, which will not be repeated here.
[0099] In some embodiments, the versions of the resource A that can be used by the container orchestration system version B2 further include a version A3 of the resource A, and the version A3 is a version after the version A2; and the container orchestration system version B2 is used to switch the version of the resource A used to provide the service C for the at least one container from the version A2 to the version A3.
[0100] Specifically, the versions of the resource A that can be used by the container orchestration system version B2 include the version A2, which indicates that the container orchestration system version B2 has the description information of the version A2. The container orchestration system version B2 can understand the version A2 based on the description information of the version A2, so as to perform the conversion from the version A2 to the version A3 for the at least one container. For example, the container orchestration system version B2 can identify the configuration information of the instance of the version A2 used to provide the service C for the at least one container based on the description information of the version A2, and create an instance of the version A3 used to provide the service C for the at least one container by using the configuration information, so as to complete the conversion from the version A2 to the version A3 for the at least one container. For example, the container orchestration system version B2 has the description information of the version A2, and the container orchestration system version B2 can identify the address in the resource access request when receiving the resource access request sent by the at least one container, and then identify the resource A to which the resource access request is directed, and process the resource access request, so as to complete the conversion from the version A2 to the version A3 for the at least one container.
[0101] In one example of this embodiment, the upgrading apparatus 100 can establish the association list of the address of version A1 and the address of version A3. Specifically, the versions of the resource A available to the container orchestration system version B2 include version A2 and version A3, and the container orchestration system version B3 has the description information of version A2 and the description information of version A3. After the container orchestration system of the computing platform 300 is upgraded to the container orchestration system version B2, the upgrading apparatus 100 can read the description information of version A2 and the description information of version A3 from the container orchestration system of the computing platform 300 (i.e., the container orchestration system version B2), and based on the description information, establish the association list of the address of version A2 and the address of version A3. Then, based on the association list of the address of version A1 and the address of version A2 introduced above and the association list of the address of version A2 and the address of version A3, the association list of the address of version A1 and the address of version A3 is obtained.
[0102] In the case that the resource address in the resource access request issued by the at least one container is the address of version A1, the association list of the address of version A1 and the address of version A3 is used for the container orchestration system version B2 to forward the resource access request to version A3, so that version A3 responds to the resource access request and provides the service C for the at least one container.
[0103] In another example of this embodiment, the at least one container belongs to a user, and when the container orchestration system version B2 is used to provide the service C for the at least one container by version A3, the upgrading apparatus 100 can issue a prompt information. The prompt information is used to prompt the user to modify the address used by the at least one container to access the resource A from the address of version A1 to the address of version A3. For example, the prompt information can be issued in the form of an alarm to remind the user. For example, the prompt information can be issued by the prompt module 130 in the upgrading apparatus 100, which can be referred to the introduction of step 3028 above, and will not be described here.
[0104] In some embodiments, the container orchestration system of the computing platform 300 can be set as kuberenetes, the container orchestration system version B1 can be set as kuberenetes 1.19, the container orchestration system version B3 can be set as kuberenetes 1.22, and the container orchestration system version B2 can be set as kuberenetes 1.25, and then the step 303a can include the step 3031, the step 3032, the step 3033, the step 3034 and the step 3035.
[0105] At step 3031, the control module 110 can control the control node 310 in the computing platform 300 to upgrade the kuberenetes from kuberenetes 1.22 to kubernetes 1.25. Among them, with the help of the capabilities provided by the kubernetes community, the conversion from version A2 of resource A to version A3 of resource A can be completed for the at least one container. Among them, what the control node 310 specifically does is to upgrade the kuberenetes component in the control node 310 from kuberenetes 1.22 to kubernetes 1.25.
[0106] At step 3032, the control module 110 can control the computing node 320 in the computing platform 300 to upgrade the kuberenetes from kuberenetes 1.22 to kubernetes 1.25. Among them, what the computing node 320 specifically does is to upgrade the kuberenetes component in the computing node 320 from kuberenetes 1.22 to kubernetes 1.25.
[0107] After upgrading the kuberenetes deployed by the computing platform 300 to kubernetes 1.25, the control module 110 performs step 3033 to read the resource list of the kuberenetes version (i.e., kuberenetes version 1.25) currently deployed by the computing platform 300 through the kube-apiserver deployed by the computing platform 300. The resource list includes version A2 and version A3 of resource A available for kuberenetes version 1.25. At step 3033, the control module 110 can establish an association list of the address of version A1 and the address of version A3. Among them, the association list can be a mapping table. The control module 110 can first establish an association list of the address of version A2 and the address of version A3. Then, based on the association list of the address of version A2 and the address of version A3 and the association list of the address of version A1 and the address of version A2 introduced above, the association list of the address of version A1 and the address of version A3 is obtained. Among them, when there are multiple matches between the three versions of resource A (for example, autoscaling / v2beta1->autoscaling / v2beta2->autoscaling / v2), the number of matching hops can be combined to ensure that only one hop is needed to match the address of version A1 to the address of version A3.
[0108] For example, the address of the version of the resource A can be an API, where the API of different versions of the same resource have different prefixes, and the association list of the address of the version A1 and the address of the version A3 is an association list of the API prefix of the version A1 and the API prefix of the version A3. In one example, the association list of the API prefix of the version A1 and the API prefix of the version A3 is shown in Table 2.
[0109] Table 2
[0110] After obtaining the association list, the control module 110 can record the association list in the database, and call the interface of the kube-apiserver to mount the conversion module 120 to the kube-apiserver in the form of a webhook.
[0111] In step 3034, when the kube-apiserver receives the resource access request sent by the at least one container, the kube-apiserver can read the association list from the database through the conversion module 120, and obtain the address of the version A3 based on the association list and the address of the version A1 in the resource access request, so that the kube-apiserver can forward the resource access request to the version A2 based on the address of the version A3, and the version A3 provides the service C for the at least one container in response to the resource access request. In addition, the conversion module 120 can record the address of the version A1 in the database every time the conversion module 120 is called.
[0112] In step 3035, the prompt module 130 can query the address of the version A1 recorded by the conversion module 120 in the database, and if the address of the version A1 is queried and the kube-apiserver is queried to still receive the resource access request including the address of the version A1, the prompt module 130 can issue a prompt information for prompting the user of the at least one container to modify the address used by the at least one container to access the resource A from the address of the version A1 to the address of the version A3.
[0113] In some embodiments, referring to FIG. 3, the upgrading apparatus 100 performs step 303b, in a case where the container orchestration system version B2 switches the version of the resource A providing the service C for the at least one container from version A1 to version A2, and the version of the resource A available to the container orchestration system version B2 does not include version A2, the container orchestration system of the computing platform 300 is upgraded from the container orchestration system version B3 to a container orchestration system version B4; wherein the version of the resource A available to the container orchestration system version B4 includes version A2 and version A3. Wherein the container orchestration system version B4 is also a version between the container orchestration system version B1 and the container orchestration system version B2, specifically a version between the container orchestration system version B3 and the container orchestration system version B2.
[0114] There is no intersection between the version of the resource A available to the container orchestration system version B3 and the version of the resource A available to the container orchestration system version B2, and the automatic conversion of the version of the resource A cannot be completed for the at least one container. In this case, the container orchestration system of the computing platform 300 can be first upgraded from the container orchestration system version B3 to the container orchestration system version B4. Wherein there is an intersection between the version of the resource A available to the container orchestration system version B3 and the version of the resource A available to the container orchestration system version B4, and the container orchestration system version B4 can complete the automatic conversion of the version of the resource A for the at least one container.
[0115] Next, the upgrading apparatus 100 performs step 304, in a case where the intermediate container orchestration system version B4 switches the version of the resource A providing the service C for the at least one container from version A2 to version A3, and the version of the resource A available to the container orchestration system version B2 includes version A3, the container orchestration system of the computing platform 300 is upgraded from the intermediate container orchestration system version B4 to the container orchestration system version B2.
[0116] There is an intersection between the version of the resource A available to the container orchestration system version B4 and the version of the resource A available to the container orchestration system version B2, and the container orchestration system version B2 can complete the automatic conversion of the version of the resource A for the at least one container.
[0117] In this way, by using the container orchestration system upgrading method provided in the embodiments of the present application, in a case where the current container orchestration system version and the target container orchestration system version cannot automatically complete the version conversion of the resource for the already issued containers, the version conversion of the resource for the already issued containers can be automatically completed step by step through the step-by-step upgrading manner, thereby automatically completing the version conversion of the resource for the already issued containers between the current container orchestration system version and the target container orchestration system version, improving the upgrading efficiency, saving manual work, and enabling the new features or new functions of the resource to be used in time.
[0118] The embodiment of the present application also provides a container orchestration system upgrading device 700. The device 700 is used for upgrading a container orchestration system of a computing platform from a current container orchestration system version to a target container orchestration system version; wherein the current container orchestration system version is used for providing services for at least one container in the computing platform by using a first version of resources. As shown in FIG. 7, the device 700 comprises:
[0119] A confirmation module 710 is configured to confirm that a version of the resources available for the target container orchestration system version does not include the first version.
[0120] An upgrading module 720 is configured to upgrade the container orchestration system of the computing platform from the current container orchestration system version to a first intermediate container orchestration system version, wherein a version of the resources available for the first intermediate container orchestration system version includes the first version and a second version.
[0121] The upgrading module 720 is further configured to, in a case that the version of the resources to be used by the first intermediate container orchestration system version to provide services for the at least one container is switched from the first version to the second version, and the version of the resources available for the target container orchestration system version includes the second version, upgrade the container orchestration system of the computing platform from the first intermediate container orchestration system version to the target container orchestration system version.
[0122] In some embodiments, the target container orchestration system version is used for providing services for the at least one container by using the second version.
[0123] In some embodiments, the version of the resources available for the target container orchestration system version further includes a third version of the resources, and the third version is a version after the second version; and the target container orchestration system version is used for switching the version of the resources to be used to provide services for the at least one container from the second version to the third version.
[0124] In some embodiments, when the target container orchestration system version is used for providing services for the at least one container by using the second version, the upgrading module 720 is further configured to establish an association list of an address of the first version and an address of the second version; wherein in a case that a resource address in a resource access request issued by the at least one container is the address of the first version, the association list is used for the target container orchestration system version to forward the resource access request to the second version, so that the second version responds to the resource access request to provide services for the at least one container.
[0125] In some embodiments, the at least one container belongs to a user, and when the target container orchestration system version is used to provide service for the at least one container by using the second version, the upgrade module 720 is further configured to: issue a prompt message, the prompt message being used to prompt the user to modify an address used by the at least one container to access the resource from an address of the first version to an address of the second version.
[0126] In some embodiments, the upgrade module 720 is further configured to: in a case that the version of the resource to be provided by the first intermediate container orchestration system version for the at least one container is switched from the first version to the second version, and the version of the resource available to the target container orchestration system version does not include the second version, upgrade the container orchestration system version of the computing platform from the first intermediate container orchestration system version to a second intermediate container orchestration system version, wherein the version of the resource available to the second intermediate container orchestration system version includes the second version and a third version; in a case that the version of the resource to be provided by the second intermediate container orchestration system version for the at least one container is switched from the second version to the third version, and the version of the resource available to the target container orchestration system version includes the third version, upgrade the container orchestration system of the computing platform from the second intermediate container orchestration system version to the target container orchestration system version.
[0127] In some embodiments, the container orchestration system of the computing platform is kubernetes.
[0128] In some embodiments, the resource includes any one or a combination of a batch processing resource, a service discovery resource, an event resource, an elastic scaling resource, a policy resource, and a flow control resource.
[0129] The confirmation module 710 and the upgrade module 720 can be implemented by software or by hardware. For example, the implementation of the confirmation module 710 is described below. The implementation of the upgrade module 720 can be similar to the implementation of the confirmation module 710.
[0130] As an example of a software functional unit, the validation module 710 can include code running on a compute instance. The compute instance can include at least one of a physical host (computing device), a virtual machine, a container. Further, the compute instance can be one or more. For example, the validation module 710 can include code running on multiple hosts / virtual machines / containers. It is noted that the multiple hosts / virtual machines / containers running the code can be distributed in the same region, or in different regions. Further, the multiple hosts / virtual machines / containers running the code can be distributed in the same availability zone (AZ), or in different AZs, each of which includes one data center or multiple data centers in close geographical proximity. Typically, a region can include multiple AZs.
[0131] Similarly, the multiple hosts / virtual machines / containers running the code can be distributed in the same virtual private cloud (VPC), or in multiple VPCs. Typically, a VPC is set up within a region, and communication between two VPCs in the same region, or between VPCs in different regions, requires a communication gateway in each VPC to enable interconnection between the VPCs.
[0132] As an example of a hardware functional unit, the validation module 710 can include at least one computing device, such as a server, etc. Alternatively, the validation module 710 can also be a device implemented with an application-specific integrated circuit (ASIC), or a programmable logic device (PLD), such as a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0133] The multiple computing devices included in the confirmation module 710 can be distributed in the same region or in different regions. The multiple computing devices included in the confirmation module 710 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the confirmation module 710 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0134] It should be noted that, in other embodiments, the confirmation module 710 can be configured to perform any of the steps of the method shown in FIG. 3, and the upgrade module 720 can be configured to perform any of the steps of the method shown in FIG. 3. The steps implemented by the confirmation module 710 and the upgrade module 720 can be specified as needed, and the entire functionality of the apparatus 700 can be implemented by the confirmation module 710 and the upgrade module 720 implementing different steps of the method shown in FIG. 3.
[0135] The present application also provides a computing device 800. As shown in FIG. 8, the computing device 800 includes a bus 802, a processor 804, a memory 806, and a communication interface 808. The processor 804, the memory 806, and the communication interface 808 communicate with each other through the bus 802. The computing device 800 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 800.
[0136] The bus 802 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is shown in FIG. 8, but it does not mean that there is only one bus or only one type of bus. The bus 802 can include a path for transmitting information between various components (e.g., the memory 806, the processor 804, the communication interface 808) of the computing device 800.
[0137] The processor 804 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.
[0138] The memory 806 can include volatile memory, such as random access memory (RAM), and non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid-state drive (SSD).
[0139] The memory 806 stores executable program code that is executed by the processor 804 to implement the functions of the aforementioned confirmation module 710 and the upgrade module 720, respectively, and thus implement the method shown in FIG. 3. That is, the memory 806 stores instructions for implementing the method shown in FIG. 3.
[0140] The communication interface 808 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to enable communication between the computing device 800 and other devices or communication networks.
[0141] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a notebook computer, or a smartphone.
[0142] As shown in FIG. 9, the computing device cluster includes at least one computing device 800. The memory 806 in one or more computing devices 800 in the computing device cluster can store the same instructions for implementing the method shown in FIG. 3.
[0143] In some possible implementations, the memory 806 in one or more computing devices 800 in the computing device cluster can also respectively store partial instructions for implementing the method shown in FIG. 3. In other words, the combination of one or more computing devices 800 can collectively execute the instructions for implementing the method shown in FIG. 3.
[0144] It should be noted that the memory 806 in different computing devices 800 in the computing device cluster can store different instructions for respectively implementing part of the functions of the apparatus 700. That is, the instructions stored in the memory 806 in different computing devices 800 can implement the functions of one or more of the confirmation module 710 and the upgrade module 720.
[0145] In some possible implementations, one or more of the computing devices in the cluster of computing devices can be connected through a network. The network can be a wide area network, a local area network, or the like. FIG. 10 illustrates one possible implementation. As shown in FIG. 10, two computing devices 800A and 800B are connected through a network. Specifically, the computing devices are connected to the network through a communication interface in each of the computing devices. In this type of possible implementation, the memory 806 in the computing device 800A stores instructions for performing the functions of the validation module 710. Meanwhile, the memory 806 in the computing device 800B stores instructions for performing the functions of the upgrade module 720.
[0146] It should be understood that the functions of the computing device 800A shown in FIG. 10 can also be performed by multiple computing devices 800. Similarly, the functions of the computing device 800B can also be performed by multiple computing devices 800.
[0147] Embodiments of the present application also provide another cluster of computing devices. The computing devices in the cluster of computing devices can be connected in a similar manner as described above with reference to the cluster of computing devices shown in FIG. 9 and FIG. 10. The difference is that the memory 806 in one or more of the computing devices 800 in the cluster of computing devices can store the same instructions for performing the method shown in FIG. 3.
[0148] In some possible implementations, the memory 806 in one or more of the computing devices 800 in the cluster of computing devices can also store partial instructions for performing the method shown in FIG. 3, respectively. In other words, a combination of one or more of the computing devices 800 can collectively perform the instructions for performing the method shown in FIG. 3.
[0149] Embodiments of the present application also provide a computer program product containing instructions. The computer program product can be a software or program product containing instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to perform the method shown in FIG. 3.
[0150] Embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium can be any available medium or data storage that a computing device can store or a data center containing one or more available media and the like. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk), or the like. The computer readable storage medium contains instructions that instruct a computing device to perform the method shown in FIG. 3.
[0151] Finally, it should be noted that: the above examples are used to illustrate the technical solutions of the present application, but not limited to them; although the present application is described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A container orchestration system upgrade method, characterized by, The method is used for upgrading a container orchestration system of a computing platform from a current container orchestration system version to a target container orchestration system version; wherein the current container orchestration system version is used for providing services for at least one container in the computing platform by using a first version of resources; the method comprises: confirming that a version of the resources available to the target container orchestration system version does not include the first version; upgrading the container orchestration system of the computing platform from the current container orchestration system version to a first intermediate container orchestration system version, wherein a version of the resources available to the first intermediate container orchestration system version includes the first version and a second version; in a case that the first intermediate container orchestration system version switches the version of the resources to be used for providing services for the at least one container from the first version to the second version, and the version of the resources available to the target container orchestration system version includes the second version, upgrading the container orchestration system of the computing platform from the first intermediate container orchestration system version to the target container orchestration system version.
2. The method of claim 1, wherein the target container orchestration system version is used for providing services for the at least one container by using the second version; or the version of the resources available to the target container orchestration system version further includes a third version of the resources, and the third version is a version after the second version; and the target container orchestration system version is used for switching the version of the resources to be used for providing services for the at least one container from the second version to the third version.
3. The method according to claim 1 or 2, characterized in that, When the target container orchestration system version is used for providing services for the at least one container by using the second version, the method further comprises: establishing an association list of addresses of the first version and addresses of the second version; wherein, in a case that a resource address in a resource access request issued by the at least one container is an address of the first version, the association list is used for the target container orchestration system version to forward the resource access request to the second version, so that the second version responds to the resource access request to provide services for the at least one container.
4. The method according to any one of claims 1 to 3, characterized in that, The at least one container belongs to a user, and when the target container orchestration system version is used for providing services for the at least one container by using the second version, the method further comprises: issuing a prompt information, the prompt information is used for prompting the user to modify an address used by the at least one container to access the resources from an address of the first version to an address of the second version.
5. The method according to any one of claims 1-4, characterized in that, The method further comprises: in a case that the first intermediate container orchestration system version switches the version of the resource used to provide service for the at least one container from the first version to the second version, and the version of the resource available to the target container orchestration system version does not include the second version, upgrading the container orchestration system of the computing platform from the first intermediate container orchestration system version to a second intermediate container orchestration system version, wherein the version of the resource available to the second intermediate container orchestration system version includes the second version and a third version; in a case that the second intermediate container orchestration system version switches the version of the resource used to provide service for the at least one container from the second version to the third version, and the version of the resource available to the target container orchestration system version includes the third version, upgrading the container orchestration system of the computing platform from the second intermediate container orchestration system version to the target container orchestration system version.
6. The method according to any one of claims 1-5, characterized in that, The container orchestration system of the computing platform is kubernetes; and / or the resource includes any one or a combination of batch processing resource, service discovery resource, event resource, elasticity scaling resource, policy resource, and flow control resource.
7. A container orchestration system upgrade apparatus, comprising: The apparatus is configured to upgrade a container orchestration system of a computing platform from a current container orchestration system version to a target container orchestration system version, wherein the current container orchestration system version is configured to use a first version of a resource to provide service for at least one container in the computing platform, and the apparatus comprises: a confirmation module configured to confirm that the version of the resource available to the target container orchestration system version does not include the first version; an upgrading module configured to upgrade the container orchestration system of the computing platform from the current container orchestration system version to a first intermediate container orchestration system version, wherein the version of the resource available to the first intermediate container orchestration system version includes the first version and a second version; The upgrading module is further configured to, in a case that the first intermediate container orchestration system version switches the version of the resource used to provide service for the at least one container from the first version to the second version, and the version of the resource available to the target container orchestration system version includes the second version, upgrade the container orchestration system of the computing platform from the first intermediate container orchestration system version to the target container orchestration system version.
8. The apparatus of claim 7, wherein the target container orchestration system version is configured to use the second version to provide service for the at least one container; or the version of the resource available to the target container orchestration system version further includes a third version of the resource, and the third version is a version after the second version; and the target container orchestration system version is configured to switch the version of the resource used to provide service for the at least one container from the second version to the third version. When the target container orchestration system version is configured to use the second version to provide service for the at least one container, the upgrading module is further configured to:
9. The apparatus of claim 7 or 8, wherein, establish an association list of the first version of the address and the second version of the address; wherein, in a case that a resource address in a resource access request issued by the at least one container is the first version of the address, the association list is used by the target container orchestration system version to forward the resource access request to the second version, so that the second version responds to the resource access request to provide a service for the at least one container.
10. The apparatus of any one of claims 7-9, wherein, The at least one container belongs to a user, when the target container orchestration system version is used to provide a service for the at least one container by using the second version, the upgrade module is further configured to: issue a prompt information, the prompt information is used to prompt the user to modify the address used by the at least one container to access the resource from the first version of the address to the second version of the address.
11. The apparatus of any one of claims 7-10, wherein, The upgrade module is further configured to: in a case that the version of the resource to be provided by the first intermediate container orchestration system version for the at least one container is switched from the first version to the second version, and the version of the resource available to the target container orchestration system version does not include the second version, upgrade the container orchestration system version of the computing platform from the first intermediate container orchestration system version to a second intermediate container orchestration system version; wherein the version of the resource available to the second intermediate container orchestration system version includes the second version and a third version; in a case that the version of the resource to be provided by the second intermediate container orchestration system version for the at least one container is switched from the second version to the third version, and the version of the resource available to the target container orchestration system version includes the third version, upgrade the container orchestration system of the computing platform from the second intermediate container orchestration system version to the target container orchestration system version.
12. The apparatus of any one of claims 7-11, wherein, The container orchestration system of the computing platform is kubernetes; and / or, the resource includes any one or a combination of a batch processing resource, a service discovery resource, an event resource, an elastic scaling resource, a policy resource, and a flow control resource.
13. A cluster of computing devices, characterized in that, comprise at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method of any one of claims 1-6.
14. A computer-readable storage medium, characterized in that, comprise computer program instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method of any one of claims 1-6.
15. A computer program product comprising instructions, characterized in that, The instructions, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method of any one of claims 1-6.
Citation Information
Patent Citations
Kubernetes upgrading method and device for container cluster management system
CN111897558A
Upgrading method and device for target equipment system
CN112148330A
Cross-version upgrading method and device and electronic equipment
CN112199106A
Version upgrading method and computer readable storage medium
CN113760461A
Cross-version data migration method, device and system and readable storage medium
CN116975023A