Image Cache Overview
When creating a workload, you need to pull specified container images. The image download speed affects the workload creation efficiency. To speed up workload creation, CCE Autopilot support image caches. With image caches, you can create image snapshots for the required images and create workloads using the image snapshots. This accelerates image download and workload startup. In addition, image caches reduce bandwidth consumption and prevent workload creation failures caused by network problems, improving cluster efficiency and reliability.
The following are common application scenarios of image caches:
- If the size of an image to be downloaded is greater than 1 GiB, image caches can accelerate workload creation.
- During peak hours, when a cluster needs to scale a workload quickly, image caches can be used to improve the workload scale-out efficiency.
- During continuous integration and deployment, it takes a lot of time to build images frequently. Image caches can avoid repeated download and build of container images, significantly shortening pipeline execution time and improving delivery efficiency.
Image caches are supported in some regions. View the regions where image caches are supported on the console. You can also view Function Overview to learn about all regions where this function is supported.
Precautions
- Creating an image cache
- You can create up to 50 image caches, and each image cache can contain a maximum of 20 container images. Images are downloaded in serial mode. If any selected image fails to be downloaded, the image cache creation fails.
- When creating an image cache, a temporary pod will be created to pull the container images. The version of the CCE Autopilot cluster where the pod runs must be v1.28.8, v1.31.4, or later.
- Image caches are tenant-level resources. After an image cache is created, it can only be used by CCE Autopilot clusters of v1.28.8, v1.31.4, or later in the current region. In multi-tenant scenarios, you are advised not to create image caches for private images that do not need to be shared.
- If the images need to be pulled from the SWR image center, VPC endpoints for accessing SWR and OBS must be configured for the cluster in advance. You can go to the Overview page of the cluster and check whether VPC endpoints have been configured for Image Access in the Networking Configuration area. If no VPC endpoint is configured for the cluster, configure one by following the instructions in Configuring a VPC Endpoint for Accessing the Image Center.
- If the images need to be pulled over the public network, you need to configure SNAT rules on the NAT Gateway for the cluster in advance. You can go to the Overview page of the cluster and check whether SNAT rules have been configured for Internet Access (SNAT) in the Networking Configuration area. If no SNAT rules have been configured for the cluster, configure them by referring to Accessing the Public Network from a Container.
- If third-party images are used, you need to provide the address, username, and password of the private image repository for creating a secret.
- Using an image cache:
- After an image cache is created, it can only be used by CCE Autopilot clusters of v1.28.8, v1.31.4, or later in the current region. If the cluster version does not meet the requirements, you need to upgrade the cluster. For details about cluster upgrades, see Upgrade Overview.
- When you create a workload, only one image cache can be specified. If the images in the image cache cannot fully match the workload, unmatched images still need to be downloaded from the original image repository.
- Image caches are mainly used to accelerate image download. When using an image cache, ensure that the network connectivity between the workload and image repository is normal and the image download credentials are correct.
- If an image cache expires after a workload is created using the image cache, the created workload is not affected. However, if the workload requires operations such as upgrade or auto scaling, the image cache cannot be used. In this case, you need to download the images again.
- When an image cache is used, an EVS disk is automatically attached to each pod. Each EVS disk has the same size as that of the image cache and will be created and released together with the pod. Container image information is automatically stored in each EVS disk.
Workflow
Figure 1 shows how an image cache is created, used, and managed. For more information, see the following sections:
Billing
Operation Phase |
Billed Item |
Billing |
Reference |
---|---|---|---|
Creating an image cache |
Pod |
Pod billing is involved. During the creation of an image cache, a temporary pod is required to pull the container images. The pod specifications are as follows:
After the image cache is created, the pod is automatically cleared, and the billing stops.
NOTE:
Currently, image caches are free. You may be billed in the future. You can view the price on the console. |
For details about pod price, see Billing Items of CCE Autopilot Clusters. |
Using an image cache |
Pod |
When an image cache is used, an EVS disk is automatically attached to each pod. Each EVS disk has the same size as that of the image cache and will be created and released together with the pod. |
For details about pod price, see Billing Items of CCE Autopilot Clusters. |
Lifecycle of an Image Cache
Status |
Description |
---|---|
Creating |
The image cache is being created. |
Available |
The image cache is ready for use. |
Failed |
The image cache failed to be created. |
Unavailable |
The image cache is abnormal or expired. |
Deleting |
The image cache is being deleted. |

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