必要な数のPersistentVolumes(PV)を作成します。
Web GUI画面で、メインメニューの[Storage]の[PersistentVolumes]をクリックし、[Create PersistentVolume]をクリック後、YAMLを編集してPVを作成します。
CLIを使用している場合は、yamlファイルを作成し、以下のコマンドを使用してPVを作成します。
$ oc create -f <file_name>.yaml
YAML定義は、以下の例を参照してください。
StorageClass名は、“C.1 StorageClassの作成”で作成したStorageClassを指定します。
PVごとに異なるNFSディレクトリを割り当てます。
さらに、accessModesはReadWriteManyです。
例)
apiVersion: v1
kind: PersistentVolume
metadata:
  name: < PV name >
spec:
  capacity:
    storage: < Capacity Required ex.8Gi >
  accessModes:
  - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  mountOptions:
    - hard
  nfs:
    path: < NFS directory path (Assign a different directory for each PV) ex. /nfs/pv >
    server: < IP address of the NFS server ex. 192.168.1.10>
  storageClassName: < “C.1 StorageClassの作成”で作成したStorageClass名>