Image Snapshot Overview
Images from SWR or third-party image repositories (such as open-source repositories or self-managed repositories) can be used to create image snapshots. After image snapshots are created, they can be used to create workloads, and there is no need to pull the images. This speeds up workload startup.
When creating a pod, you can use an image snapshot to avoid image download and reduce the pod startup time. This section describes the constraints on image snapshots and how you can use them.
Constraints
- An image snapshot can contain a maximum of 10 images.
- Private image repositories are supported. However, the access credentials of private image repositories must be provided, including the address and authentication information, such as the auth information in ~/.docker/config.json.
- If the image needs to be pulled over the public network, you need to specify the public network access configuration in advance.
- If only some images in an image snapshot are consistent with those for the pod, inconsistent images still need to be pulled.
- If the image of a running pod changes and the new image is inconsistent with any image in the image snapshot, the new image needs to be pulled.
- By default, a CCI pod with 2 vCPUs and 4 GiB of memory will be used to create an image snapshot. You will be billed for this pod.
Image Snapshot Creation Methods
An image snapshot can be created manually or automatically.
- Manual creation
You can create an image snapshot by configuring the parameters such as the image snapshot name and image size. The following figure shows the process.

- Automatic creation
When you create a CCI pod, you can enable automatic image snapshot creation. If no image snapshot is matched, CCI automatically creates an image snapshot while creating the CCI pod. The following figure shows the process.

It takes some time to create an image snapshot. As a result, the CCI pod created before the image snapshot is created cannot use the image snapshot.
Manually-created image snapshots differ from automatically-created image snapshots in many aspects such as the image size and image snapshot retention period. For details, see Table 1.
| Item | Manual Creation | Automatic Creation | |
|---|---|---|---|
| Name | User-defined | Unique for each tenant and prefixed with auto-create-by-cci | |
| Expiration time | User-defined. The default value is 0, indicating that the snapshot never expires. | 30 days | |
| Image snapshot size | User-defined. The default value is 20 GiB. | 20 GiB | |
| Image list | User-defined | All images of the pod you create | |
| Namespace of the temporary pod created during image snapshot creation | User-defined | Namespace of the pod you create | |
| HTTP for access to the image repository | User-defined. The default protocol is HTTPS. | Not supported. The default protocol is HTTPS. | |
| Skipping client certificate verification when HTTPS is used for access to the image repository | User-defined. The client certificate is verified by default. | Not supported. The client certificate is verified by default. | |
| Access secret | User-defined | ImagePullSecrets configured for the pod you create | |
| Network settings | EIP used for pulling images over the public network | User-defined | Not supported |
| Whether to automatically assign an EIP for the pod that is used for creating the image snapshot | User-defined. By default, no EIP is assigned. | If an EIP is automatically assigned to the pod you create, an EIP is also assigned to the temporary pod for creating the image snapshot. | |
| Billing by traffic or bandwidth | User-defined. By default, billing by bandwidth is used. | Same as the billing mode configured when the EIP is automatically assigned for the pod you create | |
| Bandwidth | User-defined | Same as the bandwidth configured when the EIP is automatically assigned for the pod you create | |
| EIP type | User-defined | Same as the EIP type configured when the EIP is automatically assigned for the pod you create | |
| EIP version | User-defined. The default version is IPv4. | EIP version configured when the EIP is automatically assigned for the pod you create | |
Creating a Pod Using an Image Snapshot
You can use an image snapshot to create a pod in either of the following ways:
- Method 1: Automatic matching
The optimal image snapshots are selected from all available image snapshots based on the following:
- Image matching degree: The images in the image snapshots are matched with those used by the pod, and the most matched image snapshots are preferred.
- Time when image snapshots were created: The latest image snapshot is preferred.
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