Kaspersky Next XDR Expert

Adding and deleting nodes of the Kubernetes cluster

If the workload on the Kaspersky Next XDR Expert components changes, you can add or delete target hosts included in the Kubernetes cluster (cluster nodes). KDT allows you to change the number of the nodes in the existing Kubernetes cluster.

You can add or delete nodes only if Kaspersky Next XDR Expert is deployed on multiple nodes.

To add new nodes to the Kubernetes cluster:

  1. Export the current configuration file.

    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, add parameters of one or several new nodes (desc, type, host, kind, user, and key), and then save the configuration file.
  3. Copy the public key to each new node (for example, to the /home/<user_name>/.ssh directory) by using the ssh-copy-id utility.
  4. 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>

  5. 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 nodes are added to the Kubernetes cluster.

To delete a node from the Kubernetes cluster:

  1. Ensure that the kubectl utility is installed on the administrator host.
  2. Move the configuration file, that is used for the deployment, to the /root/.kube directory.
  3. Rename the configuration file to config.yaml.
  4. Run the following command to display the list of all cluster nodes:

    kubectl get nodes

  5. Run the following command to transfer all the pods from the node that you want to delete. In the command, specify the name of the node that will be deleted. The pods will be distributed among the remaining nodes.

    kubectl drain <node_name> --delete-emptydir-data --ignore-daemonsets

  6. Run the following command to delete the node from the cluster:

    kubectl delete node <node_name>

The specified node is deleted.