Kubernetes Volumes Intro

Volumes in Kubernetes

Types of Kubernetes Volumes

  • emptyDir:
1
It is a type of volume is created when a Pod is first assigned to a Node. It remains active as long as the Pod is running on that node. The volume is initially empty and the containers in the pod can read and write the files in the emptyDir volume. Once the Pod is removed from the node, the data in the emptyDir is erased.
  • hostPath:
1
This type of volume mounts a file or directory from the host node's filesystem into your pod.
  • gcePersistentDisk
1
This type of volume mounts a Google Compute Engine (GCE) Persistent Disk into your Pod. The data in gcePersistentDisk remains intact when the Pod is removed from the node.
  • awsElasticBlockStore
1
This type of volume mounts an Amazon Web Services (AWS) Elastic Block Store into your Pod. Just like gcePersistentDisk, the data in an awsElasticBlockStore remains intact when the Pod is removed from the node.
  • nfs
1
An nfs volume allows an existing NFS (Network File System) to be mounted into your Pod. the data in an nfs volume is not erased when the Pod is removed from the node. The volume is only unmounted
  • gitRepo
1