Manage Nodes

Prerequisites

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    │ 21│ • node1  │ 512 MiB  │ 32 MiB    │ 21└──────────┴──────────┴───────────┴─────────┴────────┘

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.