An image repository is a location for storing and managing container images. AKS is integrated with Alibaba Cloud Container Registry (ACR), which lets you store, manage, and deploy container images from the ACR console. This topic describes how to upload a private image.
The Agile Edition environment does not support Alibaba Cloud Container Registry (ACR). You must use a self-managed image center instead.
Upload a private image
AKS is integrated with Alibaba Cloud Container Registry (ACR), which helps you manage private images. To upload private images, you can activate a free default ACR instance. AKS clusters can access the internal network address of the image instance.
For security reasons, the Gold Zone does not support public network access. You must upload images to the image repository from an Alibaba Cloud ECS instance. For other zones, you can follow the steps below.
Prerequisites
You have built an image locally.
Install Docker 1.6.0 or a later version on a machine.
Procedure
Log on to the Container Application Service console. In the navigation pane on the left, click Image Center > Image Repository.
Click Manage Image Center to navigate to the ACR console and create an image repository.
NoteMake sure that the image repository is in the same region where you activated the AKS product.
Log on to the machine where Docker is installed and run the following commands to push the image to the image repository.
sudo docker login --username=[TestUser] registry.cn-shanghai.aliyuncs.com sudo docker tag [ImageId] registry.cn-shanghai.aliyuncs.com/[namespace-name]/[repository-name]:[image-version] sudo docker push registry.cn-shanghai.aliyuncs.com/[namespace-name]/[repository-name]:[image-version]NoteReplace the
[TestUser],[ImageId],[namespace-name],[repository-name], and[image-version]parameters in the preceding commands with your actual values.The logon username is your complete Alibaba Cloud account name, and the password is the one that you set when you activated the service. You can change your password on the Access Credential page.
After the image is uploaded, navigate to Default Instance > Image Repository. Click the name of the image repository and then select Image Version to view the uploaded image. You can reference the internal network address of the image when you create an application service. AKS clusters can access the internal network address of the image instance.