apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-statefulset-demo-0
  namespace: default
spec:
  storageClassName: "my-storage-class"
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  claimRef:
    namespace: default
    name: www-web-0
  persistentVolumeReclaimPolicy: Delete
  hostPath:
    path: /tmp/k8s-pv-statefulset-demo
    type: DirectoryOrCreate
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: "kubernetes.io/hostname"
          operator: "In"
          values:
          - worker-1
