Hyper: Storage in Docker & Kubernetes

2015-11-12 Klaus Ma 更多博文 » 博客 » GitHub »

原文链接 http://www.k8s.tips/tech/2015/11/12/storage-in-docker-and-k8s/
注:以下为加速网络访问所做的原文缓存,经过重新格式化,可能存在格式方面的问题,或偶有遗漏信息,请以原文为准。


Docker Volume Plugin

Docker Volume Plugin

The above picture show the overall architecture of Docker volume plugin. The docker daemon communicate with VolumePlugin by volume_driver.sock (Unix Domain Socket); the volume plugin take responsibility to mount the distributed FS into local FS and return the mount point to docker daemon. The docker daemon handle it as normal volume.

Notes:

  • In docker volume plugin, it trigger docker daemon to call volume plugin if host path did not start with '/' and --volume-dirver is not empty
  • Mesos 0.26.0 does not support volume plugin; mesos consider it's related path (against mesos-slave sandbox) if host path did not start with '/'
    • The volume plugin is not necessary to be a separated daemon, but it's recommended
    • Refer to here for the detail of Docker Volume Plugin Protocol

Kubernetes Volume

Kubernetes Volume

In Kubernetes, kubelet takes the responsibility to mount distributed FS into local FS; it also maintenance the mapping and sent the local mout point when create/start container by Docker API.

Kubernetes Persistent Volumes and Claims

Ongoing