This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.3. Configuring registry storage for bare metal
3.3.1. Configuring registry storage for bare metal リンクのコピーリンクがクリップボードにコピーされました!
As a cluster administrator, following installation you must configure your registry to use storage.
Prerequisites
- Cluster administrator permissions.
- A cluster on bare metal.
- Provision persistent storage for your cluster, such as Red Hat OpenShift Container Storage. To deploy a private image registry, your storage must provide ReadWriteMany access mode.
- Must have "100Gi" capacity.
Procedure
-
To configure your registry to use storage, change the
spec.storage.pvcin theconfigs.imageregistry/clusterresource. Verify you do not have a registry Pod:
oc get pod -n openshift-image-registry
$ oc get pod -n openshift-image-registryCopy to Clipboard Copied! Toggle word wrap Toggle overflow 注記If the storage type is
emptyDIR, the replica number cannot be greater than1. If the storage type isNFS, and you want to scale up the registry Pod by settingreplica>1you must enable theno_wdelaymount option. For example:cat /etc/exports /mnt/data *(rw,sync,no_wdelay,no_root_squash,insecure,fsid=0) sh-4.3# exportfs -rv exporting *:/mnt/data
# cat /etc/exports /mnt/data *(rw,sync,no_wdelay,no_root_squash,insecure,fsid=0) sh-4.3# exportfs -rv exporting *:/mnt/dataCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the registry configuration:
oc edit configs.imageregistry.operator.openshift.io
$ oc edit configs.imageregistry.operator.openshift.io storage: pvc: claim:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Leave the
claimfield blank to allow the automatic creation of animage-registry-storagePVC.Check the
clusteroperatorstatus:oc get clusteroperator image-registry
$ oc get clusteroperator image-registryCopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3.2. Additional resources リンクのコピーリンクがクリップボードにコピーされました!
For more details on configuring registry storage for bare metal, see Recommended configurable storage technology.