码迷,mamicode.com
首页 > 其他好文 > 详细

k8s local volume 和host path volume的区别

时间:2019-07-30 15:49:23      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:new   pat   clu   groups   sts   HERE   for   文章   https   

k8s提供多种volume接口,其中local 和host path是容易混淆的两个接口。下面这篇文章解释了两者的区别:

https://groups.google.com/forum/#!topic/kubernetes-users/68Yvm8ZkztI

关键内容:
Both use local disks available on a machine. But! Imagine you have a cluster of three machines and have a Deployment with a replica of 1. If your pod is scheduled on node A, writes to a host path, then the pod is destroyed. At this point the scheduler will need to create a new pod, and this pod might be scheduled to node C which doesn‘t have the data. Oops!

Local volumes fix this by ensuring a pod is scheduled to the machine where the data exists.

k8s local volume 和host path volume的区别

标签:new   pat   clu   groups   sts   HERE   for   文章   https   

原文地址:https://www.cnblogs.com/elnino/p/11270120.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!