Cluster management
Overview
An overview of your cluster is available under the "Cluster Management" tab in the Admin Console.
Some key pieces of information:
- Nodes in the cluster.
- CPU, RAM, and disk availability on each node.
Nodes don't need to be of the same size.
Here, you can also find instructions to add a new node. You can also drain nodes.
Adding worker nodes
If you want more processing power, you can scale your instance vertically by using a more powerful machine. But it is not always practical because it needs to be done before the installation, and it also means a big machine will always be running.
Usually, a better solution is to scale horizontally by adding worker nodes to the cluster. This solution is more flexible and allows to add and remove processing capabilities when needed. A common use case is the initial historical scan. If you have a lot of repositories, adding more CPUs can speed up this process a lot.
Adding worker nodes to Embedded cluster V1 (kURL)
Note: This procedure does not bring high availability, we are only adding worker nodes, not master.
Here are the steps to add a worker node:
- Go to the KOTS Admin Console. Go to the "Cluster Management" tab. Click on "Add node". It will show you a command to add a node. This command is valid only for 24 hours.
You can also generate this command through the CLI and the master node:
curl -sSL https://kurl.sh/gitguardian/tasks.sh | sudo bash -s join_token
You should have this kind of output:
Node join commands expire after 24 hours.
To generate new node join commands, run curl -sSL https://kurl.sh/gitguardian/tasks.sh | sudo bash -s join_token on this node.
To add worker nodes to this installation, run the following script on your other nodes:
curl -sSL https://kurl.sh/gitguardian/join.sh | sudo bash -s kubernetes-master-address=<master-address>:6443 kubeadm-token=<token> kubeadm-token-ca-hash=sha256:<token-ca-hash> kubernetes-version=x.x.x docker-registry-ip=x.x.x.x
- Connect with SSH to your other node and run your command.
Adding worker nodes to Embedded cluster V2
This method is in early access. This feature from Replicated is in beta and have some limitations. Please contact support@gitguardian.com.
For nodes to communicate together, you need to open 30000
and the following ports between them.
You can add a node at anytime (installation included).
- Connect with SSH to your other node.
- Run the following to download the installer:
LICENSE_ID=your_license
curl -f https://replicated.app/embedded/gitguardian/stable -H "Authorization: $LICENSE_ID" -o gitguardian.tgz
tar -xvzf gitguardian.tgz
- Go to the KOTS Admin Console. Go to the "Cluster Management" tab. Click on "Add node"
- Select roles to assign to the node
management
is used for control-plane/worker nodes (for high availability).- The other roles are to be set depending on which kind of workload you intend to run.
- If you just need processing power and you don't know the exact usage, just select all roles (except
management
)
- It will show you a command to add a node.
- Run it on your new node.
- Run the join command