kubectl directpv info

The kubectl directpv info command displays summary information about the DirectPV installation in your Kubernetes cluster. Use this command to view storage capacity, allocation, and resource counts across all nodes.

Syntax

Display cluster-wide DirectPV information:

kubectl directpv info

Output:

┌──────────┬──────────┬───────────┬─────────┬────────┐
│ NODE     │ CAPACITY │ ALLOCATED │ VOLUMES │ DRIVES │
├──────────┼──────────┼───────────┼─────────┼────────┤
│ • node1  │ 500 GiB  │ 120 GiB   │ 4       │ 2      │
│ • node2  │ 500 GiB  │ 80 GiB    │ 3       │ 2      │
│ • node3  │ 500 GiB  │ 200 GiB   │ 6       │ 2      │
└──────────┴──────────┴───────────┴─────────┴────────┘

400 GiB/1.5 TiB used, 13 volumes, 6 drives
kubectl directpv info

Global flags

This command supports the following global flags:

FlagDescription
--kubeconfigPath to the kubeconfig file to use for CLI requests.
--quietSuppress printing output.

Output columns

The command displays the following information for each node:

ColumnDescription
NODEThe Kubernetes node name. A green dot indicates the node has active drives. A yellow dot indicates no drives are configured.
CAPACITYTotal storage capacity of all DirectPV-managed drives on the node.
ALLOCATEDTotal storage allocated to volumes on the node.
VOLUMESNumber of volumes on the node.
DRIVESNumber of DirectPV-managed drives on the node.

The summary line shows cluster-wide totals for allocated storage, total capacity, volume count, and drive count.

Examples

View cluster storage summary

Display DirectPV information for all nodes:

kubectl directpv info

Suppress output

Run the command without displaying output (useful in scripts to verify DirectPV is operational):

kubectl directpv info --quiet

Behavior

Node status indicators

The command uses colored dots to indicate node status:

  • Green dot (●): The node has one or more DirectPV-managed drives.
  • Yellow dot (●): The node is part of the cluster but has no DirectPV-managed drives.

Nodes with no drives

Nodes that appear with a yellow dot and dashes (-) in all columns are part of the Kubernetes cluster but have no drives managed by DirectPV. This can occur when:

  • DirectPV is installed but drives have not been initialized on that node.
  • All drives on that node have been removed from DirectPV management.

To add drives to these nodes, use kubectl directpv discover and kubectl directpv init.

On this page