apiVersion: v1
kind: PersistentVolume
metadata:
  name: es-storage-pv-1
  namespace: edoc2
  labels:
    name: es-storage-pv-1
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-es-storage
  local:
    path: /data/es01
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.es.labels
          operator: In
          values:
          - es-node01
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: es-storage-pv-2
  namespace: edoc2
  labels:
    name: es-storage-pv-2
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-es-storage
  local:
    path: /data/es02
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.es.labels
          operator: In
          values:
          - es-node02
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: es-storage-pv-3
  namespace: edoc2
  labels:
    name: es-storage-pv-3
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-es-storage
  local:
    path: /data/es03
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: node.es.labels
          operator: In
          values:
          - es-node03
