All Products
Search
Document Center

Container Registry:Install a P2P acceleration agent in an on-premises or third-party cloud cluster

Last Updated:Feb 28, 2026

The P2P acceleration feature speeds up image pulling across on-premises clusters and third-party cloud clusters, reducing application deployment time. Follow these steps to upgrade the P2P module on your Container Registry (ACR) Enterprise Edition instance and install the P2P acceleration agent in your cluster.

Prerequisites

Before you begin, ensure that you have:

  • A Container Registry Enterprise Edition instance (Advanced Edition). P2P acceleration is not available for Basic Edition instances. For more information, see Create an Enterprise instance

  • A virtual private cloud (VPC) configured for the Container Registry Enterprise Edition instance. For more information, see Configure a VPC ACL

  • The on-premises or third-party cloud cluster connected to the Container Registry Enterprise Edition instance over the VPC through an Express Connect circuit

  • The following tools installed in your local environment:

    • Helm

    • kubectl, configured with access to the target cluster

Step 1: Upgrade the P2P module on your ACR instance

  1. Log on to the Container Registry console.

  2. In the top navigation bar, select a region.

  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.

  5. On the Overview page, click the CloudShell icon in the top navigation bar.

  6. In the CloudShell terminal, run the following commands to upgrade the P2P module.

    Warning

    After the upgrade, the old version of the client is no longer supported. Before you upgrade, stop using the P2P acceleration feature and uninstall the P2P acceleration agent from all clusters where it is installed.

       aliyun cr UpdateInstanceModule --region <region-id> --InstanceId <instance-id> --ModuleName ACCELERATION_P2P --Enable false --force
       aliyun cr UpdateInstanceModule --region <region-id> --InstanceId <instance-id> --ModuleName ACCELERATION_P2P --Enable true --force

    Replace <region-id> with the region of your ACR instance (for example, cn-hangzhou) and <instance-id> with the ID of your Enterprise Edition instance.

Step 2: Set up permissions

  1. Create a Resource Access Management (RAM) user. For more information, see Create a RAM user.

  2. Add the following custom policy to the RAM user:

       {
           "Version": "1",
           "Statement": [
               {
                   "Effect": "Allow",
                   "Action": [
                       "cr:GetInstanceVpcEndpoint",
                       "cr:ListInstanceEndpoint"
                   ],
                   "Resource": "*"
               }
           ]
       }
  3. Create an AccessKey pair for the RAM user and record the AccessKey ID and AccessKey secret. For more information, see Create an AccessKey pair.

Step 3: Install the P2P acceleration agent

  1. Set the following environment variables. Replace the placeholder values with your actual configuration.

       export ACR_INSTANCE_REGION="<region-id>"
       export ACR_INSTANCE_ID="<instance-id>"
       export ALIYUN_AK="<accesskey-id>"        # AccessKey ID from Step 2
       export ALIYUN_SK="<accesskey-secret>"     # AccessKey secret from Step 2
       export P2P_CHART="https://aliacs-k8s-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/app/charts-incubator/ack-acr-acceleration-p2p-0.3.5.tgz"
  2. Run the following Helm command to install the P2P acceleration agent:

       helm install ack-acr-acceleration-p2p $P2P_CHART -n aliyun-acr-acceleration --create-namespace \
         --set region=$ACR_INSTANCE_REGION \
         --set accessKey=$ALIYUN_AK \
         --set accessKeySecret=$ALIYUN_SK \
         --set p2p.registryInstances=$ACR_INSTANCE_ID \
         --set pullImageInternet=true \
         --set p2p.plusMode.enable=true
    ParameterDescription
    regionRegion of the Container Registry Enterprise Edition instance
    accessKeyAccessKey ID of the RAM user created in Step 2
    accessKeySecretAccessKey secret of the RAM user created in Step 2
    p2p.registryInstancesID of the Container Registry Enterprise Edition instance
    pullImageInternetSet to true to pull P2P component images from the internet
    p2p.plusMode.enableSet to true to enable P2P plus mode for cross-regional, cross-VPC, hybrid cloud, and IDC scenarios