Define a custom app
Creating a custom app lets you group elements of your Kubernetes cluster into a single app.
A custom app gives you more granular control over what to include in an Astra Control operation, including:
In most cases you will want to use Astra Control’s features on your entire app. However, you can also create a custom app to use these features by the labels you assign to Kubernetes objects in a namespace.
To create a custom app, go to the Apps page and click + Define custom app.
As you make your selections, the Custom App window will show you which resources will be included or excluded from your custom app. This helps you make sure you are choosing the correct criteria for defining your custom app.
In the above example, one resource (the pod
deployment:canary) will be included in the custom app. Two pods (
nginx-pod2 both labeled
deployment:stable) will be excluded.
|Custom apps can only be created within a specified namespace on a single cluster. Astra Control does not support the ability for a custom app to span multiple namespaces or clusters.|
A label is a key/value pair you can assign to Kubernetes objects for identification. Labels make it easier to sort, organize, and find your Kubernetes objects. To learn more about Kubernetes labels, see the official Kubernetes documentation.
|Overlapping policies for the same resource under different names can cause data conflicts. If you create a custom app for a resource, be sure it’s not being cloned or backed up under any other policies.|
Example: Separate Protection Policy for canary release
In this example, the DevOps team is managing a canary release deployment. Their cluster has three pods running NginX. Two of the pods are dedicated to the stable release. The third pod is for the canary release.
The team’s Kubernetes admin adds the label
deployment=stable to the stable release pods. The admin also adds the label
deployment=canary to the canary release pod.
The team’s stable release includes a requirement for hourly snapshots and daily backups. The canary release is more ephemeral, so they want to create a less aggressive, short-term protection policy for anything labeled
In order to avoid possible data conflicts, the admin creates two custom apps: one for the canary release, and one for the stable release. This keeps the backups, snapshots, and clone operations separate for the two groups of Kubernetes objects.
After the admin adds the cluster to Astra Control, the next step is to define a custom app. To do this, the admin clicks the + Define custom app button on the Apps page.
In the pop-up window which appears, the admin sets
devops-canary-deployment as the app name. The admin then chooses the cluster in the Cluster drop-down, then the app’s namespace from the Namespace drop-down.
At this point, the admin can either type
deployment=canary in the Labels field, or select that label from the resources listed below.
After defining the custom app for the canary deployment, the admin repeats the process for the stable deployment.
After creating the two custom apps, the admin can treat these resources as any other Astra Control application. The admin can clone them, create backups and snapshots, and create a custom protection policy for each group of resources based on the Kubernetes labels.