apiVersion: v1
kind: Pod
metadata:
  name: pv-pod
spec:
#  affinity:
#    nodeAffinity:
#      requiredDuringSchedulingIgnoredDuringExecution:
#        nodeSelectorTerms:
#          - matchExpressions:
#            - key: kubernetes.io/hostname
#              operator: In
#              values:
#                - node2
  containers:
    - name: pv-container
      image: nginx
      ports:
        - containerPort: 80
          name: "http-server"
      volumeMounts:
        - mountPath: "/usr/share/nginx/html"
          name: pv-storage
      resources:
        limits:
          memory: "32Mi"
          cpu: "10m"
  volumes:
    - name: pv-storage
      persistentVolumeClaim:
        claimName: pv-claim
