Configuring your cluster to use the resources generated by oc-mirror plugin v2
After you have mirrored your image set to the mirror registry, you must apply the generated ImageDigestMirrorSet (IDMS), ImageTagMirrorSet (ITMS), CatalogSource, and UpdateService resources to the cluster.
|
|
In oc-mirror plugin v2, the IDMS and ITMS files cover the entire image set, unlike the |
-
You have access to the cluster as a user with the
cluster-adminrole.
-
Log in to the OpenShift CLI as a user with the
cluster-adminrole. -
Apply the YAML files from the results directory to the cluster by running the following command:
$ oc apply -f <path_to_oc_mirror_workspace>/working-dir/cluster-resources -
If you mirrored release images, apply the release image signatures to the cluster by running the following command:
$ oc apply -f working-dir/cluster-resources/signature-configmap.jsonIf you are mirroring Operators instead of clusters, do not run the preceding command. Running the command results in an error because there are no release image signatures to apply.
Additionally, a YAML file is available in the same directory
working-dir/cluster-resources/. You can use either the JSON or YAML format.
-
Verify that the
ImageDigestMirrorSetresources are successfully installed by running the following command:$ oc get imagedigestmirrorsetTo view only the resources created by
oc-mirror, run the following command:$ oc get imagedigestmirrorset -o jsonpath='{.items[?(@.metadata.annotations.createdBy=="oc-mirror v2")].metadata.name}' -
Verify that the
ImageTagMirrorSetresources are successfully installed by running the following command:$ oc get imagetagmirrorsetTo view only the resources created by
oc-mirror, run the following command:$ oc get imagetagmirrorset -o jsonpath='{.items[?(@.metadata.annotations.createdBy=="oc-mirror v2")].metadata.name}' -
Verify that the
CatalogSourceresources are successfully installed by running the following command:$ oc get catalogsource -n openshift-marketplaceTo view only the resources created by
oc-mirror, run the following command:$ oc get catalogsource -o jsonpath='{.items[?(@.metadata.annotations.createdBy=="oc-mirror v2")].metadata.name}' -
Verify that the
ClusterCatalogresources are successfully installed by running the following command:$ oc get clustercatalogTo view only the resources created by
oc-mirror, run the following command:$ oc get clustercatalog -o jsonpath='{.items[?(@.metadata.annotations.createdBy=="oc-mirror v2")].metadata.name}'