cluster.yaml

A cluster spec is short: a name and the members, in order.

api_version: genesis/v1
cluster:
  name: lab
  members:
    - name: node-a
      core_address: "100.64.0.11:8444"
    - name: node-b
      core_address: "100.64.0.12:8444"
    - name: node-c
      core_address: "100.64.0.13:8444"

Fields

FieldRules
cluster.nameLowercase DNS-safe label
cluster.membersThree or more. members[0] bootstraps the cluster
members[].nameA machine registered in this directory's ledger and created by sg
members[].core_addressThe member's cluster API address: its tailnet address and LXD port. Explicit port; never 8443 or a wildcard; unique across members

Unknown keys and extra YAML documents in the file are refused.

What create checks first

Before it asks for confirmation, sg cluster create checks every member:

  • registered, with install.lxd, firewall.guard and verify.isolation applied;
  • the same LXD channel, version and hold as the others (every mismatch is listed, in spec order);
  • core_address matches the member's own observed address and its LXD binding. Host names resolve through observed facts, never DNS;
  • compatible storage pool and bridge: a missing pool or bridge, a different pool driver or a non-NAT bridge refuses. sg never recreates or wipes a pool;
  • each joiner can reach the bootstrap member.

Rules that outlive the file

  • Teardown follows the recorded roster. Editing cluster.yaml never releases a member.
  • A recorded member refuses sg machine destroy.
  • Keep cluster.yaml in the same directory as the machine specs. In another directory, it has its own ledger and the machine guard can't see it.