apiVersion: v1
kind: PersistentVolume
metadata:
  name: volcheuk
  labels:
    app: testing
spec:
  capacity:
    # Minimum storage required
    storage: 10Gi
  # Either raw block device or filesystem
  volumeMode: Filesystem
  # Volume can be mounted as read-write by a single node
  accessModes:
  - ReadWriteOnce
  # Manual reclamation (required)
  persistentVolumeReclaimPolicy: Retain
  # Refers to the local storage class created earlier
  storageClassName: local-storage
  # Path to the filesystem on the node
  local:
    path: /mnt/data
  # Pods that use this PV will only be scheduled on the specified node  
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - k8s-node-2
