2022-03-12 Chapter 7. Mounting storage volumes into the Pod’s containers === - 優點: - 程式有些壞損,等於可以用全新的系統開一個 continaer - container 重開基本等同重來,可以避免這樣的情況 - 場景:無狀態的系統,就滿適合這樣的。客戶的 session 或是 statefull,就不太適合,大部分都是有狀態的,當如果今天需要紀錄儲存。 - Stateless vs Stateful - https://www.redhat.com/en/topics/cloud-native-apps/stateful-vs-stateless - Q: volume 如果多個 pod 同時寫入會怎樣?還是一般只會給一個 pod 寫? - A: 後面章節提到。 - - Q: 請問 hostPath 跟 subPath 差在哪?預設路徑是哪?這部分沒很了解 - A: hostPath 把 host 路及掛進 container,可以取得 host 資料 - subPath:掛 volume 進 container 不見得要掛 root directory,可以掛一個 sub path -