Configuring Mirroring
Consider the following example for configuring the mirroring.
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: dpod-cloud-agent-registry-mirror
spec:
repositoryDigestMirrors:
- mirrors:
- icr.io/dpod
source: icr.io/cpopen
If the Mirroring doesn’t Work
Some OCP environments are not running the Machine Config Operator that allows modifying the nodes configuration files using K8S resources such as the ImageContentSourcePolicy.
For such environments, you must manually add the mirroring configuration for each one of the worker nodes in /etc/containers/registries.conf and reboot the worker nodes by issuing systemctl reboot on each one of them.
Note: Change the registry.mirror entries according to your environment.
[[registry]]
prefix = ""
location = "icr.io/cpopen"
mirror-by-digest-only = true
[[registry.mirror]]
location = "icr.io/dpod"