Adding a new node to a cluster

How to add a new node to a cluster

Prerequisites

To add a new node, it's assumed that you have set up the Talosconfig, any required CLI tools and have the required Talos machine configurations.

Adding a cloud instance

Adding a new cloud instance is fairly straight forward since we can simply use the Hetzner CLI. First make sure you have set up your talosconfig and then run:

IMAGE_ID=183054543
NEW_NODE_NAME=worker-1 # Make sure this is unique
HETZNER_INSTANCE_TYPE=cx22 # Go to Hetzner to see alternatives
HETZNER_INSTANCE_LOCATION=hel1 # Finland is default, but Hetzner has more options available
hcloud server create --name $NEW_NODE_NAME 
    --image $IMAGE_ID \ 
    --type $HETZNER_INSTANCE_TYPE \ 
    --location $HETZNER_INSTANCE_LOCATION     --label 'type=cloud-worker' \ 
    --user-data-from-file worker.yaml

Adding a root server

First make sure that you've prepared the dedicated machine, this requires booting into the rescue system. Installing Talos, document any disk UUIDs and potentially setting up it's own config. After restarting the machine (sometimes requires a few tries), the machine can be loaded with a configuration.

talosctl apply-config --talosconfig talosconfig \ 
    --nodes $NEW_NODE_IP \ 
    --file dedicated-worker.yaml \ 
    --insecure