Mirroring an image set in a partially disconnected environment
You can mirror image sets to a registry using the oc-mirror plugin v2 in environments with restricted internet access.
During the mirroring process, the plugin automatically generates the ImageSetConfiguration and DeleteImageSetConfiguration files that are pinned by digest in your working directory, along with your original files that reference tags. Pinning by digest maintains consistency across your disconnected environments ensuring that you always deploy the same image, regardless of any later changes to the upstream tags.
-
You have access to the internet and the mirror registry in the environment where you are running the oc-mirror plugin v2.
-
Mirror the images from the specified image set configuration to a specified registry by running the following command:
$ oc mirror -c <image_set_configuration> --workspace file://<file_path> docker://<mirror_registry_url> --v2where:
- <image_set_configuration>
-
Specifies the name of the image set configuration file.
- <file_path>
-
Specifies the directory where cluster resources will be generated in.
- <mirror_registry_url>
-
Specifies the URL or address of the mirror registry where the images are stored and from which they need to be deleted.
-
Navigate to the
working-dir/cluster-resourcesdirectory that was generated in the<file_path>directory. -
Verify that the YAML files are present for the
ImageDigestMirrorSet,ImageTagMirrorSet, andCatalogSourceresources.
-
Configure your cluster to use the resources generated by oc-mirror plugin v2.