apiVersion: v1
kind: PersistentVolume
metadata:
  name:  postgres-pv
  labels:
    type: local
    name:  postgres-pv
spec:
  storageClassName: local-storage
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  local:
    path: /data
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
                - ip-10-2-0-82
            - key: beta.kubernetes.io/arch
              operator: In
              values:
                - amd64