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.4. Configuring registry storage for vSphere
3.4.1. Configuring registry storage for VMware vSphere リンクのコピーリンクがクリップボードにコピーされました!
As a cluster administrator, following installation you must configure your registry to use storage.
Prerequisites
- Cluster administrator permissions.
- A cluster on VMware vSphere.
A provisioned persistent volume (PV) with
ReadWriteMany
access mode, such asNFS
.重要vSphere volumes do not support the
ReadWriteMany
access mode. You must use a different storage backend, such asNFS
, to configure the registry storage.- Must have "100Gi" capacity.
Procedure
-
To configure your registry to use storage, change the
spec.storage.pvc
in theconfigs.imageregistry/cluster
resource. Verify you do not have a registry Pod:
oc get pod -n openshift-image-registry
$ oc get pod -n openshift-image-registry
Copy 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>1
you must enable theno_wdelay
mount 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/data
Copy 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
claim
field blank to allow the automatic creation of animage-registry-storage
PVC.Optional: Add a new storage class to a PV:
Create the PV:
oc create -f -
$ oc create -f -
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get pv
$ oc get pv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the PVC:
oc create -n openshift-image-registry -f -
$ oc create -n openshift-image-registry -f -
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get pvc -n openshift-image-registry
$ oc get pvc -n openshift-image-registry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Finally, add the name of your PVC:
oc edit configs.imageregistry.operator.openshift.io -o yaml
$ oc edit configs.imageregistry.operator.openshift.io -o yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow storage: pvc: claim: image-registry-pvc
storage: pvc: claim: image-registry-pvc
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Creating a custom PVC allows you to leave the
claim
field blank for default automatic creation of animage-registry-storage
PVC.
Check the
clusteroperator
status:oc get clusteroperator image-registry
$ oc get clusteroperator image-registry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.4.2. Additional resources リンクのコピーリンクがクリップボードにコピーされました!
For more details on configuring registry storage for vSphere, see Recommended configurable storage technology.