Help Center/ Cloud Container Engine/ User Guide/ Clusters/ Upgrading a Cluster/ Migrating Services Across Clusters of Different Versions
Updated on 2024-09-02 GMT+08:00

Migrating Services Across Clusters of Different Versions

Application Scenarios

This section describes how to migrate services from a cluster of an earlier version to a cluster of a later version in CCE.

This operation is applicable when a cross-version cluster upgrade is required (for example, upgrade from v1.19.* to v1.28.*) and new clusters can be created for service migration.

Prerequisites

Table 1 Checklist before migration

Category

Description

Cluster

NodeIP-related: Check whether node IP addresses (including EIPs) of the cluster before the migration have been used in other configurations or whitelists.

Workloads

Record the number of workloads for post-migration check.

Storage

  1. Check whether the storage resources in use are provisioned by the cloud or by your organization.
  2. Change the automatically created storage to the existing storage in the new cluster.

Network

  1. Pay special attention to the ELB and ingress.
  2. Clusters of an earlier version support only the classic load balancer. To migrate services to a new cluster, change load balancer type to shared load balancer. Then, the corresponding ELB service will be re-established.

O&M

Private configuration: Check whether kernel parameters or system data have been configured on nodes in the cluster.

Procedure

  1. Create a CCE cluster.

    Create a cluster with the same specifications and configurations as the cluster of the earlier version. For details, see Buying a CCE Standard/Turbo Cluster.

  2. Add a node.

    Add a node with the same specifications and manual configuration items. For details, see Creating a Node.

  3. Create a storage volume in the new cluster.

    Use the existing storage to create a PVC in the new cluster. The PVC name remains unchanged. For details, see Using an Existing OBS Bucket Through a Static PV or Using an Existing SFS Turbo File System Through a Static PV.

    Storage switching supports only shared storage such as OBS and SFS Turbo. If non-shared storage is used, suspend the workloads in the old cluster to switch the storage resources. In this case, services will be unavailable.

  4. Create a workload in the new cluster.

    Create a workload in the new cluster. The name and specifications remain unchanged. For details, see Creating a Deployment or Creating a StatefulSet.

  5. Mount the storage again.

    Remount the existing storage in the workload. For details, see Using an Existing OBS Bucket Through a Static PV or Using an Existing SFS Turbo File System Through a Static PV.

  6. Create a Service in the new cluster.

    The Service name and specifications remain unchanged. For details about how to create a Service, see Service.

  7. Commission services.

    After all resources are created, commission the containerized services. If the commissioning is successful, migrate the services to the new cluster.

  8. Delete or unsubscribe from the old cluster.

    When all functions of the new cluster are stable, unsubscribe from or delete the old cluster. For details about how to delete a cluster, see Deleting a Cluster.