px pxe get
List Portworx resources
Aliases: list
The following commands support a set of global flags that apply to all px pxe commands.
For details, see the Global Flags section.
px pxe get alert
List and get information about Portworx alerts
Aliases: alerts
Examples:
# Get portworx related alerts
px pxe get alert
# Fetch alerts based on particular alert id. Fetch all alerts based on "VolumeCreateSuccess" id
px pxe get alert --id "VolumeCreateSuccess"
# Fetch alerts between a time window
px pxe get alert --start-time "2019-09-19T09:40:26.371Z" --end-time "2019-09-19T09:43:59.371Z"
# Fetch alerts with min severity level
px pxe get alert --severity "alarm"
# Fetch alerts based on resource type. Here we fetch all "volume" related alerts
px pxe get alert -t "volume"
# Fetch alerts based on resource id. Here we fetch alerts related to "cluster"
px pxe get alert --id "1f95a5e7-6a38-41f9-9cb2-8bb4f8ab72c5"
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--all, -A | bool | Show all alerts | false | Optional |
--end-time, -e | string | end time span (RFC 3339) | - | Optional |
--id, -i | string | Alert id | - | Optional |
--output, -o | string | Output in yaml|json|wide | - | Optional |
--resource-id | string | Resource ID for a specific type | - | Optional |
--severity, -v | string | Min severity value (Valid Values: [notify warn warning alarm]) (default "notify") | notify | Optional |
--start-time, -b | string | start time span (RFC 3339) | - | Optional |
--type, -t | string | alert type (Valid Values: [volume node cluster drive all]) | all | Optional |
px pxe get clouddrive
List all cloud drives
Aliases: cd, cloud-drive, cloud-drives, clouddrives
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--output, -o | string | Output in yaml|json | - | Optional |
px pxe get cluster
Show Portworx and Kubernetes information for every context in your kubeconfig
Aliases: clusters
Examples:
# Scan through all the contexts in your kubeconfig and display cluster information
px pxe get cluster
# Show cluster information for contexts that match contain 'east-coast' in the name
px pxe get cluster --context-match='*east-coast*,*south*'
# Output all Kubernetes and Portworx cluster information as json for your contexts that match '*on-prem*'
px pxe get cluster -o json --context-match='*on-prem*'
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--context-match | string | Comma separated list of expressions match the appropriate context | - | Optional |
--output, -o | string | Output in yaml|json|wide | - | Optional |
px pxe get diags
Get all Portworx diagnostics CRs
Aliases: diag, diagnostics
Examples:
# Get all diagnostic CRs
px pxe get diags
# Get diagnostic CRs in wide format
px pxe get diags -o wide
# Get diagnostic CRs in JSON format
px pxe get diags -o json
# Get diagnostic CRs in YAML format
px pxe get diags -o yaml
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--output, -o | string | Output in wide | - | Optional |
px pxe get kubedatastore
List Kube Datastores with storage capacity and volume information.
Columns: VOLUMES Total volumes with a replica on this KDS or affinity to this KDS
Wide output (-o wide) additional columns: AFFINITY Volumes with affinity to this KDS PENDING Affinity volumes with replicas pending move to this KDS
Aliases: kds, kube-datastore, kube-datastores, kubedatastores
Examples:
# List all Kube Datastores
px pxe get kubedatastore
# Get a specific Kube Datastore
px pxe get kubedatastore <kube-datastore-name>
# Output with additional columns (AFFINITY, PENDING)
px pxe get kubedatastore -o wide
# Output Kube Datastore information in JSON format
px pxe get kubedatastore -o json
# Output Kube Datastore information in YAML format
px pxe get kubedatastore -o yaml
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--output, -o | string | Output in yaml|json | - | Optional |
px pxe get node
List Portworx nodes information
Aliases: nodes
Examples:
# List all Portworx nodes
px pxe get node
# List nodes with detailed information in wide format
px pxe get node -o wide
# List nodes and show labels
px pxe get node --show-labels
# Output node information in JSON format
px pxe get node -o json
# Output node information in YAML format
px pxe get node -o yaml
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--output, -o | string | Output in yaml|json|wide | - | Optional |
--show-labels | bool | Show labels in the last column of the output | false | Optional |
px pxe get pvc
Show Portworx volume information for Kubernetes PVCs
Aliases: pvcs
Examples:
# Get information for all pvcs that are Portworx volumes
px pxe get pvc
# Get information for pvc abc
px pxe get pvc abc
# Get information for pvcs abc and xyz
px pxe get pvc abc xyz
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--all-namespaces | bool | Kubernetes namespace | false | Optional |
--output, -o | string | Output in yaml|json|wide | - | Optional |
--show-labels | bool | Show labels in the last column of the output | false | Optional |
px pxe get virtualmachine
List Virtual Machines
Displays a list of Virtual Machines that have Portworx volumes.
A VM identifier may be given in any of these forms: NAMESPACE/NAME, NAME (with -n NAMESPACE), or UID.
Columns: VM VM identifier (namespace/name format, usable with describe vm) VOLUMES Number of volumes attached to the VM KDS (AFFINITY) Kube Datastores the VM's volumes have affinity to KDS (REPLICAS) Kube Datastores where volume replicas are located
Aliases: vm, vms, virtualmachines
Examples:
# List all VMs across all namespaces
px pxe get virtualmachine
# List VMs (short alias)
px pxe get vms
# List VMs in a specific namespace
px pxe get vms -n my-namespace
# Show specific VMs by namespace/name
px pxe get vms ns1/my-vm ns2/other-vm
# Show specific VMs by name within a namespace
px pxe get vms my-vm other-vm -n my-namespace
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--output, -o | string | Output in yaml|json | - | Optional |
px pxe get volume
Get information about Portworx volumes
Aliases: volumes, vol
Examples:
# Get information about the portworx volumes
px pxe get volume
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--kds | string | Alias for --kube-datastore | - | Optional |
--kube-datastore | string | Show volumes associated with the specified Kube Datastore (affinity or replicas) | - | Optional |
--output, -o | string | Output in yaml|json|wide | - | Optional |
--owner | string | Owner of volume | - | Optional |
--selector, -l | string | Selector (label query) comma-separated name=value pairs | - | Optional |
--show-k8s-info | bool | Show kubernetes information | false | Optional |
--show-labels | bool | Show labels in the last column of the output | false | Optional |
--vm | string | Show volumes for the specified VM (namespace/vm-name or vm-uid) | - | Optional |
--volumegroup | string | Volume group id | - | Optional |