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

Global flags

This command supports the following global flags:

Flag Description
--kubeconfig Path to the kubeconfig file to use for CLI requests.
--quiet Suppress printing output.

Output columns

The command displays the following information for each node:

Column Description
NODE The Kubernetes node name. A green dot indicates the node has active drives. A yellow dot indicates no drives are configured.
CAPACITY Total storage capacity of all DirectPV-managed drives on the node.
ALLOCATED Total storage allocated to volumes on the node.
VOLUMES Number of volumes on the node.
DRIVES Number 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.