PV 可以跨namespace 访问
但是PVC必须在相应的namespace
apiVersion: v1
kind: PersistentVolume
metadata:
name: test
labels:
name: test
spec:
nfs:
path: /data/nfsdata
server: 10.1.1.240
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
- ReadWriteMany
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test
namespace: xxxprod
spec:
accessModes: ["ReadWriteMany"]
resources:
requests:
storage: 5Gi
selector:
matchLabels:
name: test
网友评论