5.3. 从 OpenShift Container Storage 中删除 OpenShift Container Platform registry

使用这个部分从 OpenShift Container Storage 清理 OpenShift Container Platform registry。如果要配置其他存储,请参阅 镜像 registry

作为配置 OpenShift Container Platform registry 的一部分创建的 PVC 位于 openshift-image-registry 命名空间中。

先决条件

  • 镜像 registry 应配置为使用 OpenShift Container Storage PVC。

步骤

  1. 编辑 configs.imageregistry.operator.openshift.io 对象,并删除 storage 部分中的内容。

    $ oc edit configs.imageregistry.operator.openshift.io

    编辑前

    .
    .
    .
    storage:
        pvc:
            claim: registry-cephfs-rwx-pvc
    .
    .
    .

    编辑后

    .
    .
    .
    storage:
    .
    .
    .

    在本例中,PVC 称为 registry-cephfs-rwx-pvc,现在可以安全地删除。

  2. 删除 PVC。

    $ oc delete pvc <pvc-name> -n openshift-image-registry --wait=true --timeout=5m