Resetting a Node
Remove the unbounded agent and restore a host to its original state.
This guide explains how to reset a node that was bootstrapped with Unbounded, removing the agent, nspawn machine, network interfaces, and configuration files to restore the host to its pre-bootstrap state.
When to Reset
You may want to reset a node when:
- Testing or development – you want to iterate on the bootstrap process
- Decommissioning – you’re removing a node from the cluster
- Troubleshooting – you want a clean slate after a failed bootstrap
Prerequisites
- Root access on the target host (or
sudo) - The
unbounded-agentbinary must still be installed on the host
Resetting with unbounded-agent reset
The unbounded-agent reset command fully reverses the bootstrap process. It is
the inverse of unbounded-agent start.
sudo unbounded-agent reset
The command unconditionally cleans up both possible nspawn machine names (kube1
and kube2) so it works regardless of which upgrade cycle the node is in.
What Reset Does
The reset command performs the following steps in order:
- Stops the nspawn machines – gracefully stops
kube1andkube2, then force-terminates if needed - Removes network interfaces – WireGuard (
wg*), tunnel (geneve0,vxlan0,ipip0), and overlay (unbounded0,cbr0) interfaces - Removes WireGuard keys – cleans up
/etc/wireguard/server.privandserver.pub - Removes nspawn configuration – deletes
.nspawnconfigs and systemd overrides for both machines - Removes the machine rootfs – deletes
/var/lib/machines/kube1and/var/lib/machines/kube2 - Cleans up routing – removes policy routing rules and flushes routing tables
- Removes agent binaries – deletes the agent binary and config artifacts
- Reloads systemd – picks up all configuration changes
The command is idempotent – it is safe to run multiple times.
After Reset
After resetting the host, you must separately delete the Kubernetes Node object from the cluster:
kubectl delete node <machine-name>
You may also want to reboot the host to ensure all kernel modules and network state are fully cleared:
sudo reboot
See Also
- Bring Your Own Cluster – set up a cluster and join nodes
- SSH Guide – full provisioning lifecycle with SSH