k8s local volume 和host path volume的区别


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.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM