This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Chapter 9. Image configuration resources
Use the following procedure to configure image registries.
9.1. Image controller configuration parameters
				The image.config.openshift.io/cluster resource holds cluster-wide information about how to handle images. The canonical, and only valid name is cluster. Its spec offers the following configuration parameters.
			
					Parameters such as DisableScheduledImport, MaxImagesBulkImportedPerRepository, MaxScheduledImportsPerMinute, ScheduledImageImportMinimumIntervalSeconds, InternalRegistryHostname are not configurable.
				
| Parameter | Description | 
|---|---|
| 
								 | 
								Limits the container image registries from which normal users can import images. Set this list to the registries that you trust to contain valid images, and that you want applications to be able to import from. Users with permission to create images or  Every element of this list contains a location of the registry specified by the registry domain name. 
								 
								 | 
| 
								 | 
								A reference to a config map containing additional CAs that should be trusted during  
								The namespace for this config map is  | 
| 
								 | 
								Provides the hostnames for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The first value is used in  | 
| 
								 | Contains configuration that determines how the container runtime should treat individual registries when accessing images for builds and pods. For instance, whether or not to allow insecure access. It does not contain configuration for the internal cluster registry. 
								 
								 
								 
								 
								Either  | 
					When the allowedRegistries parameter is defined, all registries, including registry.redhat.io and quay.io registries and the default OpenShift image registry, are blocked unless explicitly listed. When using the parameter, to prevent pod failure, add all registries including the registry.redhat.io and quay.io registries and the internalRegistryHostname to the allowedRegistries list, as they are required by payload images within your environment. For disconnected clusters, mirror registries should also be added.
				
				The status field of the image.config.openshift.io/cluster resource holds observed values from the cluster.
			
| Parameter | Description | 
|---|---|
| 
								 | 
								Set by the Image Registry Operator, which controls the  | 
| 
								 | 
								Set by the Image Registry Operator, provides the external hostnames for the image registry when it is exposed externally. The first value is used in  | 
9.2. Configuring image registry settings
				You can configure image registry settings by editing the image.config.openshift.io/cluster custom resource (CR). When changes to the registry are applied to the image.config.openshift.io/cluster CR, the Machine Config Operator (MCO) performs the following sequential actions:
			
- Cordons the node
- Applies changes by restarting CRI-O
- Uncordons the node Note- The MCO does not restart nodes when it detects changes. 
Procedure
- Edit the - image.config.openshift.io/clustercustom resource:- oc edit image.config.openshift.io/cluster - $ oc edit image.config.openshift.io/cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following is an example - image.config.openshift.io/clusterCR:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Image: Holds cluster-wide information about how to handle images. The canonical, and only valid name is- cluster.
- 2
- allowedRegistriesForImport: Limits the container image registries from which normal users may import images. Set this list to the registries that you trust to contain valid images, and that you want applications to be able to import from. Users with permission to create images or- ImageStreamMappingsfrom the API are not affected by this policy. Typically only cluster administrators have the appropriate permissions.
- 3
- additionalTrustedCA: A reference to a config map containing additional certificate authorities (CA) that are trusted during image stream import, pod image pull,- openshift-image-registrypullthrough, and builds. The namespace for this config map is- openshift-config. The format of the config map is to use the registry hostname as the key, and the PEM certificate as the value, for each additional registry CA to trust.
- 4
- registrySources: Contains configuration that determines whether the container runtime allows or blocks individual registries when accessing images for builds and pods. Either the- allowedRegistriesparameter or the- blockedRegistriesparameter can be set, but not both. You can also define whether or not to allow access to insecure registries or registries that allow registries that use image short names. This example uses the- allowedRegistriesparameter, which defines the registries that are allowed to be used. The insecure registry- insecure.comis also allowed. The- registrySourcesparameter does not contain configuration for the internal cluster registry.
 Note- When the - allowedRegistriesparameter is defined, all registries, including the registry.redhat.io and quay.io registries and the default OpenShift image registry, are blocked unless explicitly listed. If you use the parameter, to prevent pod failure, you must add the- registry.redhat.ioand- quay.ioregistries and the- internalRegistryHostnameto the- allowedRegistrieslist, as they are required by payload images within your environment. Do not add the- registry.redhat.ioand- quay.ioregistries to the- blockedRegistrieslist.- When using the - allowedRegistries,- blockedRegistries, or- insecureRegistriesparameter, you can specify an individual repository within a registry. For example:- reg1.io/myrepo/myapp:latest.- Insecure external registries should be avoided to reduce possible security risks. 
- To check that the changes are applied, list your nodes: - oc get nodes - $ oc get nodes- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.1. Adding specific registries
					You can add a list of registries, and optionally an individual repository within a registry, that are permitted for image pull and push actions by editing the image.config.openshift.io/cluster custom resource (CR). OpenShift Container Platform applies the changes to this CR to all nodes in the cluster.
				
					When pulling or pushing images, the container runtime searches the registries listed under the registrySources parameter in the image.config.openshift.io/cluster CR. If you created a list of registries under the allowedRegistries parameter, the container runtime searches only those registries. Registries not in the list are blocked.
				
						When the allowedRegistries parameter is defined, all registries, including the registry.redhat.io and quay.io registries and the default OpenShift image registry, are blocked unless explicitly listed. If you use the parameter, to prevent pod failure, add the registry.redhat.io and quay.io registries and the internalRegistryHostname to the allowedRegistries list, as they are required by payload images within your environment. For disconnected clusters, mirror registries should also be added.
					
Procedure
- Edit the - image.config.openshift.io/clusterCR:- oc edit image.config.openshift.io/cluster - $ oc edit image.config.openshift.io/cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following is an example - image.config.openshift.io/clusterCR with an allowed list:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Contains configurations that determine how the container runtime should treat individual registries when accessing images for builds and pods. It does not contain configuration for the internal cluster registry.
- 2
- Specify registries, and optionally a repository in that registry, to use for image pull and push actions. All other registries are blocked.
 Note- Either the - allowedRegistriesparameter or the- blockedRegistriesparameter can be set, but not both.- The Machine Config Operator (MCO) watches the - image.config.openshift.io/clusterresource for any changes to the registries. When the MCO detects a change, it drains the nodes, applies the change, and uncordons the nodes. After the nodes return to the- Readystate, the allowed registries list is used to update the image signature policy in the- /etc/containers/policy.jsonfile on each node.
Verification
- Enter the following command to obtain a list of your nodes: - oc get nodes - $ oc get nodes- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Run the following command to enter debug mode on the node: - oc debug node/<node_name> - $ oc debug node/<node_name>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- When prompted, enter - chroot /hostinto the terminal:- chroot /host - sh-4.4# chroot /host- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Enter the following command to check that the registries have been added to the policy file: - cat /etc/containers/policy.json | jq '.' - sh-5.1# cat /etc/containers/policy.json | jq '.'- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following policy indicates that only images from the example.com, quay.io, and registry.redhat.io registries are permitted for image pulls and pushes: - Example 9.1. Example image signature policy file - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
						If your cluster uses the registrySources.insecureRegistries parameter, ensure that any insecure registries are included in the allowed list.
					
For example:
9.2.2. Blocking specific registries
					You can block any registry, and optionally an individual repository within a registry, by editing the image.config.openshift.io/cluster custom resource (CR). OpenShift Container Platform applies the changes to this CR to all nodes in the cluster.
				
					When pulling or pushing images, the container runtime searches the registries listed under the registrySources parameter in the image.config.openshift.io/cluster CR. If you created a list of registries under the blockedRegistries parameter, the container runtime does not search those registries. All other registries are allowed.
				
						To prevent pod failure, do not add the registry.redhat.io and quay.io registries to the blockedRegistries list, as they are required by payload images within your environment.
					
Procedure
- Edit the - image.config.openshift.io/clusterCR:- oc edit image.config.openshift.io/cluster - $ oc edit image.config.openshift.io/cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following is an example - image.config.openshift.io/clusterCR with a blocked list:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Contains configurations that determine how the container runtime should treat individual registries when accessing images for builds and pods. It does not contain configuration for the internal cluster registry.
- 2
- Specify registries, and optionally a repository in that registry, that should not be used for image pull and push actions. All other registries are allowed.
 Note- Either the - blockedRegistriesregistry or the- allowedRegistriesregistry can be set, but not both.- The Machine Config Operator (MCO) watches the - image.config.openshift.io/clusterresource for any changes to the registries. When the MCO detects a change, it drains the nodes, applies the change, and uncordons the nodes. After the nodes return to the- Readystate, changes to the blocked registries appear in the- /etc/containers/registries.conffile on each node.
Verification
- Enter the following command to obtain a list of your nodes: - oc get nodes - $ oc get nodes- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Run the following command to enter debug mode on the node: - oc debug node/<node_name> - $ oc debug node/<node_name>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- When prompted, enter - chroot /hostinto the terminal:- chroot /host - sh-4.4# chroot /host- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Enter the following command to check that the registries have been added to the policy file: - cat etc/containers/registries.conf - sh-5.1# cat etc/containers/registries.conf- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following example indicates that images from the - untrusted.comregistry are prevented for image pulls and pushes:- Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
9.2.2.1. Blocking a payload registry
						In a mirroring configuration, you can block upstream payload registries in a disconnected environment using a ImageContentSourcePolicy (ICSP) object. The following example procedure demonstrates how to block the quay.io/openshift-payload payload registry.
					
Procedure
- Create the mirror configuration using an - ImageContentSourcePolicy(ICSP) object to mirror the payload to a registry in your instance. The following example ICSP file mirrors the payload- internal-mirror.io/openshift-payload:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- After the object deploys onto your nodes, verify that the mirror configuration is set by checking the - /etc/containers/registries.conffile:- Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Use the following command to edit the - image.config.openshift.iocustom resource file:- oc edit image.config.openshift.io cluster - $ oc edit image.config.openshift.io cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To block the payload registry, add the following configuration to the - image.config.openshift.iocustom resource file:- spec: registrySource: blockedRegistries: - quay.io/openshift-payload- spec: registrySource: blockedRegistries: - quay.io/openshift-payload- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
Verification
- Verify that the upstream payload registry is blocked by checking the - /etc/containers/registries.conffile on the node.- Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.3. Allowing insecure registries
					You can add insecure registries, and optionally an individual repository within a registry, by editing the image.config.openshift.io/cluster custom resource (CR). OpenShift Container Platform applies the changes to this CR to all nodes in the cluster.
				
Registries that do not use valid SSL certificates or do not require HTTPS connections are considered insecure.
Insecure external registries should be avoided to reduce possible security risks.
Procedure
- Edit the - image.config.openshift.io/clusterCR:- oc edit image.config.openshift.io/cluster - $ oc edit image.config.openshift.io/cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following is an example - image.config.openshift.io/clusterCR with an insecure registries list:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Contains configurations that determine how the container runtime should treat individual registries when accessing images for builds and pods. It does not contain configuration for the internal cluster registry.
- 2
- Specify an insecure registry. You can specify a repository in that registry.
- 3
- Ensure that any insecure registries are included in theallowedRegistrieslist.
 Note- When the - allowedRegistriesparameter is defined, all registries, including the registry.redhat.io and quay.io registries and the default OpenShift image registry, are blocked unless explicitly listed. If you use the parameter, to prevent pod failure, add all registries including the- registry.redhat.ioand- quay.ioregistries and the- internalRegistryHostnameto the- allowedRegistrieslist, as they are required by payload images within your environment. For disconnected clusters, mirror registries should also be added.- The Machine Config Operator (MCO) watches the - image.config.openshift.io/clusterCR for any changes to the registries, then drains and uncordons the nodes when it detects changes. After the nodes return to the- Readystate, changes to the insecure and blocked registries appear in the- /etc/containers/registries.conffile on each node.
Verification
- To check that the registries have been added to the policy file, use the following command on a node: - cat /etc/containers/registries.conf - $ cat /etc/containers/registries.conf- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following example indicates that images from the - insecure.comregistry is insecure and is allowed for image pulls and pushes.- Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.4. Adding registries that allow image short names
					You can add registries to search for an image short name by editing the image.config.openshift.io/cluster custom resource (CR). OpenShift Container Platform applies the changes to this CR to all nodes in the cluster.
				
					An image short name enables you to search for images without including the fully qualified domain name in the pull spec. For example, you could use rhel7/etcd instead of registry.access.redhat.com/rhe7/etcd.
				
You might use short names in situations where using the full path is not practical. For example, if your cluster references multiple internal registries whose DNS changes frequently, you would need to update the fully qualified domain names in your pull specs with each change. In this case, using an image short name might be beneficial.
					When pulling or pushing images, the container runtime searches the registries listed under the registrySources parameter in the image.config.openshift.io/cluster CR. If you created a list of registries under the containerRuntimeSearchRegistries parameter, when pulling an image with a short name, the container runtime searches those registries.
				
Using image short names with public registries is strongly discouraged because the image might not deploy if the public registry requires authentication. Use fully-qualified image names with public registries.
Red Hat internal or private registries typically support the use of image short names.
						If you list public registries under the containerRuntimeSearchRegistries parameter, you expose your credentials to all the registries on the list and you risk network and registry attacks.
					
						You cannot list multiple public registries under the containerRuntimeSearchRegistries parameter if each public registry requires different credentials and a cluster does not list the public registry in the global pull secret.
					
For a public registry that requires authentication, you can use an image short name only if the registry has its credentials stored in the global pull secret.
					The Machine Config Operator (MCO) watches the image.config.openshift.io/cluster resource for any changes to the registries. When the MCO detects a change, it drains the nodes, applies the change, and uncordons the nodes. After the nodes return to the Ready state, if the containerRuntimeSearchRegistries parameter is added, the MCO creates a file in the /etc/containers/registries.conf.d directory on each node with the listed registries. The file overrides the default list of unqualified search registries in the /etc/containers/registries.conf file. There is no way to fall back to the default list of unqualified search registries.
				
					The containerRuntimeSearchRegistries parameter works only with the Podman and CRI-O container engines. The registries in the list can be used only in pod specs, not in builds and image streams.
				
Procedure
- Edit the - image.config.openshift.io/clusterCR:- oc edit image.config.openshift.io/cluster - $ oc edit image.config.openshift.io/cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The following is an example - image.config.openshift.io/clusterCR:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- When the - allowedRegistriesparameter is defined, all registries, including the- registry.redhat.ioand- quay.ioregistries and the default OpenShift image registry, are blocked unless explicitly listed. If you use this parameter, to prevent pod failure, add all registries including the- registry.redhat.ioand- quay.ioregistries and the- internalRegistryHostnameto the- allowedRegistrieslist, as they are required by payload images within your environment. For disconnected clusters, mirror registries should also be added.
Verification
- Enter the following command to obtain a list of your nodes: - oc get nodes - $ oc get nodes- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b - NAME STATUS ROLES AGE VERSION <node_name> Ready control-plane,master 37m v1.27.8+4fab27b- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Run the following command to enter debug mode on the node: - oc debug node/<node_name> - $ oc debug node/<node_name>- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- When prompted, enter - chroot /hostinto the terminal:- chroot /host - sh-4.4# chroot /host- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Enter the following command to check that the registries have been added to the policy file: - cat /etc/containers/registries.conf.d/01-image-searchRegistries.conf - sh-5.1# cat /etc/containers/registries.conf.d/01-image-searchRegistries.conf- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - unqualified-search-registries = ['reg1.io', 'reg2.io', 'reg3.io'] - unqualified-search-registries = ['reg1.io', 'reg2.io', 'reg3.io']- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
9.2.5. Configuring additional trust stores for image registry access
					The image.config.openshift.io/cluster custom resource can contain a reference to a config map that contains additional certificate authorities to be trusted during image registry access.
				
Prerequisites
- The certificate authorities (CA) must be PEM-encoded.
Procedure
						You can create a config map in the openshift-config namespace and use its name in AdditionalTrustedCA in the image.config.openshift.io custom resource to provide additional CAs that should be trusted when contacting external registries.
					
The config map key is the hostname of a registry with the port for which this CA is to be trusted, and the PEM certificate content is the value, for each additional registry CA to trust.
Image registry CA config map example
- 1
- If the registry has the port, such asregistry-with-port.example.com:5000,:should be replaced with...
You can configure additional CAs with the following procedure.
- To configure an additional CA: - oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config - $ oc create configmap registry-config --from-file=<external_registry_address>=ca.crt -n openshift-config- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - oc edit image.config.openshift.io cluster - $ oc edit image.config.openshift.io cluster- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - spec: additionalTrustedCA: name: registry-config- spec: additionalTrustedCA: name: registry-config- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
9.2.6. Configuring image registry repository mirroring
Setting up container registry repository mirroring enables you to do the following:
- Configure your OpenShift Container Platform cluster to redirect requests to pull images from a repository on a source image registry and have it resolved by a repository on a mirrored image registry.
- Identify multiple mirrored repositories for each target repository, to make sure that if one mirror is down, another can be used.
The attributes of repository mirroring in OpenShift Container Platform include:
- Image pulls are resilient to registry downtimes.
- Clusters in disconnected environments can pull images from critical locations, such as quay.io, and have registries behind a company firewall provide the requested images.
- A particular order of registries is tried when an image pull request is made, with the permanent registry typically being the last one tried.
- 
							The mirror information you enter is added to the /etc/containers/registries.conffile on every node in the OpenShift Container Platform cluster.
- When a node makes a request for an image from the source repository, it tries each mirrored repository in turn until it finds the requested content. If all mirrors fail, the cluster tries the source repository. If successful, the image is pulled to the node.
Setting up repository mirroring can be done in the following ways:
- At OpenShift Container Platform installation: - By pulling container images needed by OpenShift Container Platform and then bringing those images behind your company’s firewall, you can install OpenShift Container Platform into a datacenter that is in a disconnected environment. 
- After OpenShift Container Platform installation: - Even if you don’t configure mirroring during OpenShift Container Platform installation, you can do so later using the - ImageContentSourcePolicyobject.
					The following procedure provides a post-installation mirror configuration, where you create an ImageContentSourcePolicy object that identifies:
				
- The source of the container image repository you want to mirror.
- A separate entry for each mirror repository you want to offer the content requested from the source repository.
						You can only configure global pull secrets for clusters that have an ImageContentSourcePolicy object. You cannot add a pull secret to a project.
					
Prerequisites
- 
							Access to the cluster as a user with the cluster-adminrole.
Procedure
- Configure mirrored repositories, by either: - Setting up a mirrored repository with Red Hat Quay, as described in Red Hat Quay Repository Mirroring. Using Red Hat Quay allows you to copy images from one repository to another and also automatically sync those repositories repeatedly over time.
- Using a tool such as - skopeoto copy images manually from the source directory to the mirrored repository.- For example, after installing the skopeo RPM package on a Red Hat Enterprise Linux (RHEL) 7 or RHEL 8 system, use the - skopeocommand as shown in this example:- skopeo copy \ docker://registry.access.redhat.com/ubi8/ubi-minimal@sha256:5cfbaf45ca96806917830c183e9f37df2e913b187adb32e89fd83fa455ebaa6 \ docker://example.io/example/ubi-minimal - $ skopeo copy \ docker://registry.access.redhat.com/ubi8/ubi-minimal@sha256:5cfbaf45ca96806917830c183e9f37df2e913b187adb32e89fd83fa455ebaa6 \ docker://example.io/example/ubi-minimal- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - In this example, you have a container image registry that is named - example.iowith an image repository named- exampleto which you want to copy the- ubi8/ubi-minimalimage from- registry.access.redhat.com. After you create the registry, you can configure your OpenShift Container Platform cluster to redirect requests made of the source repository to the mirrored repository.
 
- Log in to your OpenShift Container Platform cluster.
- Create an - ImageContentSourcePolicyfile (for example,- registryrepomirror.yaml), replacing the source and mirrors with your own registry and repository pairs and images:- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - 1
- Indicates the name of the image registry and repository.
- 2
- Indicates multiple mirror repositories for each target repository. If one mirror is down, the target repository can use another mirror.
- 3
- Indicates the registry and repository containing the content that is mirrored.
- 4
- You can configure a namespace inside a registry to use any image in that namespace. If you use a registry domain as a source, theImageContentSourcePolicyresource is applied to all repositories from the registry.
- 5
- If you configure the registry name, theImageContentSourcePolicyresource is applied to all repositories from a source registry to a mirror registry.
- 6
- Pulls the imagemirror.example.net/image@sha256:….
- 7
- Pulls the imagemyimagein the source registry namespace from the mirrormirror.example.net/myimage@sha256:….
- 8
- Pulls the imageregistry.example.com/example/myimagefrom the mirror registrymirror.example.net/registry-example-com/example/myimage@sha256:…. TheImageContentSourcePolicyresource is applied to all repositories from a source registry to a mirror registrymirror.example.net/registry-example-com.
 
- Create the new - ImageContentSourcePolicyobject:- oc create -f registryrepomirror.yaml - $ oc create -f registryrepomirror.yaml- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - After the - ImageContentSourcePolicyobject is created, the new settings are deployed to each node and the cluster starts using the mirrored repository for requests to the source repository.
- To check that the mirrored configuration settings, are applied, do the following on one of the nodes. - List your nodes: - oc get node - $ oc get node- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - The - Imagecontentsourcepolicyresource does not restart the nodes.
- Start the debugging process to access the node: - oc debug node/ip-10-0-147-35.ec2.internal - $ oc debug node/ip-10-0-147-35.ec2.internal- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Starting pod/ip-10-0-147-35ec2internal-debug ... To use host binaries, run `chroot /host` - Starting pod/ip-10-0-147-35ec2internal-debug ... To use host binaries, run `chroot /host`- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Change your root directory to - /host:- chroot /host - sh-4.2# chroot /host- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Check the - /etc/containers/registries.conffile to make sure the changes were made:- cat /etc/containers/registries.conf - sh-4.2# cat /etc/containers/registries.conf- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Pull an image digest to the node from the source and check if it is resolved by the mirror. - ImageContentSourcePolicyobjects support image digests only, not image tags.- podman pull --log-level=debug registry.access.redhat.com/ubi8/ubi-minimal@sha256:5cfbaf45ca96806917830c183e9f37df2e913b187adb32e89fd83fa455ebaa6 - sh-4.2# podman pull --log-level=debug registry.access.redhat.com/ubi8/ubi-minimal@sha256:5cfbaf45ca96806917830c183e9f37df2e913b187adb32e89fd83fa455ebaa6- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
 
Troubleshooting repository mirroring
If the repository mirroring procedure does not work as described, use the following information about how repository mirroring works to help troubleshoot the problem.
- The first working mirror is used to supply the pulled image.
- The main registry is only used if no other mirror works.
- 
							From the system context, the Insecureflags are used as fallback.
- 
							The format of the /etc/containers/registries.conffile has changed recently. It is now version 2 and in TOML format.