Real-time migration of clusters in containerized environments

The risk and downtime issues associated with cluster migration in containerized environments are addressed through a staged and monitored live migration approach, enabling stable cluster migration between locations and clouds, with rollback options to avoid damage.

CN118733191APending Publication Date: 2024-10-01GOOGLE LLC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410728068.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-09-24
Filing Date
2020-09-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In a containerized environment, cluster migration brings risks, especially during software upgrades, moves between locations, networks, or clouds, which can lead to downtime and failures that are difficult to effectively manage with existing technology.

Method used

Gradually move from the source cluster to the destination cluster through a live migration approach with staged deployment and monitoring, including allocating request traffic, synchronizing databases, migrating workloads and storage during the migration, ensuring the ability to roll back or stop the migration if a failure is detected.

Benefits of technology

Reduce or eliminate downtime during upgrades, provide rollback options to avoid large-scale damage, and ensure the stability and reliability of the cluster migration process between different locations and clouds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733191A_ABST
    Figure CN118733191A_ABST
Patent Text Reader

Abstract

The technique provides real-time migration of clusters in a containerized environment. For example, when a request for one or more cluster control planes is received, a predetermined portion of the received request may be allocated to a control plane of the second cluster, while a remaining portion of the received request may be allocated to a control plane of the first cluster. A predetermined portion of the request is processed using a control plane of the second cluster. While processing a predetermined portion of the request, it is detected whether there is a failure in the second cluster. Based on the failure being not detected in the second cluster, a predetermined portion of the requests assigned to the control plane of the second cluster may be added at a predetermined stage until all requests are assigned to the control plane of the second cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Description of the case

[0001] This application is a divisional application of the patent application with application number 202010954736.8 filed on September 11, 2020 and invention name “Live Migration of Clusters in Containerized Environments”. CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of the filing date of U.S. Provisional Patent Application No. 62 / 899,794, filed on September 13, 2019, the disclosure of which is incorporated herein by reference. Technical Field

[0003] The present disclosure relates to live migration of clusters in a containerized environment. Background Art

[0004] Containerized environments can be used to efficiently run applications on distributed or cloud computing systems. For example, the various services of an application can be packaged as containers. Containers can be logically grouped into container pods, which can then be deployed on a cloud computing system, such as a cluster of nodes that are virtual machines ("VMs"). A cluster can include one or more worker nodes that run containers and one or more master nodes that manage the workload and resources of the worker nodes according to various cloud and user-defined configurations and policies. The cluster control plane is a logical service running on the master node of the cluster, which can include multiple software processes and a database that stores the current state of the cluster. To increase availability, the master node in the cluster can be replicated, in which case the arbitration set of the master node replicas must agree that the cluster modifies any state of the cluster. The cluster can be operated by a cloud provider or managed by the end user. For example, a cloud provider can have a cloud control plane that sets rules and policies for all clusters on the cloud, or provide users with an easy way to perform management tasks on the cluster.

[0005] When a cloud provider or end user makes changes to the cluster environment, these changes may pose risks to the cluster. Exemplary environmental changes may include software upgrades that may upgrade nodes, cluster control planes, or cloud control planes. Another exemplary environmental change may include the movement of cluster resources between locations, such as between data centers in different physical locations or between different logical locations (such as between regions or areas within the same data center). In addition, a user may want to migrate from a self-managed cluster operated by the user as a cloud provider to a cluster managed by a cloud provider, or generally between two clusters managed by different cloud providers. This migration poses risks because it involves transitioning the control plane of the cluster to the control of a new cloud provider. As yet another example, a user may want to change the cloud of a cluster without stopping the cluster, which may pose risks to processes currently running in the cluster.

[0006] Figure 1A and 1B The current process of changing the cluster environment, in particular software upgrades to the cluster control plane, is shown. For example, a cloud control plane can introduce software upgrades, such as new versions of configurations and policies for VMs hosted by a cloud provider. Figure 1A As shown in Figure 1, to switch a cluster from an old version "v1.1" to a new version "v1.2", the cloud control plane deletes the old master node in the cluster and creates a new master node in its place. Figure 1B During the replacement process shown, the new master node may be blocked from attaching to a persistent disk ("PD") until the old master node is detached from the PD and deleted. Summary of the invention

[0007] The present disclosure provides a method for migrating from a first cluster to a second cluster, the method comprising receiving a request for one or more cluster control planes through one or more processors, wherein the one or more cluster control planes include a control plane of the first cluster and a control plane of the second cluster; allocating a predetermined portion of the received request to the control plane of the second cluster through the one or more processors, and allocating the remaining portion of the received request to the control plane of the first cluster; processing the predetermined portion of the received request using the control plane of the second cluster through the one or more processors; detecting whether there is a fault in the second cluster while processing the predetermined portion of the received request through the one or more processors; and increasing the predetermined portion of the received request allocated to the control plane of the second cluster at a predetermined stage through the one or more processors based on no fault being detected in the second cluster, until all received requests are allocated to the control plane of the second cluster.

[0008] The received request may be distributed by a cluster bridge aggregator of a first cluster and a cluster bridge aggregator of a second cluster, wherein the first cluster and the second cluster operate on the same cloud. The received request may include a request from a workload running in the first cluster, wherein the request from the workload may be intercepted by a sidecar container injected in the first cluster and routed to the cluster bridge aggregator of the second cluster, wherein the first cluster and the second cluster operate on different clouds.

[0009] The distribution of the received requests can be performed in multiple predetermined stages, wherein the requests are directed to the first cluster or the second cluster based on one or more of the following: user agent, user account, user group, object type, resource type, location of the object, or location of the sender of the request.

[0010] The method may further include joining, by one or more processors, one or more databases in the control plane of the second cluster to a quorum including one or more databases in the control plane of the first cluster, wherein the first cluster and the second cluster operate on the same cloud. The method may further include synchronizing, by one or more processors, one or more databases in the control plane of the second cluster with one or more databases in the control plane of the first cluster, wherein the first cluster and the second cluster operate on different clouds.

[0011] The method may further include allocating a predetermined portion of the object lock to one or more controllers of the second cluster through one or more processors, and allocating the remaining portion of the object lock to one or more controllers of the first cluster; actuating an object locked by one or more controllers of the second cluster through one or more processors; detecting whether there is a fault in the second cluster through one or more processors while actuating the locked object; and increasing the predetermined portion of the object lock allocated to one or more controllers of the second cluster through one or more processors based on no fault being detected in the second cluster.

[0012] The method may further include determining, by one or more processors, that all received requests are assigned to the control plane of the second cluster; and deleting, by one or more processors, the control plane of the first cluster based on the determination, wherein the first cluster and the second cluster operate on the same cloud. The method may further include stopping, by one or more processors, the assignment of received requests to the control plane of the second cluster based on the detection of one or more faults in the second cluster. The method may further include: generating, by one or more processors, an output including information about the detected faults based on the detection of one or more faults in the second cluster. The method may further include: reducing, by one or more processors, a predetermined portion of the received requests assigned to the control plane of the second cluster based on the detection of the faults in the second cluster until all received requests are assigned to the control plane of the first cluster. The method may further include: determining, by one or more processors, that all received requests are assigned to the control plane of the first cluster; and deleting, by one or more processors, the second cluster based on the determination.

[0013] The method may further include: scheduling container pods in the second cluster by one or more processors; recording the state of the container pods in the first cluster by one or more processors; sending the recorded state of the container pods in the first cluster to the container pods in the second cluster by one or more processors. The method may further include: pausing the execution of the workload by the container pods in the first cluster by one or more processors; replicating the state changes of the container pods in the first cluster since the state of the container pods in the first cluster was recorded by one or more processors; sending the replicated state changes to the container pods in the second cluster by one or more processors; resuming the execution of the workload by the container pods in the second cluster by one or more processors; forwarding the traffic directed to the container pods in the first cluster to the container pods in the second cluster by one or more processors; deleting the container pods in the first cluster by one or more processors.

[0014] The method may further include determining, by one or more processors, that a first worker node in the first cluster has one or more container pods to be moved to a second cluster; creating, by one or more processors, a second worker node in the second cluster; preventing, by one or more processors, the first worker node in the first cluster from adding new container pods; moving, by one or more processors, one or more container pods in the first worker node to a second worker node in the second cluster; determining, by one or more processors, that the first worker node in the first cluster no longer has a container pod to be moved to the second cluster; and deleting, by one or more processors, the first worker node in the first cluster.

[0015] The method may further include receiving, by one or more processors, a request for one or more workloads, wherein the one or more workloads include workloads running in a first cluster and workloads running in a second cluster; and the one or more processors using at least one global load balancer to distribute the received requests to one or more workloads between the workloads running in the first cluster and the workloads running in the second cluster.

[0016] The method may further include determining, by one or more processors, that a container pod running in the second cluster references storage of the first cluster; creating storage in the second cluster by one or more processors, wherein the storage of the first cluster and the storage of the second cluster are located in different locations; reading data related to the container pod in the second cluster from the storage of the second cluster using a storage driver by one or more processors; reading data related to the container pod in the second cluster from the storage of the first cluster using a storage driver by one or more processors. The method may further include: writing changes made to the container pod in the second cluster to the storage of the second cluster by one or more processors; and copying unchanged data of the container pod from the storage of the first cluster to the storage of the second cluster by one or more processors.

[0017] The present disclosure further provides a system for migrating from a first cluster to a second cluster, the system comprising: one or more processors, the one or more processors being configured to: receive a request for one or more cluster control planes, wherein the one or more cluster control planes include a control plane of the first cluster and a control plane of the second cluster; allocate a predetermined portion of the received request to the control plane of the second cluster, and allocate the remaining portion of the received request to the control plane of the first cluster; use the control plane of the second cluster to process the predetermined portion of the received request; while processing the predetermined portion of the received request, detect whether there is a fault in the second cluster; and based on no fault being detected in the second cluster, increase the predetermined portion of the received request allocated to the control plane of the second cluster at a predetermined stage until all received requests are allocated to the control plane of the second cluster.

[0018] The first cluster and the second cluster may be at least one of the following: operating different software versions, operating in different locations, operating on different clouds provided by different cloud providers, operating on different clouds where at least one cloud is a user's local data center, or connected to different networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1A and 1B An existing process for implementing environmental changes for a cluster is shown.

[0020] Figure 2 An exemplary distributed system is shown upon which a cluster may operate according to aspects of the present disclosure.

[0021] Figure 3 An exemplary distributed system is shown in which live cluster migration may be performed according to aspects of the present disclosure.

[0022] Figure 4 Exemplary clusters according to aspects of the present disclosure are shown.

[0023] Figure 5 Exemplary components involved in live cluster migration according to aspects of the present disclosure are shown.

[0024] Figure 6 Exemplary features for routing requests to a cluster control plane during live migration within a cloud are shown in accordance with aspects of the present disclosure.

[0025] Figure 7 Exemplary features for routing requests to a cluster control plane during live migration between different clouds are shown according to aspects of the present disclosure.

[0026] Figure 8 Exemplary features for performing storage synchronization for a cluster control plane during live migration between different locations or clouds are shown in accordance with aspects of the present disclosure.

[0027] Fig. 9 Exemplary features for migration of workloads according to aspects of the present disclosure are shown.

[0028] Fig.10 Exemplary features for performing live storage migration of workloads between different locations or clouds according to aspects of the present disclosure are shown.

[0029] Fig.11A , 11B 11C are timing diagrams illustrating example live migrations for a cluster control plane according to aspects of the present disclosure.

[0030] Fig.12 is a timing diagram illustrating live migration of instances for workloads according to aspects of the present invention.

[0031] Fig.13 is a timing diagram illustrating post-migration actions according to aspects of the present invention.

[0032] Fig.14 is an exemplary flow chart according to aspects of the present disclosure. DETAILED DESCRIPTION Overview

[0033] The technology generally involves modifying the environment of a cluster of nodes in a distributed computing environment. In order to reduce the risk and downtime of environmental changes involved in software upgrades or moving between locations, networks, or clouds, the system is configured to modify the environment of the cluster via live migration with phased deployment (rollout). In this regard, a second destination cluster can be created while the first source cluster is still running.

[0034] During live migration, operations are processed jointly by the source cluster and the destination cluster. In this regard, various operations and / or components may be gradually transferred from being processed by the source cluster to being processed by the destination cluster. The transfer may be a phased deployment, wherein, in each phase, a different set of operations and / or components may be transferred from the source cluster to the destination cluster. Furthermore, to mitigate damage in the event of a failure, within each phase, the transfer of operations or components from the source cluster to the destination cluster may be gradual or "canaried." Live migration may be performed on the control plane of the cluster as well as the workloads of the cluster.

[0035] For example, during live migration of a cluster control plane, traffic may be distributed between the cluster control plane of the source cluster and the cluster control plane of the destination cluster. In this regard, where the source cluster and the destination cluster operate on the same cloud, the cluster bridge aggregator may be configured to route input requests (such as API calls from user applications and / or from workloads) to the cluster control planes of both the source cluster and the destination cluster. Where the source cluster and the destination cluster operate on different clouds, particularly where one of the clouds may not support cluster migration, one or more sidecar containers may be injected into a cluster without a cluster bridge aggregator. These sidecar containers may intercept API calls and route them to a cluster with a cluster bridge aggregator for further routing / rerouting.

[0036] During live migration, the allocation of request traffic to the cluster control plane can be fixed. For example, a predetermined portion of the requests can be initially allocated to the cluster control plane of the destination cluster, while the remainder of the requests can be allocated to the cluster control plane of the source cluster. While the cluster control plane of the destination cluster is processing the predetermined portion of the requests, the destination cluster can be monitored. If no failure is detected, the allocation of requests to the cluster control plane of the destination cluster can be gradually increased until all requests are eventually allocated to the cluster control plane of the destination cluster.

[0037] The allocation of requests between the cluster control planes of the source cluster and the destination cluster may be based on predetermined rules. For example, requests may be allocated based on resource type, object type, or location. In addition, requests may be allocated in predetermined stages.

[0038] As another example, during live migration of cluster control planes, object actuation can be allocated between the cluster control plane of the source cluster and the cluster control plane of the destination cluster. To further mitigate damage in the event of a failure, the allocation of object actuation can also be fixed. For example, first, a predetermined portion of the object locks can be allocated to the controller of the destination cluster, while the remaining portion of the object is allocated to the controller of the source cluster. The destination cluster can be monitored while actuating objects locked by the predetermined portion of the object locks. If no failure is detected, or there are at least no other failures that have not occurred in the source cluster before the migration, the object locks can be allocated to the controller of the destination cluster until all objects are finally actuated by the controller of the destination cluster.

[0039] Furthermore, during live migration, a consistent data store for the cluster control plane will be maintained. In this regard, if the source cluster and the destination cluster are located in the same data center and thus share the same storage backend, the databases of the source cluster and the destination cluster can be bridged, for example, by joining the same quorum set. On the other hand, if the source cluster and the destination cluster operate in different locations or clouds such that they cannot access each other's storage backends, the databases of the source cluster and the destination cluster can be synchronized.

[0040] In addition, migrations may also be performed on workloads running in the cluster. For that matter, migrations of workloads may also be live. For example, container pods may be created in the destination cluster when new nodes are created in the destination cluster. Execution of container pods in the source cluster may be paused instead of immediately deleting the container pods in the source cluster. The state of the container pods in the source cluster may be transferred to the container pods in the destination cluster, and execution may be resumed in the container pods in the destination cluster. In addition, a global load balancer may be configured to route requests to workloads running in the source cluster and the destination cluster. In the case of workload migration between different locations or clouds, live storage migration may be performed on the workload to change the storage location of the workload.

[0041] Once all components of the cluster control plane and / or all components of the workload have been transferred to the destination cluster, and there are no other failures in the source cluster that have not occurred before the migration, the components of the source cluster can be released or deleted. However, if a failure is detected during or after the live migration, the live migration can be stopped. In addition, a rollback from the destination cluster to the source cluster can be initiated, and the components of the destination cluster can be released and deleted.

[0042] The technique is advantageous because it provides a gradual and monitored deployment process for modifying the cluster infrastructure. The phased and fixed deployment process provides more opportunities to stop the upgrade when problems arise, thereby preventing large-scale damage. The distribution of traffic (such as requests to the cluster control plane and / or requests to workloads) between the simultaneously running source and destination clusters can reduce or eliminate downtime during the upgrade. In addition, due to the traffic distribution, from the client's perspective, it may look like only one cluster exists during the live migration. If the upgrade fails, the system will provide a rollback option because the source cluster will not be deleted unless the upgrade is successfully completed. The technique also provides the feature of enabling live migration between clusters located in different locations and between clusters operating on different clouds where one of the clouds does not support live migration. Exemplary Systems

[0043] Figure 2 2 is a functional diagram illustrating an exemplary distributed system 200 on which a cluster may operate. As shown, the system 200 may include a plurality of computing devices, such as server computers 210, 220, 230, 240 coupled to a network 290. For example, the server computers 210, 220, 230, 240 may be part of a cloud computing system operated by a cloud provider. The cloud provider may further maintain one or more storages, such as storage 280 and storage 282. Further as shown, the system 200 may include one or more client computing devices, such as a client computer 250 capable of communicating with the server computers 210, 220, 230, 240 over the network 290.

[0044] The server computers 210, 220, 230, 240 and storage 280, 282 may be maintained by a cloud provider in one or more data centers. For example, as shown, the server computers 210, 220 and storage 280 may be located in a data center 260, while the server computers 230, 240 and storage 282 may be located in another data center 270. The data centers 260, 270 and / or the server computers 210, 220, 230, 240 may be separated by a considerable distance from each other, such as in different cities, states, countries, continents, etc. In addition, within a data center 260, 270, there may be one or more regions or areas. For example, the regions or areas may be logically divided based on any suitable attributes.

[0045] The cluster may operate on the distributed system 200. For example, the cluster may be implemented by one or more processors in a data center, such as by the processor 212 of the server computer 210 or by the processors 232 and 242 of the server computers 230 and 240. In addition, a storage system, such as a persistent disk (“PD”), for maintaining a persistent and consistent record of the state of the cluster may be implemented on the cloud computing system, such as in the storage 280, 282 or in the data 218, 228, 238, 248 of the server computers 210, 220, 230, 240.

[0046] The server computers 210, 220, 230, 240 may be similarly configured. For example, as shown, the server computer 210 may include one or more processors 212, a memory 214, and other components typically found in a general-purpose computer. The memory 214 may store information accessible by the processor 212, including instructions 216 that may be executed by the processor 212. The memory may also include data 218 that may be retrieved, manipulated, or stored by the processor 212. The memory 214 may be a non-temporary computer-readable medium capable of storing information accessible by the processor 212, such as a hard drive, a solid-state drive, a tape drive, an optical memory, a memory card, a ROM, a RAM, a DVD, a CD-ROM, a write-only memory, etc. The processor 212 may be a well-known processor or other lesser-known types of processors. Alternatively, the processor 212 may be a dedicated controller, such as a GPU or an ASIC, such as a TPU.

[0047] Instructions 216 may be a set of instructions directly executed by processor 212, such as computing device code, or a set of instructions indirectly executed by processor 212, such as a script. In this regard, the terms "instructions," "steps," and "programs" may be used interchangeably herein. Instructions 216 may be stored in an object code format for direct processing by processor 212, or in other types of computer languages, including scripts or collections of independent source code modules that are interpreted or precompiled on demand. The functions, methods, and routines of instructions are described in more detail in the above examples and the following exemplary methods. Instructions 216 may include any exemplary features described herein.

[0048] Data 218 may be retrieved, stored, or modified by processor 212 in accordance with instructions 216. For example, although the systems and methods are not limited to a particular data structure, data 218 may be stored in a computer register, in a relational or non-relational database as a table with a plurality of different fields and records, or as a JSON, YAML, raw, or XML document. Data 218 may also be formatted in a computer readable format, such as, but not limited to, binary values, ASCII, or Unicode. In addition, data 218 may include information sufficient to identify the relevant information, such as numbers, descriptive text, proprietary codes, pointers, references to data stored in other memories, including other network locations, or information used by a function to calculate the relevant information.

[0049] although Figure 2 The processor 212 and memory 214 are functionally illustrated as being within the same block, but the processor 212 and memory 214 may actually include multiple processors and memories that may or may not be stored within the same physical housing. For example, some instructions 216 and data 218 may be stored on a removable CD-ROM, while other instructions and data may be stored in a read-only computer chip. Some or all of the instructions and data may be stored in a location physically away from the processor 212 but still accessible to the processor 212. Similarly, the processor 212 may include a collection of processors that may or may not operate in parallel. The server computers 210, 220, 230, 240 may each include one or more internal clocks that provide timing information, which may be used for time measurement of operations and programs run by the server computers 210, 220, 230, 240.

[0050] The server computers 210, 220, 230, 240 may implement any of a number of architectures and technologies, including but not limited to direct attached storage (DAS), network attached storage (NAS), storage area network (SAN), Fibre Channel (FC), Fibre Channel over Ethernet (FCoE), hybrid fabric networks, etc. In some cases, the server computers 210, 220, 230, 240 may be virtualized environments.

[0051] The server computers 210, 220, 230, 240 and the client computer 250 may all be located at a node of the network 290 and may be able to communicate directly and indirectly with other nodes of the network 290. For example, the server computers 210, 220, 230, 240 may include a network server that is able to communicate with the client computer 250 via the network 290 so that it uses the network 290 to transmit information to an application running on the client computer 250. The server computers 210, 220, 230, 240 may also be computers in one or more load balancing server farms that can exchange information with different nodes of the network 290 to receive, process, and transmit data to the client computer 250. Although in Figure 2 Only a few server computers 210, 220, 230, 240, storage 280, 282 and data centers 260, 270 are depicted, but it should be appreciated that a typical system may include a large number of connected server computers, a large amount of storage and / or a large number of data centers, each located at different nodes of the network 290.

[0052] The client computer 250 may also be configured similarly to the server computers 210, 220, 230, 240 with a processor 252, memory 254, instructions 256, and data 258. The client computer 250 may have all components commonly used in conjunction with a personal computing device, such as a central processing unit (CPU), memory (e.g., RAM and an internal hard drive) to store data and instructions, input and / or output devices, sensors, clocks, etc. The client computer 250 may include a full-size personal computing device, or they may alternatively include a mobile computing device capable of wirelessly exchanging data with a server over a network such as the Internet. For example, the client computer 250 may be a desktop computer or a laptop computer, or a mobile phone or a device such as a wireless-enabled PDA, a tablet PC, or a netbook capable of obtaining information via the Internet, or a wearable device, etc.

[0053] The client computer 250 may include an application interface module 251. The application interface module 251 may be used to access services available to one or more server computers (such as server computers 210, 220, 230, 240). The application interface module 251 may include subroutines, data structures, object classes, and other types of software components for allowing servers and clients to communicate with each other. In one aspect, the application interface module 251 may be a software module operable in conjunction with several operating systems known in the art. The memory 254 may store data 258 accessed by the application interface module 251. The data 258 may also be stored on a removable medium, such as a disk, tape, SD card, or CD-ROM, which may be connected to the client computer 250.

[0054] Further Figure 2 As shown, client computer 250 may include one or more user inputs 253, such as a keyboard, a mouse, a mechanical actuator, a soft actuator, a touch screen, a microphone, a sensor, and / or other components. Client computer 250 may include one or more output devices 255, such as a user display, a touch screen, one or more speakers, a transducer or other audio output, a tactile interface, or other tactile feedback that provides non-visual and non-auditory information to the user. In addition, although Figure 2 Only one client computer 250 is depicted in FIG. 2 , but it should be appreciated that a typical system may service a large number of client computers located at different nodes of network 290. For example, a server computer in system 200 may run a workload for an application on a large number of client computers.

[0055] As with memory 214, storage 280, 282 may be any type of computerized storage capable of storing information accessible by one or more of server computers 210, 220, 230, 240 and client computer 250, such as a hard drive, memory card, ROM, RAM, DVD, CD-ROM, writable and read-only memory. In some cases, storage 280, 282 may include one or more persistent disks ("PDs"). In addition, storage 280, 282 may include a distributed storage system in which data is stored on multiple different storage devices that may be physically located in the same or different geographic locations. Storage 280, 282 may be, for example, Figure 2 The computer 210 is shown connected to the computing device via a network 290 and / or may be directly connected to any of the server computers 210 , 220 , 230 , 240 and the client computer 250 .

[0056] The server computers 210, 220, 230, 240 and the client computer 250 are able to communicate directly and indirectly, such as through the network 290. For example, using Internet sockets, the client computer 250 can connect to a service running on a remote server computer 210, 220, 230, 240 through the Internet protocol suite. The server computer 210, 220, 230, 240 can set up a listening socket that can accept initiated connections for sending and receiving information. The network 290 and intermediate nodes can include various configurations and protocols, including the Internet, the World Wide Web, an intranet, a virtual private network, a wide area network, a local area network, a private network using a communication protocol dedicated to one or more companies, Ethernet, WiFi (e.g., 802.81, 802.81b, g, n or other such standards) and HTTP, as well as various combinations of the above. Such communication can be facilitated by devices capable of sending data to and from other computers, such as modems (e.g., dial-up, cable or fiber optic) and wireless interfaces.

[0057] Figure 3 is a functional diagram illustrating an exemplary distributed system 300 on which live cluster migration can be performed. The distributed system 300 includes a first cloud 310 and a second cloud 320. As shown, the cloud 310 can include server computers 210, 220, 230, 240 in data centers 260, 270 and storage 280, 282 connected to a network 290. One or more client computers, such as client computer 250, can connect to the network 290 and use services provided by the cloud 310. In addition, as shown, the cloud 320 can similarly include computing devices such as server computers 332, 334 organized in one or more data centers such as data center 330 and one or more memories such as storage 380 connected to the network 390. One or more client computers such as client computer 350 can connect to the network 390 and use services provided by the cloud 320. Although in Figure 3 Only a few server computers, data centers, storage, and client computers are depicted, but it should be understood that a typical system may include a large number of connected server computers, a large number of data centers, a large number of storages, and / or a large number of client computers, all located at different nodes of the network.

[0058] Cloud 310 and cloud 320 may be operated by different cloud providers. In this way, cloud 310 and cloud 320 may have different configurations, so that clusters operating on cloud 310 and cloud 320 run in different software environments. In addition, clusters hosted by cloud 310 and cloud 320 may or may not share any storage backend, be connected to the same network, or be located in the same physical location. In this way, clusters on cloud 310 and cloud 320 may not be able to modify or even access resources, software components, and / or configurations to each other. In some cases, one or both of cloud 310 and cloud 320 may be self-managed by the user.

[0059] Live cluster migration in distributed system 300 may occur in any of a number of ways. For example, while a cluster is running in data center 260, a cloud provider of cloud 310 may introduce a software upgrade for a cloud control plane, a cluster control plane running on a master node, or a worker node. In this way, a migration may be performed on objects in the cluster to a destination cluster created in data center 260 that complies with the software upgrade. In this case, the migration is within the same data center 260, on the same network 290, and in the same cloud 310.

[0060] As another example, live cluster migration may include moving between physical locations. For example, a cloud provider for cloud 310 may be relocating resources, or a developer of an application running on a cluster may want to move to another location, etc. Thus, a migration may be performed on objects in a cluster in data center 260 to a destination cluster created in data center 270. In this case, the migration may still be within the same network 290 and the same cloud 310.

[0061] However, sometimes, a user may wish to switch from using one cloud that may be self-managed or operated by one cloud operator to another cloud operated by another cloud operator. For example, a live migration may be performed on objects in a cluster on cloud 320 to a destination cluster created in cloud 310. In addition to changing clouds, such migration may also involve changes in networks and / or changes in regions in some cases.

[0062] As further explained in the examples below, for migration between clouds, one or both of cloud 310 and cloud 320 may be configured with features for performing live cluster migration. For example, where both cloud 310 and cloud 320 include features for performing live cluster migration, these features may together facilitate live cluster migration. Where cloud 310 includes features for performing live cluster migration and cloud 320 does not include features for performing live cluster migration, cloud 310 and the migration cluster on cloud 310 may use other tools and methods to facilitate migration that are not suitable for cloud 320 and the migration cluster on cloud 320.

[0063] Figure 4 is a functional diagram illustrating an exemplary cluster 400. For example, a user such as a developer may use Figure 2 The client computer 250 of the cloud (such as Figure 3 The container orchestration architecture provided by the cloud 310 of the embodiment of the present invention can be configured to package various services of the application into containers. The container orchestration architecture can be configured to allocate resources to the containers, load balance services provided by the containers, and scale the containers (e.g., by replication and deletion).

[0064] like Figure 4 As shown, the container orchestration architecture can be configured as a cluster 400, which includes one or more master nodes (such as master node 410) and multiple worker nodes (such as worker node 420 and worker node 430). Each node of cluster 400 can run on a physical machine or a virtual machine. Cluster 400 can run on a distributed system such as system 200. For example, the nodes of cluster 400 can be Figure 2 The master node 410 runs on one or more processors in the data center 260 shown. The master node 410 can control the worker nodes 420, 430. The worker nodes 420, 430 may include containers for computer code and program runtimes that form part of a user application.

[0065] As further shown, in some cases, the containers may be further organized into one or more container pods. Figure 4 As shown, worker node 420 may include containers 421, 423, 425, wherein containers 423 and 425 are organized into container pod 427, and worker node 430 may include containers 431, 433, 435, wherein containers 431, 433 and 433 are organized into container pod 437. The containers and container pods of the worker nodes may have various workloads running on them, for example, these workloads may provide content for a website or process of an application. The container pod may belong to a "service", which exposes the container pod to network traffic from users of the workload (such as users of an application or visitors to a website). One or more load balancers may be configured to distribute traffic (e.g., requests from a service) to workloads running on cluster 400. For example, traffic may be distributed between container pods in the worker nodes of cluster 400.

[0066] Additionally, some nodes, such as worker nodes 420, may be logically organized as part of a node pool, such as node pool 429. For example, a node pool may be a group of nodes that share one or more attributes, such as memory size, attached CPU / GPU, etc. In some cases, all nodes of a node pool may be located in the same location of the cloud, which may be the same data center, the same region / area within a data center, etc.

[0067] The master node 410 may be configured to manage the workload and resources of the worker nodes 420, 430. In this regard, the master node 410 may include various software components or processes that form part of the control plane of the cluster. For example, as shown, the master node 410 may include an API server 440, a database 470, a controller manager 480, and a scheduler 490 that communicate with each other.

[0068] Although only one master node 410 is shown, the cluster 400 may additionally include multiple master nodes. For example, the master node 410 may be replicated to generate multiple master nodes. The cluster 400 may include multiple cluster control plane processes. For example, the cluster 400 may include multiple API servers, multiple databases, and the like. In these cases, an arbitration set of replica master nodes, such as a majority of replica master nodes, must agree that the cluster 400 modifies any state of the cluster 400. In addition, one or more load balancers may be provided on the cloud where the cluster 400 runs to distribute requests, such as API calls, between multiple API servers. Even when one or more master nodes fail, multiple master nodes may improve the performance of the cluster 400 by continuing to manage the cluster 400. In some cases, multiple master nodes may be distributed to different physical and / or virtual machines.

[0069] The API server 440 may be configured to receive requests, such as input API calls from user applications or from workloads running on worker nodes, and manage worker nodes 420, 430 to run workloads for processing these API calls. As shown, the API server 440 may include multiple servers, such as a built-in resource server 460 and an extension server 462. In addition, as shown, the API server 440 may include an aggregator 450 configured to route input requests to the appropriate server of the API server 440. For example, when an API call comes from a user application, the aggregator 450 may determine whether the API call is processed by a built-in resource of the cloud or by an extended resource. Based on this determination, the aggregator 450 may route the API call to the built-in resource server 460 or the extension server 462.

[0070] API server 440 can configure and / or update objects stored in database 470. API server 440 can process according to a pattern, which can include a format that API objects in the cluster must follow in order to be understood, served, and / or stored by other components of the cluster (including other API servers in the cluster). Objects can include information about containers, container groups, replication components, etc. For example, API server 440 can be configured to be informed of changes in the status of various items in cluster 400, and based on these changes, update objects stored in database 470. In this way, database 470 can be configured to store configuration data for cluster 400, which can be an indication of the overall state of cluster 400. For example, database 470 can include multiple objects, which can include one or more states, such as intent and state. For example, a user can provide configuration data, such as a desired state of cluster 400.

[0071] The API server 440 may be configured to provide the intent and state of the cluster 400 to the controller manager 480. The controller manager 480 may be configured to run a control loop to drive the cluster 400 to a desired state. In this regard, the controller manager 480 may monitor the state shared by the nodes of the cluster 400 through the API server 440, and make changes that attempt to move the current state toward the desired state. The controller manager 480 may be configured to perform any of a number of functions, including managing nodes (such as initializing nodes, obtaining information about nodes, checking for unresponsive nodes, etc.), managing replication of containers and container groups, etc.

[0072] API server 440 can be configured to provide the intent and state of cluster 400 to scheduler 490. For example, scheduler 490 can be configured to track resource usage on each worker node to ensure that workloads are not scheduled in excess of available resources. To this end, scheduler 490 can be provided with resource requirements, resource availability, and other user-provided constraints and policy instructions, such as quality of service, affinity / anti-affinity requirements, data location, etc. In this way, scheduler 490 can act to match resource supply with workload demand.

[0073] The API server 440 may be configured to communicate with the worker nodes 420, 430. For example, the API server 440 may be configured to ensure that the configuration data in the database 470 matches the configuration data of the containers (such as containers 421, 423, 425, 431, 433, 435) in the worker nodes 420, 430. For example, as shown, the API server 440 may be configured to communicate with the container manager (such as container manager 422, 432) of the worker node. The container manager 422, 432 may be configured to start, stop and / or maintain the container based on instructions from the master node 410. For another example, the API server 440 may also be configured to communicate with the agent (such as agent 424, 434) of the worker node. The agent 424, 434 may be configured to manage routing and streaming (such as TCP, UDP, SCTP), such as via a network or other communication channel. For example, the agent 424, 434 may manage the streaming of data between the worker nodes 420, 430.

[0074] Figure 5 Some exemplary components of two clusters involved in live migration are shown. Figure 5 A first cluster 400 is shown as a source cluster from which objects are to be migrated, and a second cluster 500 is shown as a destination cluster to which objects are to be migrated. Figure 5 Clusters 400 and 500 are further shown with replicated master nodes, and thus clusters 400 and 500 are both shown with multiple API servers 440, 442, 540, 542 and corresponding aggregators 450, 452, 550, 552. Although for ease of illustration, Figure 5 Only two copies are shown in , but it should be appreciated that any of many copies may be generated.

[0075] The destination cluster 500 runs in a different environment than the source cluster 400. Figure 3 As mentioned above, different environments can be different software versions, different physical locations of data centers, different networks, different cloud control planes on different clouds, etc. Instead of deleting the source cluster and creating the destination cluster to change such as Figure 1A -B shows an environment in which the environment change can be performed by live migrating various objects from the source cluster 400 to the destination cluster 500 while the clusters 400 and 500 are still running.

[0076] During live migration, requests to the cluster control plane may be distributed between the source cluster 400 and the destination cluster 500. For example, traffic such as API calls may be distributed between the API servers 440, 442 of the source cluster 400 and the API servers 540, 542 of the destination cluster 500. As described in detail below, this may be accomplished by modifying the aggregators 450, 452, 550, 552 (see Figure 6 ) or add a component that intercepts API traffic (see Figure 7 ). In addition, to process API calls routed to cluster 400, cluster 400 may run controller 580 to manage resources in cluster 400, such as managing worker nodes and object replication. Similarly, to process API calls routed to cluster 500, cluster 500 may run controller 582 to manage resources in cluster 500.

[0077] As described in detail below, live migration between clusters 400 and 500 may include processing objects stored for the cluster control plane in database 470 and database 570. For example, if clusters 400 and 500 are in the same data center and therefore share the same storage backend, database 470 and database 570 may be bridged. On the other hand, if clusters 400 and 500 are located in different locations or clouds such that they cannot access each other's storage backends, then database 470 and database 570 may need to be synchronized (see Figure 8 ).

[0078] In addition to the migration of the cluster control plane, live migration can also be performed on workloads running in the cluster (such as workload 581 running on the source cluster 400 and workload 583 running on the destination cluster). The source cluster 400 and the destination cluster 500 can be migrated between, for example, by using a global load balancer (see Fig. 9 ), routing requests to the workload (such as API calls to the workload). In addition, migration across different locations or different clouds may require changing the location used to store the workload (see Fig.10 ).

[0079] Further Figure 5As shown, the orchestrator 590 may be provided, for example, by a cloud provider of the cloud 310, and may include various rules for implementing live migration. In this regard, if the migration is within the same cloud such as the cloud 310, both the source cluster 400 and the destination cluster 500 may perform the migration based on the rules set in the orchestrator 590. On the other hand, if the migration is between two different clouds (such as the cloud 310 and the cloud 320), in some cases, only the clusters in the same cloud as the orchestrator 590 may be able to follow the rules set in the orchestrator 590. For example, the destination cluster 500 may be on the cloud 310 and may be able to perform live migration based on the rules set in the orchestrator 590; while the source cluster 400 may be on the cloud 320 that is self-managed or managed by a different cloud, and may not have the necessary features to follow the rules set in the orchestrator 590. Therefore, the cloud 310 may include other features that facilitate migration from or to the cloud 320.

[0080] Regarding live migration of the cluster control plane, Figure 6 An exemplary cluster bridge aggregator is shown that is configured to route requests, such as API calls, between control planes of two clusters during live migration within the same cloud. Figure 6 A first cluster 400 is shown as a source cluster from which objects are to be migrated, and a second cluster 500 is shown as a destination cluster to which objects are to be migrated. In this example, both the source cluster 400 and the destination cluster 500 are hosted on the same cloud, such as cloud 310. Figure 6 Clusters 400 and 500 are further shown with replicated master nodes, and thus, clusters 400 and 500 are both shown with multiple API servers 440 , 442 , 540 , 542 and corresponding cluster bridge aggregators 650 , 652 , 654 , 656 .

[0081] One or more load balancers may be configured to distribute input requests, such as API calls, among various API servers based on traffic volume. For example, a load balancer may be associated with all API servers of a cluster, such as by the network address of the API server. However, the load balancer may be configured to provide clients of the cluster (such as applications running in the cluster) with a single network address for sending all API calls. For example, the single network address may be a network address assigned to the load balancer. When the load balancer receives an input API call, the load balancer may then route the API call based on traffic volume. For example, the load balancer may divide the API calls among the API servers of the cluster and send the API calls based on the network addresses of the API servers.

[0082] As further shown, the aggregators in the source cluster 400 and the destination cluster 500 are modified to cluster bridge aggregators 650, 652, 654, 656. The cluster bridge aggregators 650, 652, 654, 656 are configured to receive input requests, such as API calls, from the load balancer 610, and further route the requests to the API servers 440, 442, 540, 542. For example, the control plane of the cloud 310 (e.g., through the orchestrator 590) can notify the cluster bridge aggregators 650, 652, 654, 656 when to initiate the migration. Once the cluster bridge aggregators 650, 652, 654, 656 know about the migration, the cluster bridge aggregators 650, 652, 654, 656 can determine whether the input API call should be processed by the source cluster 400 or the destination cluster 500. Based on this determination, the cluster bridge aggregator 650, 652, 654, 656 may route the API call to the appropriate API server.

[0083] For example, if an API call arrives at the cluster bridge aggregator 650 of the source cluster 400, the cluster bridge aggregator 650 may determine whether the API call should be processed by the API server of the source cluster 400 or the API server of the destination cluster 500. If the cluster bridge aggregator 650 determines that the API call will be processed by the API server of the source cluster 400, the cluster bridge aggregator 650 may route the API call to the corresponding API server 440. Otherwise, the cluster bridge aggregator 650 may reroute the API call to the API server of the destination cluster 500. Similarly, if the API call arrives at the cluster bridge aggregator 654 of the destination cluster 500, the cluster bridge aggregator 654 may determine whether the API call should be processed by the destination cluster 500 or the source cluster 400. If the cluster bridge aggregator 654 determines that the API call will be processed by the destination cluster 500, the cluster bridge aggregator 654 may route the API call to the corresponding API server 540. Otherwise, the cluster bridge aggregator 654 may route the API call to the API server of the source cluster 400. Since the API servers of the source cluster 400 and the API servers of the destination cluster 500 can implement different modes for the objects they process, a change in API traffic distribution can effectively change the portion of objects that conform to the mode of the destination cluster 500 .

[0084] The cluster bridge aggregators 650, 652, 654, 656 can route or reroute API calls based on any of a number of factors. For example, routing can be based on resource types such as container pods, services, and the like. For example, the cluster bridge aggregators 650, 652 can route API calls for all container pods to the API servers 440, 442 in the source cluster 400, and reroute API calls for all services to the destination cluster 500. Routing can alternatively be based on object type. For example, the cluster bridge aggregators 650, 652 can route 50% of the API calls for container pod objects to the API servers 440, 442 in the source cluster 400, and reroute the remaining API calls to the destination cluster 500. As another alternative, routing can be based on the physical location of the resource. For example, the cluster bridge aggregators 650, 652 can route 30% of the API calls for container pods in a particular data center, and then reroute the remaining API calls to the destination cluster 500. Other exemplary factors may include user agents, user accounts, user groups, the location of the sender of the request, and the like. Factors for API call routing may be set in the coordinator 590 by the cloud provider of the cloud 310 .

[0085] The cluster bridge aggregators 650, 652, 654, 656 may route or reroute API calls in a phased manner. For example, the cluster bridge aggregators 654, 656 may begin routing API calls for one resource type to the API servers 540, 542 of the destination cluster 500 in one phase, and then, in the next phase, change to include routing API calls for another resource type to the API servers 540, 542 of the destination cluster 500, etc. Alternatively, the cluster bridge aggregators 654, 656 may begin routing API calls for one physical location to the API servers 540, 542 of the destination cluster 500 in one phase, and then, in the next phase, change to include routing API calls for another physical location to the API servers 540, 542 of the destination cluster 500, etc. As another example, the cluster bridge aggregators 654, 656 may route API calls to the API servers 540, 542 in increasing proportions, such as routing API calls for 10% of the container pod objects to the API servers 540, 542 of the destination cluster 500 in one stage, and routing API calls for 20% of the container pod objects to the API servers 540, 542 of the destination cluster 500 in the next stage, etc. The stages of API call routing may be set in the orchestrator 590 by the cloud provider of the cloud 310.

[0086] To determine whether it is a routing or rerouting request, information about the assignment to be made can be provided to the cluster bridge aggregators 650, 652, 654, 656. For example, the cluster bridge aggregators 650, 652, 654, 656 can be configured to access one or more databases, such as the database 570 of the destination cluster 500, to allocate a portion of the traffic to the source cluster 400 and to the destination cluster 500. Thus, when an API call arrives at, for example, the cluster bridge aggregator 654, the cluster bridge aggregator 654 can calculate a hash value for the API call based on the portion (0 < F < 1) of the API call to be allocated to the destination cluster 500. The hash value can be further calculated based on other information of the API call, such as the IP address of the source of the API call and the metadata of the API call. This information can be used to determine the resource type, object type, physical location, etc. relevant in the above phased deployment process. In some examples, the hash value can also be interpreted as a fractional numerical value p between 0 and 1. If p < F, the cluster bridge aggregator 654 can route the API call to the destination cluster 500, otherwise, the cluster bridge aggregator 654 can route the API call to the source cluster 400. The decision based on the hash value can be defined deterministically such that no matter which cluster bridge aggregator involved in the migration receives the API call, it will make the same decision as other cluster bridge aggregators. In this way, there is no need to reroute the API call multiple times. In some cases, different fractions F can be set during the transition of the above phased deployment, such as different resources, different physical locations, etc.

[0087] In addition, the cluster bridge aggregator can be further configured to allocate other resources between the two clusters. For example, compared to the controller used by the source cluster 400, the destination cluster 500 can use a different controller to run the control loop. Thus, the switch between the controller of the source cluster and the controller of the destination cluster can also be performed in a phased deployment. For example, to ensure that inconsistent changes are not made to the object, the controller can acquire a lock before operating on the object. Thus, the cluster bridge aggregators 650, 652, 654, 656 can be configured to allocate the controller lock between the controller of the source cluster 400 and the controller of the destination cluster 500. The allocation can also be performed at a predetermined stage, which can be fixed.

[0088] Figure 6 The API servers 440, 442, 540, 542 and the cluster bridge aggregators 650, 652, 654, 656 in basically form a logical API service together. Thus, a client of this logical API service can send requests to this logical API service, and these requests will be routed by various cluster bridge aggregators and processed by various API servers. For the client, there may be no other observable differences except for possible latency.

[0089] However, if the first source cluster 400 and the second destination cluster 500 are hosted on different clouds, a cluster bridge aggregator may not be provided for one of the source cluster 400 or the destination cluster 500. Figure 7 Other components that intercept requests (such as API calls) to the cluster control plane when performing a live cluster migration between two different clouds are shown. In the example shown, the destination cluster 500 is on a cloud 310 that is configured to perform live migrations, while the source cluster 400 is on a cloud 320 that is either self-managed or managed by a different cloud provider that is not configured to perform live migrations. Thus, as described above, the destination cluster 500 on cloud 310 is provided with cluster bridge aggregators 654, 656, while the source cluster 400 on cloud 320 is provided with aggregators 450, 452 that cannot route and reroute API calls between clusters.

[0090] Since the two clusters here are located on different clouds, Figure 6 The same load balancer 610 shown receives the request (such as an API call). Instead, the API call will be routed to the cluster bridge aggregators in the source cluster 400 and the destination cluster 500 based on their different network addresses (such as IP addresses).

[0091] Further Figure 7 As shown, since cluster 400 does not include a cluster bridge aggregator, a sidecar container can be injected into a container pod on cloud 320 to intercept requests, such as API calls to a local API server in cluster 400, and reroute them to cluster bridge aggregators 654, 656 in destination cluster 500. For example, the sidecar container can be injected by an extension installed by a user on the cloud control plane of cloud 320. The sidecar container can be injected into each workload container pod running in source cluster 400. For example, as shown, sidecar container 720 is injected into container pod 710 in cluster 400. Sidecar container 720 can be configured to intercept API calls from workload 730 running in container pod 710, to API server 440 or 442, and simulate a cluster bridge aggregator that does not exist in source cluster 400. It accomplishes this simulation simply by redirecting these API calls to cluster bridge aggregators 654, 656 in destination cluster 500. The cluster bridge aggregator 654, 656 can then determine whether these API calls should be processed locally by the API server 540, 542, or whether they should be sent back to the API server 440, 442 of the source cluster. The cluster bridge aggregator 654, 656 can refer to the above Figure 6 Decisions are made and API calls are routed accordingly.

[0092] Figure 7 The API servers 440, 442, 540, 542, aggregators 450, 452, sidecar container 712, cluster bridge aggregators 654, 656 in FIG. 4 essentially form a logical API service together. Thus, a client of the logical API service can send a request to the logical API service, and the request can be intercepted by the sidecar container 720, and / or routed by various cluster bridge aggregators, and processed by various API servers. For the client, there may be no other observable difference except for possible latency.

[0093] As an alternative to injecting a sidecar container as described above, other components or processes can be used to intercept and reroute requests. For example, Domain Name Service (DNS) entries can be injected into the node to reroute to the cluster bridge aggregator of the destination cluster.

[0094] return Figure 5 , with respect to storage of the cluster control plane, in the case where source cluster 400 and destination cluster 500 are on the same cloud and in the same data center, database 570 can join the same arbitration set as database 470. In this way, a database arbitration set including database 470 or database 570 must reach an agreement before an object is modified or written to any database arbitration set. For example, an agreement can be reached when a majority of database replicas agree on a change. This ensures that database 570 and database 470 and their replicas reflect consistent changes. In some examples, database 570 can first join as a non-voting member of a database arbitration set and then become a voting member of the arbitration set.

[0095] However, if the source cluster 400 and the destination cluster 500 are not on the same cloud or the same data center, the database 570 may not be able to join the quorum set of the database 470. Figure 8 An exemplary cluster control plane storage synchronization during live migration for clusters on different clouds and / or regions is shown. For example, a first source cluster 400 may be on cloud 320, and a second destination cluster 500 may be on cloud 310. As another example, destination cluster 500 may be in data center 260, and source cluster 400 may be in data center 270.

[0096] In a containerized environment, some fields of an object can only be modified by an API server, otherwise they are immutable. Therefore, once the immutable fields of an object are written or modified by an API server (such as API server 440 or 442) of the source cluster 400, the API server (such as API server 540 or 542) of the destination cluster 500 may not be able to modify these fields stored in the database 470 of the source cluster 400. Therefore, as shown, for example, when an API call enters the cluster bridge aggregator 654 to request the creation of a new object or the modification of an immutable field, the API call can be modified by the cluster bridge aggregator 654 and first sent to the source cluster 400, such as to the aggregator 450. The API server 440 can create or modify the object 810 stored in the database 470 according to the modified API call.

[0097] The cluster bridge aggregator 654 may then use its local API server 540 to create its own copy of the object 810 in the database 470, such as shown as object 820 in the database 570. For example, the cluster bridge aggregator 654 may read the immutable fields with values ​​selected by the API server 440 of the source cluster 400 and write those values ​​to the object 820.

[0098] In some cases, the cluster bridge aggregator 654, 656 can block read-only operations on an object while write operations are being performed on the object to ensure that the API caller sees a consistent view of the world. Otherwise, the API caller can only observe the changed portion of the execution because, as described above, writing in this migration environment can be a multi-step process. In addition, API callers have expectations of the concurrency model of the API server that need to be maintained by a process that is transparent to these callers.

[0099] On the other hand, migration can also be performed for workloads running in the cluster. Fig. 9 Exemplary features involved in performing workload migration are shown. For example, a first source cluster 400 is shown having a node pool 429, which includes nodes 910, 912, 914. One or more container pods can be running in the nodes of cluster 400, such as container pod 920 and container pod 922 shown. Cluster 400 can further include a local load balancer 930 for distributing traffic to workloads in cluster 400. For example, requests from websites or applications served by the workload can be received by local load balancer 930, and local load balancer 930 can distribute these requests to various container pods and nodes in node pool 429. For example, the website or application served by the workload of cluster 400 can be configured with a domain name service (DNS) record that associates the website or application with the network address of local load balancer 930.

[0100] As further shown, the workload within cluster 400 will be migrated to a second destination cluster 500. Cluster 500 can be initialized with a node pool 940 that does not have any nodes and a local balancer 970 that distributes input requests to workloads as long as container pods and nodes are created in cluster 500. Migration from cluster 400 to cluster 500 can be performed on node pool 429 from the same location (such as within the same data center or within the same region / region of the data center), or it can be migrated between different locations. Migration can also be performed within the same cloud or between different clouds. Although clusters 400 and 500 are shown as having only one node pool, in actual examples, clusters 400 and 500 may include multiple node pools. In the case where the cluster has not yet grouped nodes into node pools, each node can be treated as its own node pool during migration, or nodes of similar size can be grouped together, etc.

[0101] Once the destination cluster 500 is initialized, the size of the node pool 940 can be gradually increased. For example, a new node 950 can be allocated in the node pool 940. The new node 950 may not initially include any container pods. In response to the increase in the size of the node pool 940, the size of the old node pool 429 can be reduced. For example, the old node 910 can be deleted. The allocation of new nodes and the deletion of old nodes can be performed by the cloud provider according to the instructions of the coordinator.

[0102] The cluster control plane of the source cluster 400 and / or the destination cluster 500 can be informed that the node 910 is now lost, and all container pods (such as the container pods 920 and 922 shown) that previously existed in the node 910 are registered as lost. In this way, the cluster control plane of the destination cluster 500 can create a replacement container pod in the new node pool 940. For example, the controller of the destination cluster 500 can determine that the new node 950 in the node pool 940 has capacity, and can create a replacement container pod in the new node 950, such as the replacement container pods 960 and 962 shown. Therefore, effectively, the container pods 920, 922 are moved to the second cluster as container pods 960, 962. This can be repeated for other nodes in the node pool 429, such as, as shown, creating new nodes 952 and 954 corresponding to nodes 912, 914 in the node pool 940, and replacing any lost container pods, until the node pool 429 no longer has any nodes and / or container pods.

[0103] As an alternative to deleting node 910 and adding node 950 before moving any container pods, a live migration can be performed. For example, as soon as a new node 950 is created, node 910 can be "isolated" so that new container pods are prevented from being scheduled on node 910. Then, a new container pod 960 is created in node 950. The state of container pod 920 can be recorded and sent to container pod 960. Then, the execution of processes in container pod 920 can be suspended. If any changes have been made to container pod 920 since the state was recorded, these changes can also be copied to container pod 960. The suspended execution can then be resumed in container pod 960. Container pod 920 can then be deleted. During this live migration, traffic directed to container pod 920 (e.g., requests for workloads) can be forwarded to container pod 960 until container pod 920 is deleted. For example, the load balancer may have directed requests to container pod 920 before knowing the newly created container pod 960. This operation may be repeated for each container pod in each node and node pool of the source cluster 400 until no container pod remains.

[0104] In addition, the migration of workloads may include the migration of services to which the container pods belong in addition to the migration of container pods. The migration of services may overlap with the migration of container pods. For example, as long as one or more container pods are created in the destination cluster 500, services previously handled by the container pods of the source cluster 400 may be migrated to be handled by the container pods in the destination cluster 500. In addition, the migration of services may need to be completed before there are no more container pods in the source cluster 400 to handle the services.

[0105] In this regard, one or more global load balancers may be created. For example, as soon as workload node and container pod migration is initiated but before any nodes are moved, the source cluster 400 and the destination cluster 500 may both be associated with one or more load balancers, which are configured to route requests to the workload 400 running in the source cluster 400 and the destination cluster 500. For example, as shown, both the local load balancer 930 and the local load balancer 970 may be associated with the global load balancer 980. Therefore, if the source cluster 400 and the destination cluster 500 are located in different locations or clouds, the global load balancer 980 may be configured to route requests to these different locations or clouds. A website or application previously served by the workload of cluster 400 may be configured with a DNS record that associates the website or application with the network address of the global load balancer 980, rather than the previous association with the local load balancer 930. Similarly, as soon as workload node and container pod migration begins, requests from the website or application may be routed to the local load balancers 930 and 970 via the global load balancer 980.

[0106] Once the workload nodes and container pods are migrated, the association between the local load balancer 970 and the global load balancer 980 can be removed. In addition, the website or application previously served by both cluster 400 and cluster 500 can be configured with a DNS record that associates the website or application with the network address of the local load balancer 970. Therefore, from now on, the local load balancer 970 can be configured to route requests from the website or application to the workload running only in the destination cluster 500.

[0107] In addition, in Fig. 9 The migration of workloads shown is between different locations or between different clouds, where it may be necessary to perform live migration of workload storage. Fig.10 1 shows real-time workload storage migration between different locations or clouds. For example, real-time workload storage migration can be used with Fig. 9 The migration of the container pods shown occurs simultaneously. A storage system for a containerized environment can include various objects that store data. For example, a storage system can include a persistent disk provided by a cloud provider and a metadata object that contains a reference. For example, a metadata object can be used to set up or "mount" a persistent disk for a container pod or container. As some examples, the metadata object can include a persistent volume that references data on a persistent disk, and a persistent volume application that references the persistent volume and stores information about the use of that data by a container or container pod.

[0108] When migration is performed between different locations or clouds, metadata objects may be replicated to the destination environment, but persistent disks may not be replicated to the destination environment. Therefore, live migration of storage systems for workloads can be performed by tracking the location of each persistent disk, replicating metadata objects in the destination environment, and replicating data using a copy-on-write system.

[0109] For example, as shown, when the container pod 920 is running in the first source cluster 400, it may have an already existing metadata object 1010, which may reference the persistent disk 1012. To make an effective copy of these storage objects, a helper container pod 1030 may be created in the source cluster 400 and attached to the metadata object 1010. The helper container pod 1030 may be configured to read from the persistent disk 1012 after the container pod 920 is migrated to the second destination cluster 500 as a container pod 960.

[0110] Then, the migrated container pod 960 is attached to a node in the destination cluster 500 and a newly created metadata object 1020, which may be a copy of the metadata object 1010. It may be determined that the metadata object 1020 of the migrated container pod 960 includes a reference to the persistent disk 1012. To set up storage for the migrated container pod 960, the storage driver 1050 may determine that the persistent disk 1012 is in a different cluster. In this way, a new persistent disk 1022 may be created in the destination cluster 500.

[0111] However, the container pod 960 may initially perform reads and / or writes through the storage driver 1050, rather than directly attaching to the new persistent disk 1022, which may determine that the container pod 960 and the metadata object 1020 are referencing persistent disks at two different locations. For example, the storage driver 1050 may operate as Fig. 9 The storage driver 1050 may be configured to access the old persistent disk 1012 and access the new persistent disk 1022, for example, via network access to the helper container pod 1030.

[0112] For example, to read, container pod 960 may use storage driver 1050 to read from new persistent disk 1022. In addition, storage driver 1050 may also call helper container pod 1030, which may read from persistent disk 1012.

[0113] For writing, the container pod 960 may also do so through the storage driver 1050. The storage driver 1050 may be configured to direct all writes to the persistent disk 1022. In this way, any new changes are written to the new persistent disk 1022. Writing may be performed via copy-on-write, where changes are written directly to the new persistent disk 1022 while unchanged data is copied from the old persistent disk 1012.

[0114] In addition, the migration can be performed in the background to gradually move all data from the storage objects in the source cluster 400 to the destination cluster 500. For example, when the network is not busy, the storage driver 1050 can continue to read data from the persistent disk 1012 and then write the data to the persistent disk 1022. Once all the data is copied, the persistent disk 1022 will contain a complete file system, and the container pod 960 can be directly attached to the persistent disk 1022 without the storage driver 1050. The old persistent disk 1012 can be deleted. In this process, from the perspective of the container pod 960, there is no other difference except possible delays.

[0115] although Fig.10A single metadata object is shown between a container pod and a persistent disk, but in some examples there may be multiple metadata objects that reference each other, forming a reference chain. For example, a container pod may reference a persistent volume application, which may reference a persistent volume, which may then reference a persistent disk. Exemplary Methods

[0116] Following the above exemplary system, an exemplary method is now described. Such a method can be performed using the above system, its improvements, or any of a plurality of systems with different configurations. It should be understood that the operations involved in the following method do not have to be performed in the exact order described. Instead, various operations can be processed in different orders or simultaneously, and operations can be added or omitted.

[0117] For example, Fig.11A -C is a timing diagram illustrating an exemplary live cluster migration for a cluster control plane. Fig.11A -C shows various actions occurring at the source master node 1111 in the first source cluster, the destination master node 1112 in the second destination cluster, the logical API service 1113, and the coordinator 1114. The source master node 1111 and the destination master node 1112 can be as follows Figure 4-7 Although only one source master node 1111 and only one destination master node 1112 are shown, Figure 4-7 As shown, there may be any number of master nodes in one or both of the source and destination clusters. The logical API service 1113 may be a quorum set of API servers for one or more clusters, including Figure 4-6 aggregator and / or cluster bridge aggregator as shown, and / or Figure 7 The sidecar container shown. The timing diagram can be run on the system, such as through Figure 2 or Figure 3 One or more processors are shown executing.

[0118] refer to Fig.11A Initially, the source master node 1111 of the source cluster may already be running on the cloud. In this way, the source master node 1111 has been attached to the PD, and the API server of the source master node 1111 may already be a member of the logical API service 1113.

[0119] At some point, the cloud or the user's cloud provider may initiate an environment change, such as introducing a software upgrade, moving to another data center, moving to or from a different cloud, etc. The cloud provider may further define rules for live migration to implement the environment change in the orchestrator 1114, and the orchestrator 1114 may instruct the logical API service 1113 to implement the rules. For example, the rules may include factors for workload traffic distribution and migration phases.

[0120] Once the environment change is initiated, the destination master node 1112 may be created and attached to the PD. To maintain changes consistent with the source master node 1111, one or more databases of the destination master node 1112 may be bridged or synchronized with one or more databases of the source master node 1111. For example, where the source master node 1111 and the destination master node 1112 are located in the same cloud and location, the database of the destination master node 1112 may join the same quorum set as the database of the source master node 1111. Where the source master node 1111 and the destination master node 1112 are located in different clouds or locations, the database of the destination master node 1112 may be synchronized with the database of the source master node 1111, as shown in FIG. Figure 8 shown.

[0121] At this point, the destination master node 1112 can start running, while the source master node 1111 continues to run. Figure 1A and 1B Compared to the process shown in FIG. 1 , downtime can be reduced or eliminated. In order to simultaneously process requests to the cluster control plane, such as API calls, the API server of the destination master node 1112 can join the logical API service 1113. For example, the API server of the destination master node 1112 can be as follows: Figure 6 As shown, the logical API service 1113 is added via the cluster bridge aggregator, or it can be as shown Figure 7 Create a sidecar container pod as shown.

[0122] Once the coordinator 1114 observes the API server of the destination master node, the coordinator 1114 can start a phased deployment to change the environment. Fig. 11B , which shows an exemplary phased deployment of API traffic from a source cluster to a destination cluster. As shown, the coordinator 1114 can instruct the logical API service 1113 to implement phased traffic distribution between the API server of the source master node 1111 and the API server of the destination master node 1112. API traffic distribution can be performed using Figure 6 The cluster bridge aggregator shown and / or using Figure 7 One or more sidecar container implementations shown, since the API servers of the source cluster and the destination cluster can process objects based on different modes, as API traffic is increasingly routed to the API server of the destination master node 1112, the destination mode for objects in the destination environment is gradually deployed.

[0123] like Fig. 11BAs shown, during the deployment phase, the input API call can be routed to the API server of the destination master node 1112 and the API server of the source master node 1111 via the logical API service 1113. The coordinator 1114 can set a predetermined ratio for the distribution of API traffic. In the specific example shown, initially, 1% of the received API calls can be processed by the API server of the destination master node 1112, and the remaining 99% of the received API calls can be processed by the API server of the source master node 1111. In other words, initially, only 1% of the API calls are processed by the API server of the destination master node 1112 according to the mode of the destination environment, and the rest are processed by the API server of the source master node 1111 according to the mode of the source environment. In addition to or as an alternative to allocating API traffic in a predetermined ratio, API traffic can be further allocated according to other criteria (such as by resource type, by user, by namespace, by object type, etc.).

[0124] During the deployment process, the activity in the API server of the destination master node 1112 can be monitored. For example, the coordinator 1114 can monitor the activity of cluster control plane components such as API servers, controller managers, etc. The coordinator 1114 can further monitor the workload, such as comparing whether there are problematic differences in the workloads processed by the source cluster and the destination cluster. In this way, if no failure is detected in a proportion of API calls processed by the API server of the destination master node 1112, or at least no other failures that have not occurred in the source cluster 400 before the migration, then the API traffic to the API server of the destination master node 1112 can be increased to a higher proportion, and so on. For example, as shown, the API calls routed to the API server of the destination master node 1112 can be increased from 1% to 2%, 5%, 10%, etc. However, if one or more failures are detected in the proportion of API calls processed by the API server of the destination master node 1112, the failure can serve as a warning that more failures may result if the API server of the destination master node 1112 processes a larger proportion of API calls. Appropriate action can be taken based on the alert, such as returning all API traffic to the source API server, as shown in FIG. 11 .

[0125] As further shown, in some cases, a discovery document including information about the destination environment (such as the exact pattern following the object) can be made available to the user only when the API server of the destination master node 1112 processes all input API calls. For example, as each type of object becomes fully processed by the destination cluster, the portion of the discovery document for the corresponding type of object can be updated using the destination pattern of that type of object. In other words, when all objects are processed by the API server of the destination master node 1112 based on the destination pattern, the end user may not be able to observe any changes in the environment until this point. At this point, the source master node 1111 no longer receives API traffic, and therefore, no object is processed by the API server of the source master node 1111 based on the old pattern. The control plane of the source master node 1111 may also observe the new discovery document and be informed that the pattern migration has been completed.

[0126] Once the coordinator 1114 observes the completed schema migration, the coordinator 1114 may optionally begin a phased deployment of one or more other aspects of the cluster. Fig. 11C , which timing diagram illustrates an exemplary phased deployment of controllers. In some cases, an environmental change may involve a change in the controller that actuates a cluster object. For example, a destination master node 1112 in a destination environment may use a different controller to run a control loop compared to the controller used by the source master node 1111. In this way, the switch between the controller of the source master node 1111 and the controller of the destination master node may also be deployed in stages. For example, in order to ensure that inconsistent changes are not made to an object, the controller may acquire a lock before operating the object. In this way, the coordinator 1114 may instruct the logical API service 1113 to implement phased controller lock allocation between the controller of the source cluster and the controller of the destination cluster.

[0127] Therefore, in Fig. 11CIn the specific example shown, initially only 1% of the controller locks are provided to the controller of the destination master node 1112, and the remaining controller locks are provided to the controller of the source master node 1111. As with the deployment of the API server, the coordinator 1114 can monitor the activity of the cluster control plane components (such as the API server, the controller manager, and / or the workload) to see any failures caused by switching to the controller of the destination master node 1112. If no failure is detected, or at least no other failures that have not occurred in the source cluster 400 before the migration, the proportion of controller locks provided to the controller of the destination master node 1112 can be gradually increased. In addition, in order to ensure that no objects are manipulated by two controllers when the controller lock allocation is adjusted (such as from 1% locks to 2% lock allocation), the controllers can be configured to maintain locks on objects that they have controlled in the previous stage. Eventually, all controller locks can be provided to the controller of the destination master node 1112, and at this time, there is no longer any controller activity at the source master node 1111.

[0128] At this point, the coordinator 1114 may optionally switch any other remaining add-ons. For example, an object may be processed by an add-on of the destination master node 1112 instead of an add-on of the source master node 1111. Exemplary add-ons may include user interfaces such as dashboards, domain name system (DNS) servers, etc. Optionally, add-ons may be switched in a phased deployment as described above for the API server and controller.

[0129] Once the deployment from the source environment to the destination environment is complete, the shutdown process of the source master node 1111 can be started. For example, any bridging, synchronization, or migration of the database between the source master node 1111 and the destination master node 1112 can be stopped. In addition, the PD can be detached from the source master node 1111, and the source master node 1111 can then be deleted. Once the source master node 1111 is destroyed, the coordinator 1114 can report the successfully completed migration to the cloud.

[0130] In addition to migration of the cluster control plane, live migration can also be performed for workloads. Fig.12 is a timing diagram illustrating an exemplary live migration of a workload from one environment to another in a cluster. Fig.12 The diagram shows an old container pod 1201 on a node of a first source cluster, a new container pod 1202 created on a node of a second destination cluster, and various actions occurring at the cluster control plane 1203 of both clusters. The container pod may be configured as follows: Figure 49, for example, the old container pod 1201 can be configured on the node 910 of the source cluster 400, and the new container pod 1202 can be configured on the node 950 of the cluster 500. Although exemplary operations involving only one old container pod 1201 and only one new container pod 1202 are shown, such operations can be performed on any number of container pod pairs in the source cluster and the destination cluster. The control plane 1203 may include components of the control planes from both the destination cluster and the source cluster, such as Figure 4-7 The timing diagram can be used on a system such as Figure 2 or Figure 3 One or more processors are shown executing.

[0131] refer to Fig.12 , while the old container pod 1201 is still running on the node of the source cluster, the cluster control plane 1203 can schedule the new container pod 1202. For example, the new container pod 1202 can be scheduled by the controller of the destination cluster 500. The cluster control plane 1203 can record the state of the old container pod 1201 and then send these states to the new container pod 1202. The cluster control plane 1203 can suspend the execution of the old container pod 1201. Then, the cluster control plane 1203 can copy any changes in the state of the old container pod 1201 and send these changes to the new container pod 1202. Then, the cluster control plane 1203 can resume the execution of the container pod 1202.

[0132] Once the container pod 1202 begins execution, the cluster control plane 1203 can forward network traffic (such as requests from applications or websites for the old container pod 1201) to the new container pod 1202. For example, the cluster control plane 1203 can forward network traffic (such as requests from applications or websites for the old container pod 1201) to the new container pod 1202. Fig. 9 The global load balancer performs the distribution. Once the workload migration is complete, the connection to the old container pod 1201 can be closed. The old container pod 1201 can then be deleted. Further, during real-time workload migration, the Fig.10 As shown, live migration of workload storage is performed. For example, live migration of workload storage can be performed during a request to live migration of workload.

[0133] As described above, the destination cluster may be monitored for failures during and / or after live migration. Fig.13Exemplary further actions that can be taken based on whether the live migration is successful or failed are shown. As shown, the change from the source environment to the destination environment can be initiated by the cloud platform 1311 instructing the coordinator 1114. The cloud platform 1311 can then instruct the cloud control plane 1312 to start one or more new destination VMs to migrate. If the coordinator 1114 reports a failure during or after the migration to the cloud platform 1311, the cloud platform 1311 can instruct the coordinator 1114 to stop or pause the migration. In addition, an output including information about the detected failure can be generated. For example, the information can be displayed to a cloud administrator, a user, etc.

[0134] Alternatively or additionally, the cloud platform 1311 can instruct the coordinator 1114 to initiate a change from the destination environment back to the source environment. Once the rollback is complete, the cloud platform 1311 can instruct the cloud control plane 1312 to delete the destination VM created for the migration. Error reporting, diagnosis, and repair can then be performed, for example, by an administrator of the cloud platform 1311. Once the error is fixed, the cloud platform 1311 can instruct the coordinator 1114 to restart the change from the source environment to the destination environment. Importantly, even if the migration fails and is rolled back, the workloads running on the cluster will not suffer very little interruption.

[0135] As further shown, in some cases, the coordinator 1114 may report a successful migration. In this case, if the source VM is on the same cloud as the cloud platform 1311, the cloud platform 1311 may instruct the cloud control plane 1312 to delete the source VM. If the source VM is on a different cloud than the cloud platform 1311, the cloud platform 1311 may not be able to do anything with the source VM. In this case, the user may need to instruct other clouds to delete these source VMs.

[0136] although Fig.13 Many example actions are shown, but not all actions need to be performed, and the order may be different. For example, whether to initiate a complete rollback or just suspend migration to fix certain faults may be based on a determination of the severity of the fault, or whether the fault existed before the migration. Further, in this regard, reporting, diagnosis, and repair of the fault may additionally or alternatively occur after suspending the migration, and the destination VM may not be deleted, but rather retained, so that once the fault is fixed, the migration can be resumed.

[0137] Fig.14 1400 may be performed by one or more processors, such as one or more processors 212, 222. For example, the processors 212, 222 may receive data and make various determinations as shown in the flowchart. Fig.14 An exemplary live migration from a control plane of a first cluster to a control plane of a second cluster is shown. Fig.14, at box 1410, a request for one or more cluster control planes is received, wherein the one or more cluster control planes may include a control plane of a first cluster and a control plane of a second cluster. At box 1420, a predetermined portion of the received requests is allocated to the control plane of the second cluster, and a remaining portion of the received requests is allocated to the control plane of the first cluster. At box 1430, a predetermined portion of the requests is processed using the control plane of the second cluster. At box 1440, while processing the predetermined portion of the requests, a failure is detected in the second cluster. At box 1450, based on the failure to be detected in the second cluster, a predetermined portion of the requests allocated to the control plane of the second cluster is increased in a predetermined stage until all received requests are allocated to the control plane of the second cluster.

[0138] The technique is advantageous because it provides a gradual and monitored deployment process for updating a cluster or modifying other aspects of a cluster environment. The phased and fixed deployment process provides more opportunities to stop the upgrade if problems arise, thereby preventing large-scale damage. The workload traffic distribution between the source and destination clusters running simultaneously can reduce or eliminate downtime during the upgrade. In addition, due to the workload traffic distribution, from the client's perspective, it may appear that only one cluster exists during the live migration. If the upgrade fails, the system will provide a rollback option because the source cluster is not deleted unless the upgrade is successfully completed. The technique also provides features that enable live migration between clusters located in different physical locations and between clusters operating on different clouds where one of the clouds does not support live migration.

[0139] Unless otherwise stated, the foregoing alternative examples are not mutually exclusive, but may be implemented in various combinations to achieve unique advantages. Since these and other variations and combinations of the features discussed above may be utilized without departing from the subject matter defined by the claims, the foregoing description of the embodiments should be made by way of example rather than by way of limitation of the subject matter defined by the claims. In addition, the provision of the examples described herein and the phrases expressed as "such as", "including", etc. should not be interpreted as limiting the subject matter of the claims to specific examples; on the contrary, these examples are intended to illustrate only one of many possible embodiments. In addition, the same reference numerals in different figures may identify the same or similar elements.

Claims

1. A method for migrating from a first cluster to a second cluster, comprising: Receiving, by one or more processors, a request for two or more cluster control planes, wherein the two or more cluster control planes include a control plane of the first cluster and a control plane of the second cluster; allocating, by the one or more processors, a predetermined portion of the received requests to a control plane of the second cluster, and allocating a remaining portion of the received requests to a control plane of the first cluster; Processing the predetermined portion of requests using a control plane of the second cluster by the one or more processors, wherein processing the predetermined portion of requests comprises: Determining, by the one or more processors, that a container pod running in the second cluster references storage of the first cluster; creating, by the one or more processors, storage in the second cluster, wherein the storage of the first cluster and the storage of the second cluster are located in different locations; reading, by the one or more processors, data related to the container pod in the second cluster from storage in the first cluster; and copying, by the one or more processors, unchanged data of the container pod in the second cluster from storage of the first cluster to storage of the second cluster, While processing the predetermined portion of requests, detecting, by the one or more processors, whether a failure exists in the second cluster; and The one or more processors increase, based on no failure detected in the second cluster, the predetermined portion of requests allocated to the control plane of the second cluster in predetermined stages until all received requests are allocated to the control plane of the second cluster.

2. The method according to claim 1, wherein: The received request is distributed by a cluster bridge aggregator of the first cluster and a cluster bridge aggregator of the second cluster, wherein the first cluster and the second cluster operate on a same cloud.

3. The method of claim 1 , wherein the received request comprises a request from a workload running in the first cluster, wherein: Requests from the workload are intercepted by a sidecar container injected in the first cluster and routed to a cluster bridge aggregator of the second cluster, wherein the first cluster and the second cluster operate on different clouds.

4. The method according to claim 1, wherein: The distribution of the received requests is performed in multiple predetermined stages, wherein the requests are directed to the first cluster or the second cluster based on one or more of the following: user agent, user account, user group, object type, resource type, location of the object, or location of the sender of the request.

5. The method according to claim 1, further comprising: Joining, by the one or more processors, one or more databases in the control plane of the second cluster to a quorum set including the one or more databases in the control plane of the first cluster, wherein the first cluster and the second cluster are running on a same cloud.

6. The method according to claim 1, further comprising: Synchronizing, by the one or more processors, one or more databases in a control plane of the second cluster with one or more databases in a control plane of the first cluster, wherein the first cluster and the second cluster operate on different clouds.

7. The method according to claim 1, further comprising: allocating, by the one or more processors, a predetermined portion of the object locks to one or more controllers of the second cluster, and allocating the remaining portion of the object locks to one or more controllers of the first cluster; actuating, by the one or more processors, an object locked by the one or more controllers of the second cluster; while actuating the locked object, detecting, by the one or more processors, whether a fault exists in the second cluster; Increasing, by the one or more processors, the object locks assigned to the predetermined portion of the one or more controllers of the second cluster based on no failure being detected in the second cluster.

8. The method according to claim 1, further comprising: determining, by the one or more processors, that all received requests are assigned to a control plane of the second cluster; Based on the determination, deleting, by the one or more processors, a control plane of the first cluster, wherein the first cluster and the second cluster operate on a same cloud.

9. The method according to claim 1, further comprising: Based on detecting one or more failures in the second cluster, the one or more processors cease distributing the received requests to a control plane of the second cluster.

10. The method according to claim 1, further comprising: Based on detecting one or more faults in the second cluster, generating, by the one or more processors, an output including information about the detected faults.

11. The method according to claim 1, further comprising: Reducing, by the one or more processors, the predetermined portion of requests allocated to the control plane of the second cluster based on detecting a failure in the second cluster until all received requests are allocated to the control plane of the first cluster.

12. The method according to claim 1, further comprising: determining, by the one or more processors, that all received requests are assigned to a control plane of the first cluster; The second cluster is deleted based on the determination by the one or more processors.

13. The method according to claim 1, further comprising: scheduling, by the one or more processors, additional container pods in the second cluster; Recording, by the one or more processors, a status of a container pod in the first cluster; The recorded state of the container pod in the first cluster is sent, by the one or more processors, to the additional container pod in the second cluster.

14. The method according to claim 13, further comprising: pausing, by the one or more processors, execution of a workload by the container pod in the first cluster; replicating, by the one or more processors, changes in state of the container pod in the first cluster since recording the state of the container pod in the first cluster; sending, by the one or more processors, the replicated state changes to the additional container pods in the second cluster; resuming execution of the workload by the additional container pod in the second cluster by the one or more processors; forwarding, by the one or more processors, traffic directed to the container pod in the first cluster to the additional container pod in the second cluster; Deleting, by the one or more processors, the container pod in the first cluster.

15. The method according to claim 1, further comprising: determining, by the one or more processors, that a first worker node in the first cluster has one or more container pods to be moved to the second cluster; preventing, by the one or more processors, a first worker node in the first cluster from adding a new container pod; moving, by the one or more processors, some of the one or more container pods in the first worker node to one or more existing worker nodes in the second cluster; determining, by the one or more processors, that there is no more capacity in the existing working nodes in the second cluster; creating, by the one or more processors, one or more additional worker nodes in the second cluster; moving, by the one or more processors, the remaining one or more container pods in the first worker node to the additional worker node in the second cluster; determining, by the one or more processors, that the first worker node in the first cluster no longer has a container pod to be moved to the second cluster; Deleting a first working node in the first cluster by the one or more processors.

16. The method according to claim 13, further comprising: Receiving, by the one or more processors, a request for one or more workloads, wherein the one or more workloads include a workload running in a first cluster and a workload running in a second cluster; The received requests are distributed, by the one or more processors using at least one global load balancer, to one or more workloads between workloads running in the first cluster and workloads running in the second cluster.

17. The method of claim 1, further comprising: Reading, by the one or more processors, data related to the container pod in the second cluster in storage of the second cluster using a storage driver.

18. The method according to claim 17, further comprising: Writing, by the one or more processors, changes made by the container pod in the second cluster to storage of the second cluster.

19. A system for migrating from a first cluster to a second cluster, the system comprising one or more processors, the one or more processors being configured to: Receive a request for two or more cluster control planes, where: The two or more cluster control planes include a control plane of the first cluster and a control plane of the second cluster; allocating a predetermined portion of the received requests to a control plane of the second cluster, and allocating a remaining portion of the received requests to a control plane of the first cluster; Processing the predetermined portion of requests using a control plane of the second cluster, wherein processing the predetermined portion of requests includes: Determining that a container pod running in the second cluster references storage of the first cluster; Creating storage in the second cluster, wherein the storage of the first cluster and the storage of the second cluster are located in different locations; reading data related to the container pod in the second cluster from storage in the first cluster; and copying unchanged data of the container pod in the second cluster from the storage of the first cluster to the storage of the second cluster, While processing the predetermined portion of requests, detecting whether there is a failure in the second cluster; and Based on no failure being detected in the second cluster, the predetermined portion of requests allocated to the control plane of the second cluster is increased in predetermined stages until all received requests are allocated to the control plane of the second cluster.

20. The system of claim 19, wherein: The first cluster and the second cluster are at least one of the following: operating different software versions, operating at different locations, operating on different clouds provided by different cloud providers, operating on different clouds where at least one cloud is a user's local data center, or connected to different networks.

21. A method for migrating from a first cluster to a second cluster, comprising: bridging a first cluster associated with a first control plane with a second cluster associated with a second control plane; migrating the storage from the first cluster to the second cluster based on one or more disks associated with the storage; creating one or more new disks in the second cluster; receiving a request for a workload running on the first cluster while the migration is occurring; updating the first cluster according to the request; as well as The second cluster is synchronized with the updated first cluster.

22. The method of claim 21, further comprising monitoring the progress of the migration.

23. The method according to claim 21, further comprising: Scheduling nodes in the second cluster by one or more processors; recording, by the one or more processors, states of nodes in the first cluster; The recorded states of the nodes in the first cluster are sent, by the one or more processors, to nodes in the second cluster.

24. The method according to claim 23, further comprising: suspending, by the one or more processors, execution of a workload by the nodes in the first cluster; replicating, by the one or more processors, changes in state of the nodes in the first cluster since recording the state of the nodes in the first cluster; sending, by the one or more processors, the replicated state changes to the nodes in the second cluster; resuming execution of a workload by the nodes in the second cluster by the one or more processors; forwarding, by the one or more processors, traffic directed to the nodes in the first cluster to the nodes in the second cluster; The node in the first cluster is deleted by the one or more processors.

25. The method of claim 21, further comprising distributing the request and any additional requests received during the migration between the first cluster and the second cluster.

26. The method of claim 25, further comprising load balancing the request and any additional requests among servers of the second cluster.

27. The method according to claim 25, wherein: The distribution of the requests is performed in multiple predetermined stages, wherein the requests are directed to the first cluster or the second cluster based on one or more of the following: user agent, user account, user group, object type, resource type, location of the object, or location of the sender of the request.

28. The method of claim 25, further comprising: Based on detecting one or more failures in the second cluster, the one or more processors cease distributing the received requests to a control plane of the second cluster.

29. The method of claim 25, further comprising: Based on detecting one or more faults in the second cluster, generating, by the one or more processors, an output including information about the detected faults.

30. The method of claim 21, wherein the first cluster and the second cluster operate on the same cloud.

31. The method of claim 21, wherein the first cluster and the second cluster operate on different clouds.

32. The method of claim 21, further comprising: allocating, by the one or more processors, a predetermined portion of the object locks to one or more controllers of the second cluster, and allocating the remaining portion of the object locks to one or more controllers of the first cluster; actuating, by the one or more processors, an object locked by the one or more controllers of the second cluster; while actuating the locked object, detecting, by the one or more processors, whether a fault exists in the second cluster; Increasing, by the one or more processors, the object locks assigned to the predetermined portion of the one or more controllers of the second cluster based on no failure being detected in the second cluster.

Citation Information

Cited By

  • Cluster operating system migration method, device and equipment

    CN119597343A