Working with volumes

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

emptyDir

Localhost

hostPath

Localhost

glusterfs

GlusterFS cluster

downwardAPI

Kubernetes Pod information

nfs

NFS server

awsElasticBlockStore

Amazon Web Service Amazon Elastic Block Store

gcePersistentDisk

Google Compute Engine persistent disk

azureDisk

Azure disk storage

projected

Kubernetes resources; currently supports secret, downwardAPI, and configMap

secret

Kubernetes Secret resource

vSphereVolume

vSphere VMDK volume

gitRepo

Git repository

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.179.85