What Do I Do If an Event Indicating That the Image Failed to Be Pulled Occurs?
If the details page of a workload shows an event indicating that the image fails to be pulled, perform the following operations to locate the fault:
Check Item 1: imagePullSecret (This Is Required When You Use kubectl to Create a Workload)
In the following example, a Deployment named nginx is created. Check whether the .yaml file contains the imagePullSecrets field (bold field in the following information), which indicates the name of the secret used for pulling the image.
To pull an image from the SoftWare Repository for Container (SWR), set this field to imagepull-secret.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:alpine
imagePullPolicy: Always
name: nginx
imagePullSecrets:
- name: imagepull-secret Check Item 2: Image Address
CCI allows you to create workloads using images pulled from SWR.
SWR images can be obtained by using Template Address. After an image is pushed, you can obtain its address.
Check Item 2: IAM Users' Permissions to Download Images
If you have enabled the Enterprise Management service, you need to use your account to grant IAM users with permissions to access SWR so that the IAM users can download private images of the account.
You can grant permissions to IAM users in either of the following ways:
- Grant permissions on the image details page. After permissions granted, IAM users can read, edit, and manage the image. For more details, see Granting Permissions to Users on the Image Details Page.
- Grant permissions on the organization details page. After permissions granted, IAM users can read, edit, and manage all images in the organization. For more details, see Granting Permissions to Users on the Organization Details Page.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.