Using volumes
Like plain Docker, Kubernetes supports volumes. The main difference is that Kubernetes supports them at the pod level. This means that a volume configured in a pod is available and may be used by every container in the pod for reading and writing. Second, Kubernetes volumes may use multiple different types of network storage at the same time.
Volumes come in two forms, the first is an ephemeral volume that lives only as long as the pod using it. When the pod is deleted, so is the volume. The second is a persistent volume that persists data even when a pod is deleted.
Using plain volumes
Volumes in Kubernetes behave a lot like volumes do in plain Docker. They are only expected to live as long as the pods using them. Every container in the pod may mount the volume and they may mount in the same or different locations. The only restriction is that volumes cannot be mounted on filesystems that are mounted from other volumes. In other words, volumes may not nest:
apiVersion: v1 ...