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