Configure endpoint access control
If your client VPC cannot reach your Container Registry (ACR) Enterprise Edition instance, enable endpoint access control and add an endpoint in that VPC. The client can then push and pull images over the Alibaba Cloud internal network. You do not need to connect the two networks or re-plan CIDR blocks.
This feature is available to accounts on the whitelist. The Endpoint Access Control tab appears in the console only after applying to join the whitelist.
How it works
ACR provides its service as an endpoint service. When you create an interface endpoint in the client VPC, PrivateLink creates an elastic network interface (ENI) in each selected zone. The ENI serves as the local access point.
A request from the client reaches the instance as follows:
The client sends the request to the internal domain name of the instance.
The request enters the PrivateLink connection through the ENI.
PrivateLink forwards the request to the ACR endpoint service, which passes it to the instance.
The client VPC and the instance network remain independent. You do not need to modify the routes of the client VPC, and overlapping CIDR blocks do not affect access.
Endpoint service name:
com.aliyuncs.privatelink.{RegionId}.cr, whereRegionIdis the ID of the region where the instance resides. For example, the endpoint service name in the China (Hangzhou) region iscom.aliyuncs.privatelink.cn-hangzhou.cr.DNS resolution scope: When you enable endpoint access control, the internal domain name of the instance is automatically associated with the endpoint service. No separate DNS configuration is required.
This private resolution takes effect only in the VPC where the endpoint resides. To use the domain name from another network, first connect that network to the endpoint VPC by using a VPC peering connection, Cloud Enterprise Network (CEN), Express Connect, or VPN Gateway. Then configure resolution:
Another VPC: Add the domain name to Alibaba Cloud DNS PrivateZone and associate it with that VPC.
On-premises data center: Forward DNS queries for the domain name to a PrivateZone inbound endpoint.
Access security: Image data is transmitted only over the Alibaba Cloud internal network and is not exposed to the Internet. To further restrict access, associate security groups with the endpoint.
Zone-level disaster recovery: PrivateLink continuously health-checks the ENI IP address in each zone. If an IP address becomes unavailable, its DNS record is removed. The record is added back after the zone recovers. A single-zone failure therefore does not interrupt image pulls.
Elastic bandwidth: Endpoint bandwidth in each zone scales automatically with your workload, up to an upper limit. The actual throughput also depends on the processing capacity of the instance.
Choose a private access method
ACR Enterprise Edition supports two private access methods: endpoint access control and VPC access control. Endpoint access control also supports cross-account access, but you must share the client VPC first.
Method | Network requirement | Scenario |
Endpoint access control | The client VPC does not need to be connected to the instance network. Overlapping CIDR blocks are supported. |
|
VPC access control | The client VPC must belong to the same account as the instance, and its CIDR block must not conflict with that of the instance network. | Common same-account access without CIDR block conflicts |
Recommendations:
If the client VPC belongs to the same account as the instance, use VPC access control. It requires less configuration and incurs no additional fees. For more information, see Configure VPC access control.
If you need security groups to control access, or need high bandwidth and a large number of connections, use endpoint access control.
Usage notes
Endpoints can be created only in VPCs that reside in the same region as the ACR Enterprise Edition instance.
PrivateLink must be available in the region where the instance resides. For more information about the supported regions and zones, see Regions and zones that support PrivateLink.
To add an endpoint that belongs to another account, the service-linked role
AliyunServiceRoleForContainerRegistryAccessCustomerPrivateLinkmust already exist in that account.
Access an ACR Enterprise Edition instance over an endpoint
Perform the following steps. Step 2 is required only for cross-account access.
If the Endpoint Access Control tab is not displayed in the console, either your account is not on the whitelist, or the feature is not available in your region.
Enable endpoint access control.
Log on to the Container Registry console.
In the top navigation bar, select a region.
On the Instances page, click the Enterprise Edition instance that you want to manage.
On the instance management page, in the navigation pane on the left, choose .
Click the Endpoint Access Control tab, and then click Enable.
(Cross-account access only) Share the client VPC.
A cross-account endpoint is created in a VPC that belongs to another account. The VPC owner must first share the VPC and its vSwitches with the account that owns the instance. For more information, see Cross-account access to a Container Registry Enterprise Edition instance by using a shared VPC.
Add an endpoint.
On the Endpoint Access Control tab, click Add Endpoint and configure the following parameters:
VPC: Select the client VPC that needs to access the instance.
Zone and vSwitch: Select the zones and vSwitches in which to deploy the endpoint. To prevent a single-zone failure from interrupting access, select at least two zones.
Security Group: Select a security group to control access to the endpoint.
Access the instance.
In the endpoint VPC, push and pull images by using the internal domain name of the instance. No DNS or client configuration changes are required.
Format:
<instance-name>-registry-vpc.<RegionId>.cr.aliyuncs.comExample:
myinstance-registry-vpc.cn-hangzhou.cr.aliyuncs.com
Quotas and limits
Enabling endpoint access control consumes one VPC quota of the instance. If the quota is insufficient, delete the VPC access entries that you no longer use.
For more information about quotas such as the number of endpoints and bandwidth, see Quotas and limits.
Billing
Enabling endpoint access control is free of charge.
After you add an endpoint and traffic is generated, you are charged based on the standard billing rules of PrivateLink. For more information, see PrivateLink billing.
The ACR Enterprise Edition instance itself is billed separately based on its specifications and usage.