px pxb connect
Connect to px-backup resources
The following commands support a set of global flags that apply to all px pxb commands.
For details, see the Global Flags section.
px pxb connect cluster
Connect a cluster with comprehensive configuration options.
Examples:
Connect cluster with kubeconfig file
pxb connect cluster --name my-cluster --kubeconfig /path/to/kubeconfig --px-token token123
Connect cluster from YAML/JSON file
pxb connect cluster --file cluster-config.yaml
Connect cluster with cloud credentials and provider
pxb connect cluster --name my-cluster --kubeconfig /path/to/kubeconfig --cloud-credential-name aws-cred --provider aws
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--cloud-credential-name | string | Name of cloud credential associated with the cluster | - | Optional |
--cloud-credential-uid | string | UID of cloud credential associated with the cluster | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--file, -f | string | YAML/JSON file containing cluster configuration | - | Optional |
--kubeconfig, -k | string | Path to kubeconfig file for Kubernetes cluster (required) | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--name, -n | string | Name of the cluster (required) | - | Optional |
--orgID | string | The org id for which to query the object | default | Optional |
--output, -o | string | Output format. One of: table|json|yaml|name | table | Optional |
--platform-credential-name | string | Name of platform credential associated with the cluster | - | Optional |
--platform-credential-uid | string | UID of platform credential associated with the cluster | - | Optional |
--provider | string | Cloud provider type (aws, azure, google, ibm, rancher) | - | Optional |
--px-token, -t | string | PX Security Token for Portworx authentication | - | Optional |
--tls-certificate | string | tls certificate | - | Optional |
--uid | string | UID of the cluster (optional) | - | Optional |
px pxb connect managed-clusters
Bulk add discovered managed clusters from cloud providers to PX-Backup.
This command allows you to add multiple managed clusters that have been discovered from cloud providers like AWS. The clusters must already exist in the cloud provider and be accessible with the provided credentials.
Supported cloud providers:
- AWS (Amazon Web Services) - EKS clusters
The command will attempt to add all specified clusters and report the status. Individual cluster addition failures will not stop the process for other clusters.
Examples:
# Add multiple AWS EKS clusters
pxb connect managed-clusters --provider aws --cloud-credential-name aws-creds --region us-west-2 --cluster-names "cluster1,cluster2,cluster3"
# Load configuration from JSON file
pxb connect managed-clusters --file /path/to/bulk-add-config.json
Flags
| Flag | Input type | Description | Default | Required |
|---|---|---|---|---|
--authtoken | string | oidc auth token | - | Optional |
--cloud-credential-name | string | Name of cloud credential to use (required) | - | Optional |
--cloud-credential-uid | string | UID of cloud credential to use | - | Optional |
--cluster-name | stringSlice | Individual cluster names (can be specified multiple times) | [] | Optional |
--cluster-names | string | Comma-separated list of cluster names to add (required) | - | Optional |
--dry-run | bool | Simulate the operation without making any changes | false | Optional |
--endpoint, -e | string | The endpoint of the server | - | Optional |
--file, -f | string | JSON configuration file path | - | Optional |
--labels, -l | string | Comma separated list of labels as key-value pairs: 'k1=v1,k2=v2' | - | Optional |
--orgID | string | The org id for which to query the object | default | Optional |
--output, -o | string | Output format. One of: table|json|yaml|name | table | Optional |
--provider, -p | string | Cloud provider type: aws (required) | - | Optional |
--region, -r | string | AWS region where clusters are located (required for AWS) | - | Optional |
--tls-certificate | string | tls certificate | - | Optional |