How to: Persistent Volume and Persistent Volume Claim <a name="pvc"></a>
- Volumes are ephemeral/temporary area that stores data. Emptydir and hostpath create volume on node which runs related pod.
- In the scenario of creating Mysql pod on cluster, we can not use emptydir and hostpath for long term. Because they don't provide the long term/persistent volume. 
- Persistent volume provides long term storage area that runs out of the cluster.
- There are many storage solutions that can be enabled on the cluster: nfs, iscsi, azure disk, aws ebs, google pd, cephfs. 
- Container Storage Interface (CSI) provides the connection of K8s cluster and different storage solution. 

#### Persistent Volume 
- "accessModes" types:
    - "ReadWriteOnce": read/write for only 1 node.
    - "ReadOnlyMany" : only read for many nodes.
    - "ReadWriteMany": read/write for many nodes.
- "persistentVolumeReclaimPolicy" types: it defines the behaviour of volume after the end of using volume.
    - "Retain" : volume remains with all data after using it.
    - "Recycle": volume is not deleted but all data in the volume is deleted. We get empty volume if it is chosen.
    - "Delete" : volume is deleted after using it.

```yaml