Skip to main content
Version: 2.7

Label resources

Kubernetes allows you to selectively apply required labels to the resources of a namespace with a key-value format using the CLI. Portworx Backup UI enables you to filter those labeled resources with the label and then take a backup of all such resources of the selected namespace.

For example, consider two namespaces, ns1 and ns2. For the sake of brevity, assume that ns1 has label x=y and ns2 has no label. Again consider a resource called configmap1 in ns1 and configmap2 in ns2. When you apply a resource label a=b on configmap1 and configmap2 using the CLI, the resource label gets applied to both the resources regardless of which namespace it belongs to.

If you filter a namespace in Portworx Backup with x=y and resource label as a=b, only ns1 gets displayed in the list. When you create a backup of ns1, Portworx Backup displays and fetches only conifgmap1 belonging to ns1 for the backup.

To filter and then back up the resources with preset labels:

  1. Type the label name in the Add resource label field and press Enter.

  2. Select the required namespace(s) and then click Backup:

    note

    The label used to filter appears under the RESOURCE LABEL SELECTOR field of Create Backup window.

  3. Click Create to back up only the labeled resources of the selected namespace(s).

    note
    • If the selected namespace does not include resources with preset labels, then Portworx Backup ignores those resources for backup.

    • For scheduled backup of resources, Portworx Backup checks for resources with preset labels in only those namespaces that were selected during the creation of backup.

Was this page helpful?