bedrock

Tear down a tenant

The teardown removes everything the bootstrap installed. Use it to start over in a lab, or to rehearse a total loss.

Warning
This destroys the cluster, etcd and every Longhorn volume on all nodes, including all database data and backups stored in Garage. There is no undo.

#Run it

From the controller:

shell
make teardown

Ansible asks you to type destroy before it touches anything. Any other answer cancels the run.

#What it removes

On every node:

  • RKE2, through its own uninstall script
  • /var/lib/rancher/rke2 and /etc/rancher/rke2, which hold etcd and the cluster configuration
  • the kubectl, crictl and ctr links and the login profile
  • the CIS kernel settings file
  • /var/lib/longhorn, every volume replica on the node

On the controller, it deletes ~/.bedrock. That holds more than the admin kubeconfig: OpenBao’s unseal shares and root token, the failover proof keys and the observers’ exchange certificate authority. It only runs once every node has been wiped. If any node fails, the teardown stops there and the controller keeps the keys, because those nodes still hold data the keys belong to.

#Deploy again

The nodes are ready for a fresh bootstrap straight away:

shell
make deploy

make redeploy runs the teardown and the deploy in one go.