# Add/Delete worker-nodes

The TrilioVault Controller Cluster can be grown or shrunk at any time in its worker nodes if required.

When the master nodes need to be changed a redeployment is necessary.

## Add a worker-node

Run the following command on a master-node as root to get a Kubernetes token:

```
kubeadm token create --print-join-command
```

Run the following script using the output from the token create command.

```
yum install -y yum-utils
yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
#Install Kubernetes (kubeadm, kubelet and kubectl) 
dnf install -y kubeadm kubelet
systemctl start docker
systemctl enable docker

< Add output from above command >
```

{% hint style="info" %}
It is not required to do anything else as the TrilioVault Controller pods will automatically be deployed on any new node joining the Kubernetes cluster.
{% endhint %}

## Delete a worker-node

Run the following command to get a list of all nodes in the Kubernetes cluster.

```
kubectl get nodes
```

Delete the node using the node-name

```
kubectl delete node <nodename>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trilio.io/rhv/deployment-guide/add-delete-worker-nodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
