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
-oflag
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:
| Command | Description |
|---|---|
| px csi create | Create PX-CSI resources such as storage backends and cluster keys |
| px csi delete | Delete PX-CSI resources such as storage backends and cluster keys |
| px csi update | Update PX-CSI resources such as storage backends |
| px csi list | List PX-CSI resources such as storage backends, volumes, and snapshots |
| px csi inspect | Inspect detailed information about PX-CSI resources |
| px csi status | Display the status of the PX-CSI cluster |
| px csi diags | Collect diagnostic information from the PX-CSI cluster |
| px csi images | Display container images used by PX-CSI components |
| px csi version | Display 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