Skip to main content

Join controllers on separate hosts (join mode)

Beta

Join mode is in beta. Known limits:

  • Joined hosts send no logs or node metrics to the primary's support stack (only controller events), and nf-support-bundle does not cover them.
  • With 2 voters and one lost for good, recovery is manual. See Recover from lost quorum.
  • Identities enrolled through a removed site keep authenticating until you delete or re-enroll them.

Please report any issues to NetFoundry support.

Join mode adds a Ziti controller that runs on its own K3s host, for example in another site or data center, to the controller cluster of an existing installation (the primary). Each joined host runs only a controller and, optionally, an edge router. The primary keeps the support stack, the admin credentials and the edge root CA.

Use join mode when cluster members must sit in different sites or data centers. For extra controllers inside the primary's own Kubernetes cluster, use nf-cluster add instead (see HA cluster management).

Join mode works with the online and the offline (air-gapped) installer, and online and offline hosts can be members of the same cluster. See Offline (air-gapped) hosts.

How it works​

  • Primary: a normal installation whose controller runs in cluster-init mode.
  • Joined host: its own K3s. Its local Helm releases keep the standard names (ziti-controller, ziti-router-1). Its names in the cluster are unique: controller ziti-controller-<site>, edge router router-<site>.
  • PKI: the primary issues one intermediate CA per site under its edge root. The joined controller signs with that intermediate.
  • Administration: all administration happens on the primary. A joined host holds no admin credentials.

Prerequisites​

On the primary:

  • The controller runs in cluster-init mode. Installations from nf-quickstart v1.0.0+ already do. For older ones, run nf-cluster migrate.
  • ziti-controller chart 3.4.0 or newer, at the version the install root applies. If they differ, run nf-upgrade --controller first.
  • The ziti CLI, if you create a router for the site.

On the new host:

  • A Linux host that meets the system requirements. No registry credentials are needed.
  • Online: internet access and the same netfoundry-self-hosted package version as the primary.
  • Offline: the offline tarball of the release the primary runs. jq and the other host packages come from the tarball.
  • A DNS name for the controller's advertised address (IP addresses are rejected). It must resolve to this host from the primary, from the other members, and from the site's routers and clients.

Network ports​

Each controller serves its client API, management API and control plane on a single advertised port. The default is 1280.

FromToPortUsed for
New hostPrimary's advertised addressPrimary's port (default 1280)Join, raft replication
PrimaryNew host's advertised address-p value (default: the primary's port)Raft replication, nf-data-connector events
Every memberEvery other memberThat member's advertised portRaft, when leadership moves (a joined voter can lead)
Every routerEvery controllerThat controller's advertised portRouters connect to all members of the cluster
Clients, other routersSite routerEdge port (default 3022)Client connections, router links

The join checks that the new host can reach the primary before it installs anything. The other direction must work as soon as the new controller starts.

If the new controller's port (-p) is 443, K3s's Traefik on the new host must move off it: set TRAEFIK_HTTPS_PORT (for example 9443) in the env file you pass to --join with -f. Otherwise the join fails preflight with a port clash.

Add a site on the primary​

nf-cluster add --remote -S site1 -h ctrl.site1.example.com

Run it without -S or -h to be prompted. Add -y to accept the defaults: non-voter, with a router.

FlagDescription
-S <site>Site name: 1–29 lowercase letters, digits or -. Sets the node name ziti-controller-<site> and the router name router-<site>. Required with -y.
-h <host>Advertised host of the new controller. Required with -y.
-p <port>Advertised port of the new controller (default: the primary's port).
-o <file>Bundle path (default: join-<site>.tar.gz in the install root).
--voter / --non-voterJoin as a voting or non-voting member (default: non-voter). See Voters and non-voters.
--router / --no-routerCreate edge router router-<site> for the site, or skip it (default: create).

The command:

  1. Adds the site under edgeSignerPki.remoteIntermediates in controller-values.yml and upgrades the primary's release so it issues the site intermediate. The primary controller does not restart.
  2. Creates edge router router-<site>, with role attribute <site>, and its enrollment token.
  3. Adds the new host to dataConnector.controllerHosts in support-values.yml and upgrades the support release (see Telemetry).
  4. Writes the join bundle and prints the next steps.

It warns, but does not fail, if nothing answers at the new host's address yet. This is expected before the join. On an offline primary, it uses the bundled charts and needs no internet access. Output (hostnames changed):

Remote site 'site1' is ready to join.
Join bundle: /opt/netfoundry/self-hosted/join-site1.tar.gz (mode 0600)
It contains the site's CA private key: copy it only to the new host, and delete it everywhere after the join.

Next steps:
1. Copy the bundle to the new host, e.g.:
scp /opt/netfoundry/self-hosted/join-site1.tar.gz <user>@ctrl.site1.example.com:
2. On the new host, install the netfoundry-self-hosted package, then run:
nf-quickstart --join join-site1.tar.gz
Or, air-gapped, extract the offline tarball of the release this primary runs and, from its directory, run:
./quickstart-offline.sh --join /path/to/join-site1.tar.gz
Do this soon: the 'router-site1' enrollment token is single-use and expires at 2026-11-10T19:54:01.972Z.
3. Check the membership here afterwards:
nf-cluster list
4. Once the join has completed, shred the bundle here and wherever you copied it:
shred -u /opt/netfoundry/self-hosted/join-site1.tar.gz

The join bundle​

join-<site>.tar.gz (mode 0600) contains:

FileContents
intermediate-secret.jsonThe site intermediate CA certificate and private key
edge-root.pemThe edge root certificate (no key)
join.envSite, node name, addresses, voter flag, trust domain, the primary's Ziti and chart versions
router.jwtThe router's enrollment token (only with a router)
README.txtWhat the bundle is and how to use it
The bundle is a CA key

Anyone holding the bundle can issue certificates that the whole network trusts.

  • Copy it only to the new host, over an encrypted channel such as scp. Never email it or store it in a shared location.

  • After the join, delete it from both hosts. The primary keeps its copy in the install root by default:

    shred -u /opt/netfoundry/self-hosted/join-site1.tar.gz # primary
    shred -u ~/join-site1.tar.gz # new host

The join shreds the key material it extracts. It does not delete the bundle itself; its summary prints the shred -u command for the new host's copy.

On the primary, nf-cluster remove --remote <site> shreds that site's bundle, and nf-uninstall shreds every bundle nf-cluster add --remote wrote, if they are still there. Neither reaches copies on other hosts.

The router enrollment token is single-use and expires 3 hours after it is issued (the controller default). If it expires, the join refuses to start. On the primary, delete the unenrolled router, then run nf-cluster add --remote again:

ziti edge delete edge-router router-site1

Join the new host​

After you install the package on the new host, run:

nf-quickstart --join join-site1.tar.gz

--join works together with -y, -n and -f <env-file>. It cannot be combined with -z, -v, -p slim or USE_K3S=0. The bundle sets the addresses, versions and console setting, and overrides any matching values in the environment.

The join:

  1. Checks that the primary answers over TLS. If it does not, the join stops before anything is installed.
  2. Installs K3s, cert-manager and trust-manager.
  3. Imports the site intermediate Secret, then shreds the extracted copy.
  4. Installs the controller in cluster-join mode and confirms its membership from the new host.
  5. Installs router-<site> (release ziti-router-1). The router uses this host's controller as its control-plane endpoint.
  6. Prints a join summary. It shows no credentials.

It never installs the support stack, the console, zLAN, ziti-host or snapshot jobs. In testing, the join took about 2 minutes after K3s was installed.

If the join is interrupted, run nf-quickstart again and it resumes. Pass the bundle again until the controller is installed, and until the router is installed if the site has one.

Offline (air-gapped) hosts​

The primary, the joined hosts, or both can be offline installs. Online and offline hosts can be members of the same cluster; this was tested with an offline primary and an online joined host.

  • Add a site on an offline primary with nf-cluster add --remote, as above. It uses the bundled charts and needs no internet access.

  • Join. On the new host, extract the offline tarball of the release the primary runs (see Offline installation), then, from its directory:

    ./quickstart-offline.sh -y --join /path/to/join-site1.tar.gz

    --join works together with -y and -f <env-file>, and refuses -z, -v and -p slim. The join installs the tarball's host packages, jq included, then follows the same steps as online.

  • Chart versions must match. An offline host cannot fetch charts, so the tarball must ship the ziti-controller and ziti-router chart versions the primary runs. If it does not, the join stops after installing the host packages and before K3s. Output from a test run:

    ERROR: this offline tarball does not ship the chart versions the primary runs, and an offline host cannot fetch others.
    ziti-controller chart: the primary runs 3.4.0, this tarball ships 3.4.1
    Extract the offline tarball of the NetFoundry Self-Hosted release the primary runs, then re-run from it.
    Nothing was installed into Kubernetes by this run.
  • Upgrades follow the same order and behave the same as online (see Upgrades): extract the new release's tarball over the install root on every host, then run ./upgrade.sh -y on each joined host, one at a time, and on the primary last.

  • Remove a site with nf-cluster remove --remote on an offline primary, as online (see Remove a site).

Verify the join​

The join summary ends with the membership table. Output from a test run (hostnames changed):

Node name: ziti-controller-site1
Role: non-voter (read-only member)
Advertised as: ctrl.site1.example.com:1290
Primary: ctrl.example.com:1280
Router: router-site1 (release ziti-router-1)
...
Cluster membership:
│ ID │ ADDRESS │ VOTER │ LEADER │ VERSION │ CONNECTED │ PREFERRED │
│ ziti-controller1 │ tls:ctrl.example.com:1280 │ true │ true │ v2.0.8 │ true │ false │
│ ziti-controller-site1 │ tls:ctrl.site1.example.com:1290 │ false │ false │ v2.0.8 │ true │ false │

On the primary, run nf-cluster status. A joined member appears as a remote member:

Raft members: 2 (voters: 1, non-voters: 1)
Remote members (no release in this cluster): ziti-controller-site1

nf-status on either host shows the cluster as well (see nf-status on a joined host).

Voters and non-voters​

  • Non-voter (default). It replicates the full model and serves logins and circuits, but it never votes or leads. If the link to the site is lost, the other members keep their quorum.
  • Voter (--voter). It counts toward quorum and can become leader. Use it when the member's links to the others are as reliable as the primary's, for example when all members sit in one data center.
  • Voting status is fixed when a member first joins. Re-running nf-cluster add --remote for an existing site ignores --voter and --non-voter. To change it, remove the site and add it again.

A leader needs a majority of voters: (N/2)+1, rounded down. See the quorum table.

  • 1 voter (the primary plus non-voters): if the primary is down, there is no leader. Writes fail, while reads, logins and circuits keep working on the other members.

  • 2 voters is a trap. It tolerates no more failures than 1 voter, and losing either voter stops all writes. If one is lost for good, see Recover from lost quorum. nf-cluster add --remote and the join both warn when the voter count would be even. In a test with 2 voters and one stopped, a write on the remaining member failed with:

    Status code: 503 Service Unavailable, CLUSTER_NO_LEADER - Cluster has no leader, unable to make model updates.
  • Use 1 voter (the primary plus non-voters), or 3 or 5 voters.

Telemetry​

  • The primary's nf-data-connector streams events from every controller listed under dataConnector.controllerHosts in support-values.yml, with the primary listed first. nf-cluster add --remote adds each site. The primary must therefore keep reaching every joined host's advertised port.
  • From add --remote until the join completes, the connector logs connection warnings for the new host, with back-off of up to 30 seconds. This is expected.
  • nf-upgrade on the primary restores any controllerHosts entry that the running release has but support-values.yml lost.
  • Another option is a standalone nf-data-connector at the remote site. The installer does not set it up; contact NetFoundry support.

Upgrades​

  1. Install the new netfoundry-self-hosted package on every host. On an offline host, extract the new release's tarball over the install root instead, and run ./upgrade.sh -y from it wherever these steps say nf-upgrade -y.
  2. On each joined host, one at a time, run nf-upgrade -y. Wait for it to finish, and check nf-status, before you move to the next host.
  3. On the primary, last, run nf-upgrade -y.

On a joined host, nf-upgrade upgrades cert-manager, trust-manager, the controller and the router, and K3s when you pass --k3s. Before the controller upgrade, it writes a database snapshot inside the controller pod (/persistent/ctrl.db-pre-upgrade-<timestamp>) and keeps the newest three. It skips what the host does not run, one line each (output from a test run on a host without a router):

Not upgrading the router: this host has no ziti-router-1 release.
Not upgrading ziti-host: it runs only on the primary, not on a joined host.
Not upgrading the support stack: it runs only on the primary, not on a joined host.
Not upgrading Ziti Console Enterprise: it runs only on the primary, not on a joined host.
Not upgrading the zLAN Console: it runs only on the primary, not on a joined host.

If you pass only primary-side component flags (--support, --console, --zlan, --ziti-host), nothing changes.

Mixed-version window​

While members run different Ziti versions, a controller refuses changes to identities, services, policies and routers only while it is linked to a member on another version. This is per controller, not cluster-wide. Logins, reads and traffic keep working on every member. Any Ziti version difference counts, patch releases included (for example 2.0.6 → 2.0.8).

In a test with only join-1 upgraded, writes through the primary and join-1 failed with:

unable to execute command. In a readonly state: different versions detected in cluster

join-2, still on the old version and with no link to join-1, accepted a write, and the write replicated to all members.

The window opens when the first joined host upgrades and closes when the primary finishes. Upgrade the hosts back to back.

Version guard on a joined host​

Before it changes anything, nf-upgrade on a joined host compares its target Ziti version with the leader's. The target is ZITI_VERSION if set, otherwise image.tag in the values file, otherwise the chart's default.

  • Target newer than the leader: the upgrade goes ahead with a notice. Output from a test run:

    NOTICE: this upgrade moves the controller to Ziti 2.0.8; the cluster leader ziti-controller1 runs v2.0.6.
    While members run different Ziti versions, each controller linked to a member on another version refuses changes
    (identities, services, policies, routers) until the versions match; logins and traffic keep working on every member.
    Recommended order: each joined host first, one at a time (install this release's .deb there, then run 'nf-upgrade -y'), and the primary last.
  • Target older than the leader: the upgrade is refused and nothing changes. Install the package version the primary runs, then run the upgrade again. Output from a test run:

    ERROR: this upgrade would move the controller to Ziti 2.0.6, older than the cluster leader ziti-controller-site2 (v2.0.8).

    A joined host must not fall behind the cluster. Install the same NetFoundry Self-Hosted .deb
    the primary runs on this host, then re-run: nf-upgrade -y
    Nothing was changed.
  • Leader unreadable (for example, no quorum): a warning, then the upgrade goes ahead.

On the primary​

  • Before the controller step, the upgrade lists every joined member that is not yet on the target version. This is a notice, not a refusal.
  • If the primary is the leader at that point, it first hands leadership to a connected voter that already runs the target version (ziti agent cluster transfer-leadership). If the hand-off fails, it warns and continues. If the primary is not the leader, no hand-off is needed.
  • After the upgrade, it lists any members that are still behind. When none are, it says so.
  • A member's version that this controller cannot see over raft is read from the member's own API. If even that fails, the member is listed as unreadable rather than as behind.
  • It keeps every site in edgeSignerPki.remoteIntermediates and every host in dataConnector.controllerHosts.

Output from a test run where the primary was the leader:

Transferring cluster leadership to ziti-controller-site2, already on Ziti 2.0.8, before this controller restarts...
Cluster leadership transferred to ziti-controller-site2.
Upgrading Controller...
...
Controller version after upgrade: 2.0.8
Every joined member runs Ziti 2.0.8.

Pinned Ziti versions​

A joined host pins the Ziti image (image.tag) only when the primary pins it. There is one exception: at join time, if the joined host's chart would install a different Ziti version than the one the primary runs, the join pins the primary's version and prints a note.

A new package does not move a pinned host to a new Ziti version. On each host, in the same order, run:

ZITI_VERSION=<version> nf-upgrade -y

ZITI_VERSION re-pins the controller and the router in their values files.

Leadership during upgrades​

Each controller restarts once during its upgrade. What happens to the leader depends on the number of voters:

  • 1 voter (the primary plus non-voters): no other voter can take over, so there is no leader, and writes fail, while the primary's controller restarts.
  • 2 voters: when either voter restarts, the other has no quorum, so there is no leader until the restarted voter returns. Writes fail with CLUSTER_NO_LEADER; reads, logins and traffic keep working. In testing, when the joined voter restarted, the primary stepped down and the joined voter won the next election. The primary was therefore usually not the leader by the time it upgraded, and no hand-off ran.
  • 3 or more voters: the primary hands leadership to an upgraded voter before it restarts, so the remaining voters keep a quorum.

Pin versions with Helm​

For operators who drive Helm themselves:

WhatWhere
Controller and router chart versionsHELM_CHART_VERSION_CTRL, HELM_CHART_VERSION_ROUTER in .env in the install root, from the installed package
Ziti image versionimage.tag in controller-values.yml and router-values.yml. If it is not set, the chart's default (appVersion) applies.

See Version management. Every member must run the leader's Ziti version, and when you run Helm directly, nf-upgrade's version guard does not run. Check the leader first.

On a joined host, from the install root (nf changes to it):

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

# The leader's version: this host's target must not be older
kubectl exec -n ziti deployment/ziti-controller -c ziti-controller -- \
ziti agent cluster list --app-addr=127.0.0.1:10001

helm repo update openziti

# Controller
helm upgrade --install ziti-controller openziti/ziti-controller -n ziti \
--values ./controller-values.yml --wait --timeout 180s --version 3.4.1

# Router: pass the release's enrollment token again, as nf-upgrade does; dropping it restarts the router pod
helm get values ziti-router-1 -n ziti -o json | jq -j '.enrollmentJwt // empty' > router.jwt
helm upgrade --install ziti-router-1 openziti/ziti-router -n ziti \
--values ./router-values.yml --set-file enrollmentJwt=router.jwt --wait --timeout 180s --version 3.0.5
shred -u router.jwt

Replace 3.4.1 and 3.0.5 with the versions in .env. nf-install-notes on a joined host prints the same commands with the deployed chart versions.

nf-status on a joined host​

nf-status adds a ZITI CLUSTER section. On a joined host, it shows:

  • the host's node name and the primary's address;
  • the controller and router images;
  • each member's voter flag, leader flag, version and connection state, as this controller sees them. If raft has no link to a member, its version is read from the member's own API and marked (its API);
  • the voter count, and this controller's version compared with the leader's;
  • while versions differ, a MIXED VERSIONS line, plus one of these:
    • WRITES REFUSED HERE when this controller is linked to a member on another version;
    • Writes: this controller accepts changes when it is not linked to such a member;
  • a WARNING line when there is no leader.

Output from join-1 in a test run, after join-1 was upgraded and before the others were (hostname changed):

ZITI CLUSTER
This host: ziti-controller-site1, joined to the cluster whose primary is ctrl.example.com:1280
Administer the network from the primary; this host holds no admin credentials.
ziti-controller docker.io/openziti/ziti-controller:2.0.8
ziti-router-1 docker.io/openziti/ziti-router:2.0.8

MEMBER VOTER LEADER VERSION CONNECTED
ziti-controller1 true true v2.0.6 true
ziti-controller-site1 false false v2.0.8 true
ziti-controller-site2 true false v2.0.6 (its API) false
Members: 3 (voters: 2, non-voters: 1)
NOTICE: this controller runs v2.0.8, newer than the leader ziti-controller1 (v2.0.6).
Recommended order: each joined host first, one at a time (install this release's .deb there, then run 'nf-upgrade -y'), and the primary last.
WRITES REFUSED HERE: this controller is linked to members on different Ziti versions (v2.0.6, v2.0.8),
so it refuses changes (identities, services, policies, routers) until they match. Logins and traffic keep working.
MIXED VERSIONS: members run v2.0.6, v2.0.8.
While members run different Ziti versions, each controller linked to a member on another version refuses changes
(identities, services, policies, routers) until the versions match; logins and traffic keep working on every member.
<not connected> is normal between members that are not the leader (CONNECTED false): Ziti only opens controller-to-controller links when raft needs them. Only the leader's links matter.

At the same moment, join-2 (still on v2.0.6, with no link to join-1) printed Writes: this controller accepts changes; it has no link to a member on another version.

CONNECTED false between followers is normal. Ziti opens controller-to-controller links only when raft needs them, and this has not changed since Ziti v1.1.0. On the test boxes:

  • a non-voter never dialled another member. Its only links were opened by whichever member was leader at the time;
  • a new leader dialled the other members as soon as it took over;
  • cutting the link between the two joined hosts for 2.5 minutes changed nothing: logins, reads and replicated writes kept working on both;
  • a link that a former leader opened stayed up until it broke, so CONNECTED can show true between followers too.

What matters is each member's link to the current leader. The join summary shows the same note.

Remove a site​

Remove the site on the primary first, then uninstall the removed host:

  1. On the primary:

    nf-cluster remove --remote site1

    Run it without a site name to be prompted; it lists the remote sites in raft. Add -y to skip the confirmation.

  2. On the removed host, promptly:

    nf-uninstall
  3. On the primary, run the remove again. It deletes the controller record if the host re-created it before it was uninstalled. It is safe to repeat: when nothing is left, it prints Remote site 'site1' is already removed and changes nothing.

The remove:

  1. Takes a database snapshot in the primary's controller pod (/persistent/ctrl.db-pre-remove-<site>-<timestamp>).
  2. If the site's controller is the leader, hands leadership to the primary.
  3. Deletes edge router router-<site>.
  4. Removes ziti-controller-<site> from raft and deletes its controller record.
  5. Removes the site from edgeSignerPki.remoteIntermediates in controller-values.yml, upgrades the primary's release so it stops issuing the site intermediate, and deletes the intermediate's Secret (its private key). The primary controller does not restart.
  6. Removes the host from dataConnector.controllerHosts in support-values.yml and upgrades the support release.
  7. Shreds the site's join bundle if it is still on the primary (Shredded join bundle <path>).

In testing, it took about 25 seconds. Output from a test run (hostnames changed, Helm output trimmed):

Remove Remote Site from Cluster
Primary: ziti-controller (ziti-controller1)
Site: site1
Raft member: ziti-controller-site1 (voter: false, connected: false)
Edge router: delete router-site1
Site intermediate: stop minting ziti-controller-site1-intermediate and delete ziti-controller-site1-intermediate-secret
Data connector: stop streaming from ctrl.site1.example.com:1290 and upgrade the support release

Taking a snapshot of the Ziti database in 'ziti-controller': /persistent/ctrl.db-pre-remove-site1-20261112-211704
...
Deleted edge-router 'router-site1'.
Removing 'ziti-controller-site1' from the raft cluster...
Removed 'ziti-controller-site1' from the raft cluster.
Removed site 'site1' from edgeSignerPki.remoteIntermediates in controller-values.yml
Upgrading 'ziti-controller' so it stops minting the 'site1' intermediate (no controller restart expected)...
...
Deleted Secret 'ziti-controller-site1-intermediate-secret' (the site intermediate's private key).
Removed ctrl.site1.example.com:1290 from dataConnector.controllerHosts in support-values.yml
Upgrading the support release so nf-data-connector stops streaming from ctrl.site1.example.com:1290...
...
Remote site 'site1' is removed from the cluster.
Identities enrolled through ziti-controller-site1 keep working until they are deleted or re-enrolled.

When the remove refuses​

Before it changes anything, the remove checks the cluster. It stops and prints Nothing was changed. when:

  • the cluster has no leader, for example 2 voters with one down. If that voter is lost for good, see Recover from lost quorum;
  • removing the member would leave too few reachable voters for a majority;
  • the site's controller is the leader and the primary is not a voter that could take over;
  • the primary's controller chart differs from the one the install root applies. Run nf-upgrade --controller first.

Output from a test run with 2 voters and one stopped:

ERROR: the controller cluster has no leader, so its membership cannot change.
Ziti needs a leader, elected by a majority of the voting members, to remove a member. With too few voters
reachable (for example 2 voters with one down) there is none.
- Bring the missing voters back, then re-run this command.
- If they are lost for good, follow 'Recover from lost quorum' in the join mode guide.
This command never forces a recovery.

Nothing was changed.

Behaviour to expect​

  • A host that is down. You can remove a voter whose host is down, as long as the remaining voters keep a quorum. When you remove a voter and the remaining voter count is even, the remove warns (see Voters and non-voters).

  • Uninstall promptly. A removed controller that keeps running no longer receives changes. It serves stale reads, refuses writes with CLUSTER_NO_LEADER, and its router keeps trying to connect. A host that was down during the removal re-creates its controller record when it starts, so clients and routers may try it. The re-run in step 3 deletes that record.

  • A removed controller can stay listed. While a removed host keeps running and connected, Ziti can keep listing it as a connected non-voter. The remove still completes, and its summary ends with:

    'ziti-controller-site1' is still listed while its host stays connected; it drops out once that host is uninstalled.

    nf-cluster status and nf-status leave it out of the member count and show Removed from raft, still listed until their hosts are uninstalled: ziti-controller-site1. nf-upgrade leaves it out of its member list and version checks.

  • A quick retry continues. The controller takes at most one database snapshot per minute. A re-run within a minute of the last attempt reuses that snapshot and prints A snapshot of the Ziti database was taken in the last minute; continuing with that one.

  • Identities enrolled through the removed site keep authenticating on every controller until you delete or re-enroll them. Removing the site intermediate does not revoke certificates it signed.

  • Site key copies stay on the removed host until nf-uninstall, and in any join bundle that was not shredded. Anyone holding that key can sign certificates the whole cluster trusts, so treat a lost or compromised site host or bundle as a compromise of the edge signing chain and contact NetFoundry support.

  • Adding the site again. nf-cluster add --remote with the same site name works. The primary issues a new intermediate with a new key, and you choose voter or non-voter again. Run nf-uninstall on the host before the new join.

nf-uninstall on a joined host​

nf-uninstall on a joined host warns when its controller is still a member of the cluster and the host can see a leader. Output from a test run:

WARNING: this host's controller 'ziti-controller-site2' is still a member of the controller cluster.
Remove it on the primary first, so the cluster stops counting on it:
nf-cluster remove --remote site2
Uninstalling here without that leaves 'ziti-controller-site2' in the cluster's membership.

After the warning, the next prompt defaults to No (Do you want to proceed? [y/N]). Press Enter to stop, run the remove on the primary, then uninstall.

If the host can't see a leader, it can't tell whether it is still a member. It prints Can't confirm this host was removed from the cluster; run 'nf-cluster remove --remote <site>' on the primary first. and the prompt defaults to No. Once the host has been removed, it no longer lists itself, so there is no warning and the prompt defaults to Yes.

On a removed host that is still running, nf-status says the controller was removed from the cluster and the host should be uninstalled.

Besides the releases, the uninstall deletes the host's copy of the site intermediate Secret, the controller and router volumes, and join.env.

On any host, nf-uninstall also shreds the join bundles nf-cluster add --remote wrote there and any join-*.tar.gz in the install root, and prints Shredded join bundle <path> for each.

Recover from lost quorum​

Use this when the cluster has no leader and the missing voters will not come back, for example 2 voters with one host lost for good. Without a leader, nf-cluster remove --remote refuses. If the voters can come back, bring them back instead.

The procedure rebuilds a single-node cluster on the primary from the primary's own database, then removes the lost site. Expect about a minute of controller downtime (steps 2 to 5; 45 to 70 seconds in testing). Routers keep their links. The trust domain, PKI and admin credentials do not change.

warning
  • Run it on the primary. It assumes the primary survived; if it did not, contact NetFoundry support.
  • First uninstall every other voter that could come back with the old raft data.
  • The rebuilt cluster has the primary as its only member. Every other joined site must be removed and added again (steps 7 and 8). Until then, a surviving site's controller is cut off: writes through it fail with CLUSTER_NO_LEADER and nothing replicates to it, although its router stays online.

Run every step on the primary host:

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
  1. Snapshot the controller's database. This works without a leader. Snapshots are limited to one per minute.

    kubectl exec -n ziti deploy/ziti-controller -c ziti-controller -- \
    ziti agent controller snapshot-db /persistent/ctrl.db-quorum-lost-$(date -u +%Y%m%d-%H%M%S) \
    --app-addr tcp:127.0.0.1:10001 --timeout 60s

    It prints the snapshot path, for example /persistent/ctrl.db-quorum-lost-20261113-022017. Note the file name for step 3.

  2. Stop the controller.

    kubectl scale deploy/ziti-controller -n ziti --replicas=0
    kubectl wait --for=delete pod -n ziti -l app.kubernetes.io/name=ziti-controller --timeout=120s
  3. Swap the snapshot in on the controller's volume. A one-shot pod, using the controller's own image, sets the old raft data aside, stages the snapshot as ctrl.db and sets the cluster-initialized marker aside:

    SNAP=ctrl.db-quorum-lost-<timestamp> # the file name from step 1
    TS=$(date -u +%Y%m%d-%H%M%S)
    IMG=$(kubectl get deploy ziti-controller -n ziti -o jsonpath='{.spec.template.spec.containers[0].image}')
    cat <<EOF | kubectl apply -f -
    apiVersion: v1
    kind: Pod
    metadata: {name: ziti-ctrl-recover, namespace: ziti}
    spec:
    restartPolicy: Never
    securityContext: {fsGroup: 2171}
    containers:
    - name: recover
    image: ${IMG}
    command: ["/bin/bash","-c"]
    args:
    - |
    set -ex
    cd /persistent
    mv raft raft.lost-${TS}
    cp ${SNAP} ctrl.db
    mv cluster.initialized cluster.initialized.lost-${TS}
    ls -la /persistent
    volumeMounts: [{name: data, mountPath: /persistent}]
    volumes: [{name: data, persistentVolumeClaim: {claimName: ziti-controller}}]
    EOF
    kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/ziti-ctrl-recover -n ziti --timeout=180s
    kubectl logs -n ziti ziti-ctrl-recover
    kubectl delete pod -n ziti ziti-ctrl-recover

    The log lists raft.lost-<timestamp>, ctrl.db and cluster.initialized.lost-<timestamp>. Step 4 needs raft/ out of the way: Ziti refuses to bootstrap from a database on a node that already has raft data (raft is already bootstrapped, must start with a uninitialized controller).

  4. Bootstrap a single-node cluster from ctrl.db. This is the same chart mode that nf-cluster migrate uses. Replace <chart-version> with the installed ziti-controller chart version (the CHART column of helm list -n ziti, for example 3.4.1). On an offline primary, which has no chart repository, run steps 4 and 5 from the install root, replace openziti/ziti-controller with ./packages/offline-helm-charts/ziti-controller-<chart-version>.tgz, and drop --version <chart-version>.

    helm upgrade ziti-controller openziti/ziti-controller -n ziti --version <chart-version> \
    --reuse-values --set cluster.mode=cluster-migrate --wait --timeout 300s

    The ziti-controller-migrate Job logs raft cluster bootstrap complete and Ziti cluster initialized. In testing, it finished in 14 seconds.

  5. Return to normal mode.

    helm upgrade ziti-controller openziti/ziti-controller -n ziti --version <chart-version> \
    --reuse-values --set cluster.mode=cluster-init --wait --timeout 300s
  6. Check the result.

    kubectl exec -n ziti deploy/ziti-controller -c ziti-controller -- \
    ziti agent cluster list --app-addr=127.0.0.1:10001

    The primary is the only member, voter and leader (output from a test run, hostname changed):

    │ ID │ ADDRESS │ VOTER │ LEADER │ VERSION │ CONNECTED │ PREFERRED │
    │ ziti-controller1 │ tls:ctrl.example.com:1280 │ true │ true │ v2.0.8 │ true │ false │

    nf-status reports Members: 1 (voters: 1, non-voters: 0). Check that admin login and writes work, existing identities authenticate and the primary's routers are online. Every joined site's controller record is still listed, offline. Routers of surviving sites stay online until those sites are removed.

  7. Remove the lost site.

    nf-cluster remove --remote site1 -y

    It reports the site as no longer a raft member and deletes its controller record, router, intermediate and data connector entry. Output from a test run (trimmed):

    Raft member: ziti-controller-site1 is not a member
    Controller record: ziti-controller-site1 is still listed; it is deleted
    Edge router: delete router-site1
    ...
    Deleted the controller record of 'ziti-controller-site1'.

    Remove every other joined site the same way, following Remove a site. Only the first removal shows the Controller record line: it also deletes the other sites' stale controller records.

  8. Afterwards.

    • If a lost host comes back, it re-creates its controller record (within about 45 seconds in testing). Run nf-uninstall on it, then run nf-cluster remove --remote <site> -y on the primary again.

    • Add sites again with nf-cluster add --remote and nf-quickstart --join (see Add a site on the primary). Run nf-uninstall first on any host that was joined before. Use 1 voter (the primary plus non-voters), or 3 or 5 voters.

    • Once the cluster is healthy, delete /persistent/raft.lost-*, /persistent/cluster.initialized.lost-* and /persistent/ctrl.db. ctrl.db is not used in cluster-init mode.

      kubectl exec -n ziti deploy/ziti-controller -c ziti-controller -- \
      bash -c 'rm -rf /persistent/raft.lost-* /persistent/cluster.initialized.lost-* /persistent/ctrl.db'

Limits and not yet supported​

  • Logs and node metrics from joined hosts are not shipped to the primary's support stack, and nf-support-bundle does not cover joined hosts. Only controller events are collected (see Telemetry).
  • Lost quorum: recovery is manual (see Recover from lost quorum).
  • Snapshots: a joined host has no scheduled snapshot jobs. Raft replicates the database, so the primary's snapshots cover the model. A joined host takes a snapshot only before an upgrade.
  • Joined-host options: no zLAN, slim profile, existing Kubernetes cluster (USE_K3S=0) or -v.