Creating a Custom Application Group for Kubernetes

After you create either a default or full cluster application group to protect the entire cluster, you might want to create custom application groups for resources that have different backup requirements.

Go to the Add Application Group Dialog Box

  1. From the navigation pane, go to Protect > Kubernetes.

    The Overview page appears.

  2. Go to the Applications tab.

  3. In the upper-right area of the page, click Add application group.

    The Add Application Group page of the configuration wizard appears.

Select the Cluster and Backup Plan

  1. From the Cluster list, select the cluster to create the application group for.

  2. Click Next.

    The Plan page of the configuration wizard appears.

  3. Select the backup plan to back up the cluster and applications.

    If you don't already have a backup plan that you can use, to create one, click the add button add/plus button - gray - no border.

  4. Click Next.

    The Add Application Group page appears.

  5. In the Application group name box, enter a descriptive name for the application group.

Select the Resources to Back Up

You can select resources to back up by application or by label.

Select the Resources to Back Up by Application

When you select by application, you can select the cluster, namespaces, Pods, DaemonSets, and other resources.

  1. Click Add, and then select Applications.

    The Add Kubernetes applications dialog box appears.

  2. From the Browse list, select the option that displays the resources or objects that you want to select:

    • Applications: Displays the cluster, each namespace, and Pods, DaemonSets, Deployments, StatefulSets, and Helm-deployed applications within the namespace.

    • Labels: Displays the cluster, each namespace, and any labels on Pods, Deployments, DaemonSets, StatefulSets, and Helm-deployed applications within the namespace.

      If a namespace does not contain any API resources/objects that have labels, the namespace is displayed as empty.

    • Volumes: Displays the cluster, each namespace, and any PersistentVolumeClaims (PVCs) within the namespace.

      If a namespace does not contain any PersistentVolumeClaim (PVC) objects, the namespace is displayed as empty.

      PersistentVolume (PV) objects that do not have an associated PersistentVolumeClaim (PVC) are not displayed.

      Important

      • If you select individual applications, labels, or PersistentVolumeClaims, new API resources or objects within the namespace are not backed up.

      • If you use Search to find resources or objects, you can search only for namespaces and applications. Applications are supported API resources or objects (such as Secrets, ConfigMaps, Namespaces, and StorageClasses) that can be listed, created, or re-created using the Kubernetes API server. The search function does not support wildcards and does not find PersistentVolumeClaim names or labels names or label values.

  3. Select the resources to back up.

  4. Click Done.

Select the Resources to Back Up by Label

When you select by label, you can specify labels and values to select resources/objects that have those labels and values.

  1. Click Add, and then select Label selectors.

    The Add label selector dialog box appears.

  2. From the Type list, select Application, Namespace, or Volume.

  3. For Value, enter the label value.

    For example:

    • To select resources in the default namespace, enter enable.backup=true. You can also enter multiple labels as a comma-separated list like enable.backup=true,env=prod.

    • To select resources in all namespaces, enter enable.backup=true --all-namespaces or enable.backup=true,env=prod --all-namespaces.

    • To select resources in a specific namespace, enter enable.backup=true -n namespace_name or enable.backup=true,env=prod -n namespace_name.

      Note

      Commvault Cloud does not support the following for label selectors:

      • Using -A as the short form of --all-namespaces. You must use --all-namespaces.

      • Using the --namespace parameter as the long form of -n. You must use -n.

Exclude the Resources from Backup

You can exclude Kubernetes applications or resources from an application group so that they are not backed up.

For more information, see Excluding Kubernetes Applications or Resources from an Application Group.

Create the Application Group

  1. Click Submit.

    The application group properties page appears.

  2. To run an on-demand backup of the application group, in the upper-right area of the page, click Back up.

Loading...