OpenShift PersistentVolume Operations

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Delete a Persistent Volume

oc delete pv <persistent-volume-name>
oc delete pv metrics-volume

Create a Persistent Volume

NFS

apiVersion: v1
kind: PersistentVolume
metadata:
  name: metrics-volume
spec:
  capacity:
    storage: 10Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  nfs:
    path: /support-nfs-storage/metrics
    server: support.local

Make sure the "support.local" server is accessible from any node that will use the volume, and the /support-nfs-storage/metrics is exported and has sufficient permissions.