Adding and deleting worker nodes of the Kubernetes cluster

If you need to scale the Kubernetes cluster to meet your current workload, increase its fault tolerance, or optimize computing resources, you can add or delete worker nodes included in the cluster by using KDT.

You can add or delete worker nodes only if Kaspersky Next XDR Expert is deployed on multiple nodes. Changing the number of primary nodes is not supported.

Adding new worker nodes to the Kubernetes cluster

To add new worker nodes:

  1. Prepare target hosts that will act as worker nodes.
  2. On the administrator host, export the current configuration file by using the following command:

    ./kdt ec -e '<configuration_file_name_with_path>'

    The current version of the configuration file is saved to the specified directory with the specified name.

  3. In the nodes section of the exported configuration file, add parameters of one or several new nodes (desc, type, host, kind, user, and key), and then save the configuration file.
  4. Copy the public key to each new node (for example, to the ~/.ssh directory) by using the ssh-copy-id utility.
  5. On the administrator host, run the following command to apply the modified configuration file to the Kubernetes cluster. In the command, specify the full path to this configuration file:

    ./kdt apply -i '<full_path_to_configuration_file>'

    After you start the command, KDT checks whether the configuration file is filled in correctly. Then KDT checks whether the hardware, software, and network configuration of the Kubernetes cluster nodes meet the prerequisites for installing the solution. If all the strict pre-checks are successfully completed, KDT outputs the notification of successful validation to stdout and KDT logs. Otherwise, logs with information about the failed validation is saved and the process of adding new hosts is interrupted. You can skip the pre-checks before you run the command, if needed (set the ignore_precheck installation parameter to true).

  6. Run the following command to update the Bootstrap component with added nodes. In the command, specify the full path to the transport archive with the Kaspersky Next XDR Expert components:

    ./kdt apply -k '<full_path_to_transport_archive>' --force-bootstrap

New worker nodes are added to the Kubernetes cluster. KDT outputs the information about added worker nodes to stdout and KDT logs.

Deleting worker nodes from the Kubernetes cluster

When deleting nodes, take into account that the minimum allowed number of workers in the cluster is three. If less than three workers remain when deleting, the operation will be interrupted. You can view the number of workers in the configuration file that will be obtained after export.

To delete worker nodes:

  1. On the administrator host, export the current configuration file by using the following command:

    ./kdt ec -e '<configuration_file_name_with_path>'

    The current version of the configuration file is saved to the specified directory with the specified name.

  2. In the nodes section of the exported configuration file, delete parameters of one or several worker nodes (desc, type, host, kind, user, and key), and then save the configuration file.

    Ensure that after deleting nodes, you will have at least three worker nodes left in the cluster. A minimum cluster configuration for the multi-node deployment includes four nodes (one primary node and three worker nodes). If this condition is not met, the deletion process is interrupted.

    You can also delete a node with kind=admsrv, if it is not the only remaining node with kind=admsrv in the cluster. If you attempt to delete this node from the cluster, it will be skipped during the deletion process.

  3. On the administrator host, run the following command to apply the modified configuration file to the Kubernetes cluster. In the command, specify the full path to this configuration file:

    ./kdt apply -i '<full_path_to_configuration_file>'

The specified node is deleted. KDT outputs the information about added worker nodes to stdout and KDT logs.

Page top