How to remove a Teleport node from a cluster?

Hi !

I did not find this simple answer : how can-I remove a node from a Teleport cluster ?

I did not find the solution in the documentation and tctl commands don’t explicitely support node deletion as far as I can tell !

The goal is to be able to provision a new node with the same name when needed. So far I did not manage to do this.

Removing the node stops people from accesing it but it does not disappear in the list of nodes :

# /usr/local/bin/tctl rm nodes/e90b4559-515e-40e3-821b-1030f71a5ac3
node e90b4559-515e-40e3-821b-1030f71a5ac3 has been deleted
 # /usr/local/bin/tctl nodes ls
Nodename               UUID                                 Address           Labels                                                                                                                 
---------------------- ------------------------------------ ----------------- ---------------------------------------------------------------------------------------------------------------------- 1c1ebfe8-437b-4b8c-a95f-7db756ae92b0    Name=bastion-dev,function=teleport-server,teleport_version=v4.0.4   e90b4559-515e-40e3-821b-1030f71a5ac3 Name=proxy,function=teleport-node,teleport_version=v4.0.4

Thank you for your help !

I think tctl rm node <node-name> should work. Usually, nodes that have stopped usually expire and get removed automatically, so there is no need to explicitly remove nodes.