For the complete documentation index, see llms.txt. This page is also available as Markdown.

Add Node

Step-by-step guide to add a new Ubuntu 24.04 node to an existing OpenG2P RKE2 cluster — run from your admin laptop over SSH.

This guide walks through adding a new Kubernetes node to an existing OpenG2P RKE2 cluster. The automation runs on your admin laptop: it SSHes into the new Ubuntu 24.04 machine, stages the join scripts, and installs RKE2 as either a worker (most common) or a server (HA control-plane).

Source code: automation/add-node/ in the openg2p-deployment repository.

Sub-pages

Overview

Phase
Where it runs
Script / action

0. Provision VM (optional)

Laptop

AWS add-node provisioningopeng2p-aws-provision.sh

1. Configure

Laptop

Edit add-node-config.yaml (SSH + join fields)

2. Join cluster

Laptop → SSH → new node

./openg2p-add-node.sh --config add-node-config.yaml

3. Verify

Control-plane

kubectl get nodes

4. Post-install (optional)

Control-plane / RP

Nginx upstream, Istio ingress

The laptop orchestrator:

  1. Loads config (+ optional aws/provision-output.yaml overlay)

  2. Probes SSH + passwordless sudo on the new node

  3. Stages roles/join/ + libs + config to /tmp/openg2p-add-node on the node

  4. Runs the remote join under sudo (ufw, RKE2 install, cluster join)

Before you start

Cluster must already be running

You need a working RKE2 cluster with at least one control-plane (rke2-server) node.

Hardware (new node)

Minimum (worker)

OS

Ubuntu Server 24.04 LTS amd64

vCPU / RAM / disk

Match Compute minimums (16 / 64 GB / 128 GB)

Network

Same VPC as the cluster; TCP 9345 to a control-plane private IP

Optional: provision the VM on AWS

➡️ AWS add-node provisioning (optional)

After AWS provision succeeds, aws/provision-output.yaml supplies ssh_host, ssh_user, ssh_key, private_ip, and instance_name automatically when you run the join script from automation/add-node/.


Step 1: Gather cluster details from a control-plane

On any existing control-plane node:

Note the control-plane private IP for server_url (https://<private-ip>:9345).


Step 2: Configure add-node-config.yaml (on the laptop)

Minimum fields:

For remove-node later, also set primary_ssh_host (SSH to a control-plane).


Step 3: Probe SSH (optional)

From the laptop (no sudo):

Confirms SSH + passwordless sudo on the new node.


Step 4: Join the cluster (from the laptop)

Flag
Purpose

--role worker / --role server

Override node_role

--force

Re-run remote steps (clear markers on the node)

--dry-run

Probe SSH; print what would be staged/run; change nothing

--probe

SSH + sudo check only

--help, -h

Show help

Remote steps (on the node): validate → apt tools → ufw → RKE2 join → verify.

Logs on the laptop: automation/add-node/logs/add-node-*.log.


Step 5: Verify

On a control-plane:


Removing a node

From the laptop (needs primary_ssh_* in config):

The script asks for confirmation before cordoning / draining / deleting the node. Type yes to proceed, or pass --yes (-y) to skip the prompt (CI / automation).

Then clean RKE2 on the removed machine (commands printed by the script). If it was an AWS add-node instance:

➡️ AWS add-node provisioning → Tearing down


Troubleshooting

Unsupported Ubuntu version: 22.04 on the laptop

You ran an old on-node script with sudo on your laptop. Use the current laptop orchestrator without sudo:

The Ubuntu 24.04 check runs on the remote node.

SSH / sudo probe failed

Ensure the security group allows SSH from your laptop and the user has NOPASSWD sudo.

Cannot reach <ip>:9345 (on the remote node)

From the new node (or after join starts failing):

Fix SG / ufw on the control-plane so TCP 9345 is allowed from the VPC CIDR.

Missing ssh_host / ssh_key

Set them in add-node-config.yaml, or re-run AWS provision so aws/provision-output.yaml exists next to the script.


Last updated

Was this helpful?