K8s storage

Docker Volume is a container for storage abstraction level, the life cycle of its volume by docker engine to maintain. K8s Volume is the application-level storage abstraction in K8S in the combination of the concept of the Pod a group of containers having a super close relationship to the formation of a service instance together, in order to ensure a Pod in a container aborted, is kubelet reconstructed pulled produced from old container does not lose important data, and a plurality of containers Pod may share the same data, the level Pod in K8S storage volume is defined, i.e. through .spec.volumesto declare the type Pod volume to be used.

And K8s by decoupling the interface CRI and docker engine coupling relationship, so K8s lifecycle volume of granted managed by K8s, therefore K8s itself has its own volume plugin extension mechanism. Pod  .spec.volumesof Volume type to do a Category:

Local storage: emptydir / hostpath the like, is mainly used on the local storage node Pod run

Network Storage: in-tree (built-in): awsElasticBlockStore / gcePersistentDisk / nfs the like, the memory card implementation code is placed in the code repository k8s; out-of-tree (external): flexvolume / csi other network storage inline volume plugins , to achieve a separate memory card, especially CSI is the core of the development direction of volume expansion mechanism.

Projected Volume: secret / configmap / downwardAPI / serviceAccountToken, K8s some configuration information in a cluster to mount the volume of container Pod, i.e. the application can access these data objects by POSIX interface.

PersistentVolumeClaim PersistentVolume system and, in the separate management of computing resources and storage resources K8s design system

Guess you like

Origin www.cnblogs.com/jacksonxiao/p/11299181.html