Files in a container are ephemeral. When the container is terminated, the files are gone. Docker has introduced data volumes to help us persist data (https://docs.docker.com/engine/admin/volumes/volumes). However, when it comes to multiple hosts, as a container cluster, it is hard to manage volumes across all the containers and hosts for file sharing or provisioning volume dynamically. Kubernetes introduces volume, which lives with a Pod across a container life cycle. It supports various types of volumes, including popular network disk solutions and storage services in different public clouds. Here are a few:
Volume type | Storage provider |
| Localhost |
| Localhost |
| GlusterFS cluster |
| Kubernetes Pod information |
| NFS server |
| Amazon Web Service Amazon Elastic Block Store |
| Google Compute Engine persistent disk |
| Azure disk storage |
| Kubernetes resources; currently supports |