# 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.

To create a custom application group, do the following:

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

2. Click Add application group.

3. Select the cluster to create the application group for, and then click Next.

4. Select an existing backup plan or create a new backup plan, and then click Next.

5. Enter a descriptive name for the application group.

6. Select resources to back up by workload type or by label.

   By workload type

   1. Click Add, and then select Workloads.

   2. From the Browse list, select All workloads, Virtual machines or Volumes.

      Note

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

   3. Select the resources to back up, and then click Done.

   By label

   1. Click Add, and then select Label selectors.

   2. From the Type list, select Application, Namespaces, or Volumes.

   3. Enter the label value.

      Label selector requirements

      Commvault does not support the following:

      - 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`.

      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`.

7. Exclude applications or resources from an application group so that they are not backed up. Resources are objects that can be listed, created, or re-created using the Kubernetes API server, while sub-resources are objects associated with those resources.

   By application

   You can exclude the namespaces, Pods, DaemonSets, and other resources in the cluster.

   1. Enable the Exclude resources toggle key.

   2. From the Exclude list, select Applications.

   3. From the Browse list, select All workloads, Virtual machines or Volumes.

   4. Select the resources to exclude from back up, and then click Done.

   By label

   You can select labels and values to exclude resources/objects that have those labels and values.

   1. Enable the Exclude resources toggle key.

   2. From the Exclude list, select Label selectors.

   3. From the Type list, select Application, Namespaces, or Volumes.

   4. Enter the label value.

      Supported format is `key=value [-n <namespace> | --all-namespaces]`. For example, `usage=prod -n dev`.

   5. Click Add.

   By rule

   1. Enable the Exclude resources toggle key.

   2. From the Exclude list, select Exclude by Rule.

   3. From the list, select Kind, Group, Version, Namespace, Name, or Label, and then specify the rule.

   4. Click Save.

8. To exclude sub-resources of applications from backup such as ConfigMaps, Secrets, Services, PersistentVolumeClaims, etc, configure a rule.

   Note

   Sub-resources associated with applications deployed via Helm charts cannot be excluded from backups.

   Need help with excluding sub-resources?

   1. Enable the Exclude sub-resources toggle key.

   2. From the Exclude list, select Exclude by Rule.

   3. From the list, select Kind, Group, Version, Namespace, Name, or Label, and then specify the rule.

   4. Click Save.

9. Exclude workload PVCs from backup by selecting specific PVCs using Browse option or by defining filter criteria.

   Use Browse option

   1. Enable the Exclude PVCs toggle key.

   2. Click Browse.

   3. Browse and select PVCs associated with content in the VM group.

   4. Click Ok.

   Define filter criteria

   1. Enable the Exclude PVCs toggle key.

   2. Click Add.

   3. For Volume filter type, select PVC name or pattern or Application label or VM label.

      Supported wildcard patterns

      For PVC name or pattern, the following wildcard patterns are supported:

      - abc* – matches PVC names that start with abc.

      - *abc – matches PVC names that end with abc.

      - *abc* – matches PVC names that contain abc.

      - * – matches all PVC names (excludes all PVCs).

   4. Click Ok.

10. Click Save.

11. To run a manual backup, in the upper-right area of the page, click Backup.

×

Loading...