Manage Nodes
Prerequisites
-
Working DirectPV plugin
To install the plugin, refer to the plugin installation guide.
-
Working DirectPV CSI driver in Kubernetes
To install the driver, refer to the driver installation guide.
Add node
Add a node to the DirectPV DaemonSet, then run the discover
command.
$ kubectl directpv discover
Drives from the added node are not available for DirectPV to use until you initialize them with the
init
command.
List node
Use the info
command to list nodes.
$ kubectl directpv info
┌──────────┬──────────┬───────────┬─────────┬────────┐
│ NODE │ CAPACITY │ ALLOCATED │ VOLUMES │ DRIVES │
├──────────┼──────────┼───────────┼─────────┼────────┤
│ • master │ 512 MiB │ 32 MiB │ 2 │ 1 │
│ • node1 │ 512 MiB │ 32 MiB │ 2 │ 1 │
└──────────┴──────────┴───────────┴─────────┴────────┘
64 MiB/1.0 GiB used, 4 volumes, 2 drives
Delete node
CAUTION: THIS IS DANGEROUS OPERATION WHICH LEADS TO DATA LOSS
Before removing a node, make sure no volumes or drives on the node are in use. Then, remove the node from DirectPV DaemonSet and run the remove-node.sh script.