Define a custom app example
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:
-
Clone
-
Snapshot
-
Backup
-
Protection Policy
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 select + Define.
As you make your selections, the Custom App window shows 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.
Custom apps can be created only 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 devops team's Kubernetes admin adds the label deployment=stable
to the stable release pods. The team 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 deployment=canary
.
In order to avoid possible data conflicts, the admin will create 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 team adds the cluster to Astra Control, the next step is to define a custom app. To do this, the team selects the + Define button on the Apps page.
-
In the pop-up window which appears, the team sets
devops-canary-deployment
as the app name. The team chooses the cluster in the Cluster drop-down, then the app's namespace from the Namespace drop-down. -
The team 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 team repeats the process for the stable deployment.
When the team has finished creating the two custom apps, they can treat these resources as any other Astra Control application. They can clone them, create backups and snapshots, and create a custom Protection Policy for each group of resources based on the Kubernetes labels.