Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Understanding disconnected installation mirroring
You can use a mirror registry for disconnected installations and to ensure that your clusters only use container images that satisfy your organization’s controls on external content. Before you install a cluster on infrastructure that you provision in a disconnected environment, you must mirror the required container images into that environment. To mirror container images, you must have a registry for mirroring.
2.1. Mirroring images for a disconnected installation through the Agent-based Installer Copier lienLien copié sur presse-papiers!
You can use one of the following procedures to mirror your OpenShift Container Platform image repository to your mirror registry:
2.2. About mirroring the OpenShift Container Platform image repository for a disconnected registry Copier lienLien copié sur presse-papiers!
To use mirror images for a disconnected installation with the Agent-based Installer, you must modify the install-config.yaml file.
You can mirror the release image by using the output of either the oc adm release mirror or oc mirror command. This is dependent on which command you used to set up the mirror registry.
The following example shows the output of the oc adm release mirror command.
oc adm release mirror
$ oc adm release mirror
Example output
The following example shows part of the imageContentSourcePolicy.yaml file generated by the oc-mirror plugin. The file can be found in the results directory, for example oc-mirror-workspace/results-1682697932/.
Example imageContentSourcePolicy.yaml file
2.2.1. Configuring the Agent-based Installer to use mirrored images Copier lienLien copié sur presse-papiers!
You must use the output of either the oc adm release mirror command or the oc-mirror plugin to configure the Agent-based Installer to use mirrored images.
Procedure
If you used the oc-mirror plugin to mirror your release images:
-
Open the
imageContentSourcePolicy.yamllocated in the results directory, for exampleoc-mirror-workspace/results-1682697932/. -
Copy the text in the
repositoryDigestMirrorssection of the yaml file.
-
Open the
If you used the
oc adm release mirrorcommand to mirror your release images:-
Copy the text in the
imageContentSourcessection of the command output.
-
Copy the text in the
-
Paste the copied text into the
imageContentSourcesfield of theinstall-config.yamlfile. Add the certificate file used for the mirror registry to the
additionalTrustBundlefield of the yaml file.ImportantThe value must be the contents of the certificate file that you used for your mirror registry. The certificate file can be an existing, trusted certificate authority, or the self-signed certificate that you generated for the mirror registry.
Example
install-config.yamlfileadditionalTrustBundle: | -----BEGIN CERTIFICATE----- ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -----END CERTIFICATE-----additionalTrustBundle: | -----BEGIN CERTIFICATE----- ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -----END CERTIFICATE-----Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using GitOps ZTP manifests: add the
registries.confandca-bundle.crtfiles to themirrorpath to add the mirror configuration in the agent ISO image.NoteYou can create the
registries.conffile from the output of either theoc adm release mirrorcommand or theoc mirrorplugin. The format of the/etc/containers/registries.conffile has changed. It is now version 2 and in TOML format.Example
registries.conffileCopy to Clipboard Copied! Toggle word wrap Toggle overflow