apiVersion: v1
kind: PersistentVolume
metadata:
  name: local-persistent-volume-2
spec:
  capacity:
    storage: 2Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: local-storage-class
  local:
    path: /mnt/disk/kubernetes/vol
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - k8s-worker-1
          - k8s-worker-2
          - k8s-worker-3

## ToDo: Automated dir creation
#
# sudo mkdir -p /mnt/disk/kubernetes/vol
# sudo chcon -Rt svirt_sandbox_file_t /mnt/disk/kubernetes/vol
# sudo chmod 777 /mnt/disk/kubernetes/vol
#

