Updated on 2025-10-30 GMT+08:00

Solution Overview

Backup and migration are essential for ensuring data security and service continuity in Kubernetes environments. A comprehensive backup in Kubernetes includes not only persistent data, but also the cluster state, configuration files, deployed applications, and associated services. Cluster migration refers to restoring these backups to a new or target cluster.

CCE supports a variety of backup and migration tools for different scenarios and requirements. The typically used tools are listed in the table below.

Tool

Description

Advantages and Disadvantages

Operation Guide

Velero

Velero is an open-source backup and migration tool for Kubernetes clusters. With restic's PV data backup capabilities, Velero can back up Kubernetes resource objects (such as Deployments, jobs, Services, and ConfigMaps) in the source cluster and data in PVs mounted to pods and uploaded them to object storage. If a disaster occurs or migration is required, the target cluster can obtain the corresponding backup data from the object storage using Velero and restore cluster resources as required.

  • Advantages:
    • An open-source tool that supports the standard Kubernetes protocol
    • Support for migration of data in storage volumes
    • Support for extended functions provided by open-source tools
  • Disadvantage: The clusters require extra memory, CPUs, and storage space for installing Velero.

Migrating Kubernetes Clusters to CCE Using Velero

k8clone

k8clone is a user-friendly tool for cloning Kubernetes metadata. It allows you to save Kubernetes metadata (objects) as local packages and then restore them to the target cluster.

  • Advantage: It requires no installation and consumes no cluster resources.
  • Disadvantage: It cannot migrate data in storage volumes. You need to use a data migration tool to migrate the data separately.

Using k8clone to Back Up and Restore Cluster Resources

Table 1 Types of cluster resources that can be migrated

Resource Type

Supported by Velero

Supported by k8clone

Migration Description

Workload (Deployment, job, StatefulSet, and DaemonSet)

Supported

Supported

You may need to modify some configurations, such as image address and storage class.

ConfigMap/Secret

Supported

Supported

None

PVC

Supported

Supported

You only need to modify some configurations. If PVCs of block storage, file storage, and object storage of other cloud vendors are used, you need to adapt them to the storage classes of CCE.

PV

Partially supported

Not supported

  • Velero can migrate data in PVs to CCE, but the PVs need to be adapted to the storage classes of CCE.
  • hostPath volumes cannot be migrated.

Storage class

Partially supported

Partially supported

Storage class migration that depends on the storage media of other cloud vendors is not supported.

Service

Supported

Supported

LoadBalancer Services need to be adapted.

Ingress

Partially supported

Partially supported

Ingresses that depend on the open-source NGINX Ingress Controller can be migrated.