# From the task at K8S.io https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/
# To deploy this pod:
# 1) Create the PersistentVolume - kubectl create -f pv-hostpath.yaml
# 2) Create the PersistentVolumeClaim that will claim the volume - kubectl create -f pvc-01.yml
# 3) Create the pod that uses the PersistentVolumeClaim - kubectl create -f pv-pod.yml
kind: Pod
apiVersion: v1
metadata:
  name: task-pv-pod
spec:
  volumes:
  - name: task-pv-storage
    persistentVolumeClaim:
      claimName: pv-claim-01
  containers:
  - name: task-pv-container
    image: nginx
    ports:
    - containerPort: 80
      name: "http-server"
    volumeMounts:
    - mountPath: "/usr/share/nginx/html"
      #here we mount the volume defined
      #above in volumes
      name: task-pv-storage
