Skip to main content
Version: 26.1

PX CLI Reference

PX CLI is a unified CLI that provides secure, remote access to Portworx services. The px csi component allows you to manage PX-CSI operations and provides administrative control over CSI-specific features.

PX CLI uses Kubernetes credentials from your kubeconfig file (~/.kube/config) to interact with the PX-CSI driver deployed in your cluster. It communicates with the CSI controller and node plugins to manage StorageClass resources, VolumeSnapshot resources, and CSI driver configuration.

Key Benefits

  • Secure remote access: No SSH access to nodes required
  • Kubernetes-native: Uses the same RBAC rules and credentials that secure your environment
  • Flexible usage: Run as a standalone binary (px) or as a kubectl plugin (kubectl px)
  • Multiple output formats: Switch between table, JSON, or YAML output using the -o flag

Prerequisites

  • PX-CSI version 25.8.1 or later
  • PX CLI version 1.1.0 or later

Installation

For installation instructions, see the PX CLI installation guide.

Available Commands

Use the following px csi commands to manage PX-CSI operations:

CommandDescription
px csi createCreate PX-CSI resources such as storage backends and cluster keys
px csi deleteDelete PX-CSI resources such as storage backends and cluster keys
px csi updateUpdate PX-CSI resources such as storage backends
px csi listList PX-CSI resources such as storage backends, volumes, and snapshots
px csi inspectInspect detailed information about PX-CSI resources
px csi statusDisplay the status of the PX-CSI cluster
px csi diagsCollect diagnostic information from the PX-CSI cluster
px csi imagesDisplay container images used by PX-CSI components
px csi versionDisplay version information for PX-CSI components

Examples

List all storage backends

kubectl px csi list backend

Create a new FlashArray backend

kubectl px csi create backend --mgmt-endpoint <mgmt-endpoint> --type <fa|fb>

Inspect a specific volume

kubectl px csi inspect volume <volume-name>

Collect diagnostics

kubectl px csi diags --logs --since 1h --output-dir /tmp/px-csi-diags

Check cluster status

kubectl px csi status