Define an application for management with Trident protect
You can define an application that you want to manage with Trident protect by creating an application CR and an associated AppVault CR.
Create an AppVault CR
You need to create an AppVault CR that will be used when performing data protection operations on the application, and the AppVault CR needs to reside on the cluster where Trident protect is installed. The AppVault CR is specific to your environment; for examples of AppVault CRs, refer to AppVault custom resources.
Define an application
You need to define each application that you want to manage with Trident protect. You can define an application for management by either manually creating an application CR or by using the Trident protect CLI.
-
Create the destination application CR file:
-
Create the custom resource (CR) file and name it (for example,
maria-app.yaml
). -
Configure the following attributes:
-
metadata.name: (Required) The name of the application custom resource. Note the name you choose because other CR files needed for protection operations refer to this value.
-
spec.includedNamespaces: (Required) Use namespace labels or a namespace name to specify namespaces that the application resources exist in. The application namespace must be part of this list.
-
metadata.annotations.protect.trident.netapp.io/skip-vm-freeze: (Optional) This annotation is only applicable to applications defined from virtual machines, such as in KubeVirt environments, where filesystem freezes occur before snapshots. Specify whether this application can write to the filesystem during a snapshot. If set to true, the application ignores the global setting and can write to the filesystem during a snapshot. If set to false, the application ignores the global setting and the filesystem is frozen during a snapshot. If specified but the application has no virtual machines in the application definition, the annotation is ignored. If not specified, the application follows the global Trident protect freeze setting.
If you need to apply this annotation after an application has already been created, you can use the following command:
Example YAML:
-
-
-
After you create the application CR to match your environment, apply the CR. For example: