Restoring the network
If you want to reconnect a disconnected cluster and pull images from online registries, delete the cluster’s ImageContentSourcePolicy (ICSP) objects. Without the ICSP, pull requests to external registries are no longer redirected to the mirror registry.
-
View the ICSP objects in your cluster:
$ oc get imagecontentsourcepolicyExample outputNAME AGE mirror-ocp 6d20h ocp4-index-0 6d18h qe45-index-0 6d15h -
Delete all the ICSP objects you created when disconnecting your cluster:
$ oc delete imagecontentsourcepolicy <icsp_name> <icsp_name> <icsp_name>For example:
$ oc delete imagecontentsourcepolicy mirror-ocp ocp4-index-0 qe45-index-0Example outputimagecontentsourcepolicy.operator.openshift.io "mirror-ocp" deleted imagecontentsourcepolicy.operator.openshift.io "ocp4-index-0" deleted imagecontentsourcepolicy.operator.openshift.io "qe45-index-0" deleted -
Wait for all the nodes to restart and return to the READY status and verify that the
registries.conffile is pointing to the original registries and not the mirror registries:-
Log in to a node:
$ oc debug node/<node_name> -
Set
/hostas the root directory within the debug shell:sh-4.4# chroot /host -
Examine the
registries.conffile:sh-4.4# cat /etc/containers/registries.confExample outputunqualified-search-registries = ["registry.access.redhat.com", "docker.io"]The
registryandregistry.mirrorentries created by the ICSPs you deleted are removed.
-