apiVersion: v1
kind: PersistentVolume
metadata:
name: nexus-data
spec:
capacity:
storage: 5Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: nfs
nfs:
path: /var/nfs/nexus-data
server: 192.168.0.250
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nexus-data-pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 5Gi
storageClassName: nfs
原文:https://www.cnblogs.com/wh-blog/p/12232574.html