Using Labels to Automatically Discover Applications and Namespaces for Kubernetes

Updated

On this page

You can use Kubernetes labels to automatically discover applications and namespaces to add.

Commvault supports the following modes of label-driven auto discovery:

  • Namespaces that have the specified label are automatically selected for protection, including all API resources within the namespace.

  • Applications that have the specified label are automatically selected for protection, including all API resources within the parent namespace.

Commvault considers an application to be any workload resource type (Pods, Deployments, ReplicaSets, StatefulSets, DaemonSets, Jobs, CronJobs, ReplicationControllers).

Label rules are processed independently of one another. You cannot combine rules using AND and OR modifiers.

Procedure

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

    The Clusters page appears.

  2. In the Name column, click the cluster.

    The cluster page appears.

  3. Click an application group.

    The application group properties page appears.

  4. Under Content, click Manage.

    The Application group content dialog box appears.

  5. To define labels to automatically discover applications or other objects, perform the following steps:

    1. Click Add Label selector.

      The Add Label selector page appears.

    2. In the Value box, type the label associated with a Kubernetes object.

      Examples of apptype label

      • To discover all production applications that have the label apptype=production in the development namespace, enter the following:

        apptype=production -n development
      • To discover all production applications from all namespaces that have the label apptype=production, enter the following:

        apptype=production --all-namespaces

        Note: You cannot use wildcards in labels.

    3. Click OK.