Registering a Kubernetes cluster

If necessary, you can use the IBM Spectrum® Protect Plus user interface to manually register a Kubernetes cluster or to modify the properties of a registered Kubernetes cluster.

About this task

After Container Backup Support is installed, the application host for the Container Backup Support container is automatically registered upon startup of the cluster host in Kubernetes. When a cluster is registered with IBM Spectrum Protect Plus, an inventory of the cluster is automatically captured. You can then complete backup and restore jobs, and run reports.

However, if the automatic registration was unsuccessful or if a registered cluster was accidentally unregistered, you can manually register the cluster by using the IBM Spectrum Protect Plus user interface.

You can also modify the properties of the registered cluster, such as changing the port that is used to connect to the Container Backup Support container agent service.

For example, if you use a load balancer to distribute the workload in your cluster, you can edit the load balancer to use the port number for the Container Backup Support agent container service. You can then register the load balancer and port number with IBM Spectrum Protect Plus so that you do not have to configure the port number again.

Procedure

To manually register a cluster or to modify cluster properties, complete the following steps:

  1. In the navigation panel, click Manage Protection > Containers > Kubernetes.
  2. In the Kubernetes page, click Manage clusters.
  3. Take one of the following actions:
    • To manually register a cluster, click Add cluster.
    • To update existing cluster properties, in the list of host addresses, click the edit icon Edit icon for the cluster host that you want to update.
  4. Update the fields in the Application Properties section:
    Cluster Name
    The name of the cluster host or load balancer for the Container Backup Support container.
    The cluster name must match the value that is used for the cluster_name parameter in the baas-values-cr.yaml file. For more information, see Setup the installation variables for Container Backup Support.
    Host Address
    The host address for the cluster host or load balancer.
    If an Ingress controller is used on your Kubernetes cluster, specify the fully qualified domain name (FQDN) of the host that is specified in the Ingress resource. If NodePort is used, specify the FQDN of the node that is running the spp-agent pod.
    Port Number
    The port for the connection to the Container Backup Support agent container service.
    To obtain the port number, issue the following command on your cluster:
    kubectl get service -n baas | grep baas-rest-spp-agent
    The output for the baas-rest-spp-agent service contains the port number. If you are using Ingress for external connections between the IBM Spectrum Protect Plus server and the Container Backup Support agent, the port number is 443. If you are using NodePort, the port number is 31245.
    Use existing user
    Select this checkbox to use a previously entered username and password for the cluster host. Select a username from the Select user list.
    User ID
    If you do not use an existing user ID, enter the username for the application host. The username must match the value that you specified for the DATAMOVER_USERNAME installation variable in the baas-options.sh file. For more information, see Setup the installation variables for Container Backup Support.
    The credentials are added to the list of existing users. This field is not available if you are using an existing user.
    Password
    Enter the password for the application host. The password must match the value that you specified for the DATAMOVER_PASSWORD installation variable in the baas-options.sh file. For more information, see Setup the installation variables for Container Backup Support.
    The credentials are added to the list of existing users. This field is not available if you are using an existing user.
    Certificate
    Specify the certificate that you exported from your cluster by clicking Copy and paste. Enter a name for the certificate, such as baas-ca.crt. Paste the contents of the certificate to the Copy and paste certificate here field and click Create.
    For instructions on exporting and importing certificates, see Importing certificates on a Kubernetes cluster.
  5. Optional: Set additional options in the Options section:
    Maximum concurrent PVCs
    Set the maximum number of PVC snapshots or copy backups to create concurrently. Cluster performance is impacted when you back up many PVCs concurrently, as each PVC uses multiple threads and consumes bandwidth when data is copied. Use this option to control the impact on cluster resources and minimize the impact on production operations.
    The default value is 10.
  6. Click Save. IBM Spectrum Protect Plus confirms a network connection, adds the cluster to the IBM Spectrum Protect Plus database, and then catalogs the cluster resources, including namespaces and PVCs.
    If a message appears indicating that the connection is unsuccessful, review your entries. If your entries are correct and the connection is unsuccessful, contact a network administrator to review the connection.

What to do next

To verify that the clusters are updated, review the job log. In the navigation panel, click Jobs and Operations. Click the Running Jobs tab, and look for the most recent Application Server Inventory log entry. You can specify a filter to show only inventory jobs by clicking the filter icon, selecting Inventory, and clicking Apply.

Completed jobs are shown on the Job History tab. You can use the Sort By list to sort jobs based on start time, type, status, job name, or duration. Use the Search by name field to search for jobs by name. You can use asterisks as wildcard characters in the name. If the status of inventory job status is Partial, click Job Log and review the log entries to find the error.

Clusters must be detected to ensure that their resources can be backed up. You can run a manual inventory at any time to detect updates in cluster resources. For instructions about running a manual inventory, see Detecting Kubernetes resources. For instructions about scheduling Kubernetes backup jobs, see Backing up Kubernetes container data.