tencent cloud

Cross-Tenant Synchronization
Last updated:2025-12-22 17:33:20
Cross-Tenant Synchronization
Last updated: 2025-12-22 17:33:20

Overview

Tencent Container Registry (TCR) supports the synchronization of container images and Helm Charts among instances in different regions. It also supports single-instance image pushing and worldwide automatic image data synchronization and distribution, helping enterprises quickly deploy and update the container service in multiple regions worldwide.
The instance synchronization feature allows you to customize rules to synchronize specified resources in an instance to a specified location of another instance. In particular, you can select the synchronized resource type (container image, Helm Chart, or both), filter the synchronized resource paths, and use a regular expression to filter repositories and tags. You can also select whether to overwrite existing images with the same names to prevent the loss of historical data due to overwriting. Currently, the instance synchronization feature supports cross-tenant synchronization. You can create a synchronization rule by specifying the instance ID, account ID and access credential of the synchronization target.

Prerequisites

Before creating and managing the synchronization configuration of a TCR Enterprise instance, you need to complete the following tasks:
You have purchased a TCR Enterprise instance with standard or premium specification.
If you are using a sub-account, you must have granted the sub-account operation permissions for the corresponding instance. For more information, see Example of Authorization Solution of the Enterprise Edition.

Directions

Creating a synchronization rule

1. Log in to the TCR console and select Synchronization and Replication > Synchronization in the left sidebar.
2. On the Synchronization page, select a region and an instance, and click Create.
3. In the Create Instance Synchronization Rule window, configure the rule as instructed below.


Name: rule name, which is a string of lowercase letters, numbers, and special characters ([-._]) and must start with a letter or number.
Description: rule description.
Sync Source:
Source Instance: the current instance is the source instance. You can return to the "Synchronization" page to change the source instance.
Namespace: namespace with which the current instance needs to synchronize. Currently, you cannot select all namespaces.
Repository Name: the repository to be synchronized. If you do not enter the repository name, the system will select all repositories in the namespace by default.
Tag: the tag to be synchronized. If you do not enter the tag, the system will select all tags in the qualified repositories by default.
Repository Type: type of the resource to be synchronized. You can choose both Container Image and Helm Chart, or only one of them.
Synchronization Target: you can specify whether to enable cross-tenant synchronization.
Disabled
Enabled
If Cross-tenant sync is disabled, the synchronization is between instances under the same tenant. You need to complete the following fields.
Target Instance: target instance for data synchronization. You can select any instance in the root account.
Namespace: namespace where the repository is located after it is synchronized to the target instance. If this parameter is not specified, it is set to the namespace with the same name as that in the source instance by default. If such a namespace does not exist, a namespace is created.
If Cross-tenant sync is enabled, you can sync between instances under different tenants. The following fields are required.
Target Instance: ID of the target instance for data synchronization. You can go to Instance Management to obtain it.
Namespace: namespace where the repository is located after it is synchronized to the target instance. If this parameter is not specified, it is set to the namespace with the same name as that in the source instance by default. If such a namespace does not exist, a namespace is created.
Username: The username used to log in to the target instance of synchronization.
Note:
The username can only be a user-level account. Service-level accounts are not supported currently. If a service-level account is entered, it will be invalid, and an error will be reported.
Password: The password used to log in to the target instance of synchronization.
Note:
Use long-term access credentials to avoid the unavailability of synchronization rules. The lifecycle of synchronization rules is consistent with that of the access credentials for the synchronization rules newly added to the target account.
Image Override: this indicates whether the container image with the same name in the target instance is overwritten. We recommend that you do not overwrite images with the same name.
4. Click OK.
Note:
Supplement to the scenario of multi-level image repository synchronization:
To implement multi-level image repository synchronization, ensure that the namespaces of the source instance and target instance are consistent.
If the repository name is not entered by default to achieve multi-level image repository synchronization, pay special attention to the namespace field of the target instance, which should be left blank (default effect ns/**) to ensure that all sub-repositories can be correctly synchronized to the corresponding namespaces of the target instance.
Example: Assume that the source instance has a namespace project with multi-level sub-repositories such as project/subrepo1/subrepo2. To synchronize the sub-repositories in the target instance, leave the namespace field in the target instance blank.

Managing synchronization rules

After a synchronization rule is created, you can check it on the Synchronization page. Then, you can perform the operations shown in the figure below to manage synchronization rules.


View Synchronization Logs: click an instance rule to view triggering logs of the rule. For more information, see Viewing synchronization logs.
Modify Rule Status:

indicates that a rule is enabled, and

indicates that a rule is disabled. A newly created synchronization rule is enabled by default, and you can change the status as needed.
Trigger Synchronization: manually trigger synchronization. All repositories in the instance that match the rule are scanned and synchronized.
Note:
After rules are created, newly pushed images will be automatically synchronized to other instances with no need for manual triggering.
Manual triggering is mainly for certain historic images and exceptions. The operation of manually triggered synchronization involves scanning of all repositories in an instance that meet the rules. This takes time depending on the number of your image tags. During synchronization, task execution may cause pressure on other image transmission actions. Try to avoid manually triggering multiple synchronization rules at the same time.
Configuration: re-configure an instance synchronization rule. You can configure all parameters.
Deletion: delete the instance synchronization rule.

Viewing synchronization logs

Click the name of an instance synchronization rule to go to the "Synchronization Logs" page of this rule, as shown in the figure below.


Task ID: synchronization task ID, which is unique in the instance.
Creation Time: time when the synchronization task was created.
Time Spent: time consumed to complete all the synchronization tasks.
Success Rate: resource synchronization completion ratio. Multiple repositories may be synchronized concurrently in the same synchronization task.
Number of Synced Repositories: number of repositories that need to be synchronized in the current task.
Synchronization Status: task status. If a large number of container images and Helm Charts need to be synchronized in a task, the task may remain in the InProgress status for a long time.

References

You can also use the ManageReplication API to manage instance sync.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback