- What's New
- Product Bulletin
- Service Overview
- Billing
- Getting Started
-
User Guide
-
UCS Clusters
- Overview
- Huawei Cloud Clusters
-
On-Premises Clusters
- Overview
- Service Planning for On-Premises Cluster Installation
- Registering an On-Premises Cluster
- Installing an On-Premises Cluster
- Managing an On-Premises Cluster
- Attached Clusters
- Multi-Cloud Clusters
- Single-Cluster Management
- Fleets
-
Cluster Federation
- Overview
- Enabling Cluster Federation
- Using kubectl to Connect to a Federation
- Upgrading a Federation
-
Workloads
- Workload Creation
-
Container Settings
- Setting Basic Container Information
- Setting Container Specifications
- Setting Container Lifecycle Parameters
- Setting Health Check for a Container
- Setting Environment Variables
- Configuring a Workload Upgrade Policy
- Configuring a Scheduling Policy (Affinity/Anti-affinity)
- Configuring Scheduling and Differentiation
- Managing a Workload
- ConfigMaps and Secrets
- Services and Ingresses
- MCI
- MCS
- DNS Policies
- Storage
- Namespaces
- Multi-Cluster Workload Scaling
- Adding Labels and Taints to a Cluster
- RBAC Authorization for Cluster Federations
- Image Repositories
- Permissions
-
Policy Center
- Overview
- Basic Concepts
- Enabling Policy Center
- Creating and Managing Policy Instances
- Example: Using Policy Center for Kubernetes Resource Compliance Governance
-
Policy Definition Library
- Overview
- k8spspvolumetypes
- k8spspallowedusers
- k8spspselinuxv2
- k8spspseccomp
- k8spspreadonlyrootfilesystem
- k8spspprocmount
- k8spspprivilegedcontainer
- k8spsphostnetworkingports
- k8spsphostnamespace
- k8spsphostfilesystem
- k8spspfsgroup
- k8spspforbiddensysctls
- k8spspflexvolumes
- k8spspcapabilities
- k8spspapparmor
- k8spspallowprivilegeescalationcontainer
- k8srequiredprobes
- k8srequiredlabels
- k8srequiredannotations
- k8sreplicalimits
- noupdateserviceaccount
- k8simagedigests
- k8sexternalips
- k8sdisallowedtags
- k8sdisallowanonymous
- k8srequiredresources
- k8scontainerratios
- k8scontainerrequests
- k8scontainerlimits
- k8sblockwildcardingress
- k8sblocknodeport
- k8sblockloadbalancer
- k8sblockendpointeditdefaultrole
- k8spspautomountserviceaccounttokenpod
- k8sallowedrepos
- Configuration Management
- Traffic Distribution
- Observability
- Container Migration
- Pipeline
- Error Codes
-
UCS Clusters
- Best Practices
-
API Reference
- Before You Start
- Calling APIs
-
API
- UCS Cluster
-
Fleet
- Adding a Cluster to a Fleet
- Removing a Cluster from a Fleet
- Registering a Fleet
- Deleting a Fleet
- Querying a Fleet
- Adding Clusters to a Fleet
- Updating Fleet Description
- Updating Permission Policies Associated with a Fleet
- Updating the Zone Associated with the Federation of a Fleet
- Obtaining the Fleet List
- Enabling Fleet Federation
- Disabling Cluster Federation
- Querying Federation Enabling Progress
- Creating a Federation Connection and Downloading kubeconfig
- Creating a Federation Connection
- Downloading Federation kubeconfig
- Permissions Management
- Using the Karmada API
- Appendix
-
FAQs
- About UCS
-
Billing
- How Is UCS Billed?
- What Status of a Cluster Will Incur UCS Charges?
- Why Am I Still Being Billed After I Purchase a Resource Package?
- How Do I Change the Billing Mode of a Cluster from Pay-per-Use to Yearly/Monthly?
- What Types of Invoices Are There?
- Can I Unsubscribe from or Modify a Resource Package?
-
Permissions
- How Do I Configure Access Permissions for Each Function of the UCS Console?
- What Can I Do If an IAM User Cannot Obtain Cluster or Fleet Information After Logging In to UCS?
- How Do I Restore ucs_admin_trust I Deleted or Modified?
- What Can I Do If I Cannot Associate the Permission Policy with a Fleet or Cluster?
- How Do I Clear RBAC Resources After a Cluster Is Unregistered?
- Policy Center
-
Fleets
- What Can I Do If Cluster Federation Verification Fails to Be Enabled for a Fleet?
- What Can I Do If an Abnormal, Federated Cluster Fails to Be Removed from the Fleet?
- What Can I Do If an Nginx Ingress Is in the Unready State After Being Deployed?
- What Can I Do If "Error from server (Forbidden)" Is Displayed When I Run the kubectl Command?
- Huawei Cloud Clusters
- Attached Clusters
-
On-Premises Clusters
- What Can I Do If an On-Premises Cluster Fails to Be Connected?
- How Do I Manually Clear Nodes of an On-Premises Cluster?
- How Do I Downgrade a cgroup?
- What Can I Do If the VM SSH Connection Times Out?
- How Do I Expand the Disk Capacity of the CIA Add-on in an On-Premises Cluster?
- What Can I Do If the Cluster Console Is Unavailable After the Master Node Is Shut Down?
- What Can I Do If a Node Is Not Ready After Its Scale-Out?
- How Do I Update the CA/TLS Certificate of an On-Premises Cluster?
- What Can I Do If an On-Premises Cluster Fails to Be Installed?
- Multi-Cloud Clusters
-
Cluster Federation
- What Can I Do If the Pre-upgrade Check of the Cluster Federation Fails?
- What Can I Do If a Cluster Fails to Be Added to a Federation?
- What Can I Do If Status Verification Fails When Clusters Are Added to a Federation?
- What Can I Do If an HPA Created on the Cluster Federation Management Plane Fails to Be Distributed to Member Clusters?
- What Can I Do If an MCI Object Fails to Be Created?
- What Can I Do If I Fail to Access a Service Through MCI?
- What Can I Do If an MCS Object Fails to Be Created?
- What Can I Do If an MCS or MCI Instance Fails to Be Deleted?
- Traffic Distribution
- Container Intelligent Analysis
- General Reference
Copied.
Application Backup
Application migration across Huawei Cloud clusters of UCS in different regions consists of application backup and application migration. This means that applications in the source cluster are backed up and then migrated to the destination cluster through data restoration.
k8clone is an easy-to-use Kubernetes metadata cloning tool. It can save Kubernetes metadata (objects) as a local package and restore the metadata to the destination cluster.
Back up data during off-peak hours.
Prerequisites
Ensure that services (data not in the cluster, such as images, storage, and databases) on which cloud native applications depend have been migrated.
How k8clone Backs Up Data
Data backup process:

k8clone Usage for Backup
k8clone can run on Linux (x86 and Arm) and Windows. The usage is similar in both environments. This section uses the Linux (x86) environment as an example.
If Linux (Arm) or Windows is used, replace k8clone-linux-amd64 in the following command with k8clone-linux-arm64 or k8clone-windows-amd64.exe.
Run ./k8clone-linux-amd64 backup -h in the directory where k8clone is located to learn about its usage.
- -k, --kubeconfig: specifies the location of the kubeconfig file of kubectl. The default value is $HOME/.kube/config. The kubeconfig file is used to configure access to the Kubernetes cluster. The kubeconfig file contains the authentication credentials and endpoints (access addresses) required for accessing and registering the Kubernetes cluster. For details, see the Kubernetes documentation.
- -s, --api-server: Kubernetes API Server URL. The default value is "".
- -q, --context: Kubernetes Configuration Context. The default value is "".
- -n, --namespace: backs up cloud native applications of a specified namespace. Multiple namespaces are separated by commas (,), for example, ns1,ns2,ns3. The default value is "", indicating that the entire cluster is backed up.
- -e, --exclude-namespaces: excludes the backup of objects of a specified namespace. This parameter cannot be used together with --namespace.
- -x, --exclude-kind: excludes the backup of a specified resource type.
- -i, --include-kind: specifies the backup of a resource type.
- -y, --exclude-object: excludes the backup of a specified resource object.
- -z, --include-object: specifies the backup of a resource object.
- -w, --exclude-having-owner-ref: excludes the backup of resource objects with ownerReferences. The default value is false. The equal sign (=) must be added when a Boolean parameter is transferred, for example, -w=true. -w true does not take effect, and the default value will be used.
- -d, --local-dir: path for storing backup data. The default value is the k8clone-dump folder in the current directory.
$ ./k8clone-linux-amd64 backup -h Backup Workload Data as yaml files Usage: k8clone backup [flags] Flags: -s, --api-server string Kubernetes api-server url -q, --context string Kubernetes configuration context -w, --exclude-having-owner-ref Exclude all objects having an Owner Reference. The default value is false. The equal sign (=) must be added when a Boolean parameter is transferred, for example, -w=true. -w true does not take effect, and the default value will be used. -x, --exclude-kind strings Resource kind to exclude. Eg. 'deployment' -i, --include-kind strings Ressource kind to include. Eg. 'deployment' -e, --exclude-namespaces strings Namespaces to exclude. Eg. 'temp.*' as regexes. This collects all namespaces and then filters them. Don't use it with the namespace flag. -y, --exclude-object strings Object to exclude. The form is '<kind>:<namespace>/<name>',namespace can be empty when object is not namespaced. Eg. 'configmap:kube-system/kube-dns' -z, --include-object strings Object to include. The form is '<kind>:<namespace>/<name>',namespace can be empty when object is not namespaced. Eg. 'configmap:kube-system/kube-dns' -h, --help help for backup -k, --kubeconfig string The kubeconfig of k8s cluster's. Default is the $HOME/.kube/config. -d, --local-dir string Where to dump yaml files (default "./k8clone-dump") -n, --namespace string Only dump objects from this namespace
Examples:
- Backs up objects of the entire cluster. The default path is the k8clone-dump folder in the current directory.
./k8clone-linux-amd64 backup
- Backs up objects of the entire cluster and specifies the path for storing backup data.
- Backs up objects of a specified namespace.
- Excludes the backup of objects of a specified namespace.
./k8clone-linux-amd64 backup -e kube-system,kube-public,kube-node-lease
- Excludes the backup of specified resource types.
- Specifies the backup of resource types.
- Excludes the backup of specified resource objects.
./k8clone-linux-amd64 backup -y configmap:kube-system/kube-dns
- Specifies the backup of resource objects.
./k8clone-linux-amd64 backup -z configmap:kube-system/kube-dns
- Excludes the backup of resource objects with ownerReferences.
Procedure
- Connect to the source cluster using kubectl. For details, see Connecting to a Cluster Using kubectl.
- Go to the directory where k8clone is located and run the backup command to back up data to a local directory and compress the data into a package.
The examples in k8clone Usage for Backup provide several common backup methods. You can select a method as required or customize one.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot