antony@notes:~/misc$ cat "local-path-provisioner-sharedFileSystemPath-example.md"
local-path-provisioner sharedFileSystemPath example
local-path-provisioner sharedFileSystemPath example
sharedFileSystemPath 定義
sharedFileSystemPath 參數允許 provisioner 使用一個同時掛載在所有節點上的共享文件系統。這意味著所有節點都可以同時存取該文件系統。在這種情況下,所有的存取模式(Access Modes)都被支援,包括:
ReadWriteOnce:單個節點可讀寫ReadOnlyMany:多個節點可讀取ReadWriteMany:多個節點可讀寫
這些模式可用於存儲請求(Storage Claims),滿足不同的應用需求。
需要特別注意的是,nodePathMap 和 sharedFileSystemPath 是互斥的,不能同時使用。如果你使用了 sharedFileSystemPath,那麼必須將 nodePathMap 設置為空陣列 []。預設情況下,sharedFileSystemPath 的值為空字串,如下所示:
sharedFileSystemPath: ""總結來說,使用 sharedFileSystemPath 可以方便地在多個節點間共享存儲,但需要確保配置正確,避免與 nodePathMap 衝突。
設定 sharedFileSystemPath