管理節點

先決條件

新增節點

將節點新增至 DirectPV DaemonSet,然後執行discover命令。

$ kubectl directpv discover
在您使用init命令初始化它們之前,新增節點中的磁碟機無法供 DirectPV 使用。

列出節點

使用info命令列出節點。

$ kubectl directpv info
┌──────────┬──────────┬───────────┬─────────┬────────┐
│ NODE     │ CAPACITY │ ALLOCATED │ VOLUMES │ DRIVES │
├──────────┼──────────┼───────────┼─────────┼────────┤
│ • master │ 512 MiB  │ 32 MiB    │ 21│ • node1  │ 512 MiB  │ 32 MiB    │ 21└──────────┴──────────┴───────────┴─────────┴────────┘

64 MiB/1.0 GiB used, 4 volumes, 2 drives

刪除節點

注意:這是一個危險的操作,會導致資料遺失

在移除節點之前,請確保該節點上沒有任何卷或磁碟機正在使用中。然後,從 DirectPV DaemonSet 中移除節點並執行remove-node.sh腳本。