简体   繁体   English

Kubernetes Volumes / PV与Docker命名卷

[英]Kubernetes Volumes/PV vs Docker Named Volume

I am trying to understand how in Kubernetes we can achieve the capabilities of Docker Named Volumes. 我试图了解如何在Kubernetes中实现Docker命名卷的功能。 When I create an empty Docker named volume and mount it to my container, existing files in the container location gets copied into the host volume if it's empty, how can we achieve this behaviour wiht Kubernetes PV. 当我创建一个空的Docker命名卷并将其安装到我的容器中时,如果容器中的现有文件为空,则该文件将被复制到主机卷中,我们如何通过Kubernetes PV实现此行为。

You should be using local persistent volume to store data on the host machine 您应该使用本地持久卷将数据存储在主机上

Follow the link: https://kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/ 请点击链接: https : //kubernetes.io/blog/2018/04/13/local-persistent-volumes-beta/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM