Commit 58cc2c9f by tingweiwang

add pv lable selector

1 parent 60ccdf4d
Showing with 15 additions and 1 deletions
......@@ -3,10 +3,11 @@ apiVersion: v1
kind: PersistentVolume
metadata:
name: kpl-pv
labels:
pv: kpl-pv
spec:
nfs:
path: NFS_PATH ##########模板变量,nfs的目录
server: NFS_SERVER #############模板变量,nfs的ip
accessModes:
- ReadWriteMany
......@@ -25,12 +26,17 @@ spec:
resources:
requests:
storage: 500Gi
selector:
matchLabels:
pv: kpl-pv
########################2####################
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: kpl-pv2
labels:
pv: kpl-pv2
spec:
nfs:
path: NFS_2_PATH ##########模板变量,nfs的目录
......@@ -53,12 +59,17 @@ spec:
resources:
requests:
storage: 400Gi
selector:
matchLabels:
pv: kpl-pv2
########################3####################
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: kpl-pv3
labels:
pv: kpl-pv3
spec:
nfs:
path: NFS_3_PATH ##########模板变量,nfs的目录
......@@ -81,3 +92,6 @@ spec:
resources:
requests:
storage: 300Gi
selector:
matchLabels:
pv: kpl-pv3
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!