Is your feature request related to a problem? Please describe.
I'm currently automatically adding Nodes to a Kubernetes Cluster which are connected via Tailscale. While joining the network via authkey works well, there is no similar approach for a node to leave the network.
The problem here is, that Kubernetes/Cluster-Autoscaler deprovisions nodes as part of a normal cluster lifecycle. This means those nodes are not part of Kubernetes anymore, but are still part of the Tailscale network (nodes are terminated, but they are listed in the admin panel).
At the moment this makes it necessary to identify nodes that are not existent anymore and manually remove them via admin panel.
The same issue occurs, when the tailscale client is running in a container and this container is killed at some point.
Describe the solution you'd like
In my opinion a Tailscale client should be enabled to deregister itself from the Tailscale network. This deregistration should lead to a removal of the entry in the admin panel.
This enables a user to create a hook on node termination, that is taking care for deregistration of the client.
This could be realised with a tailscale command similar to tailscale up - e.g. tailscale down or tailscale rm.
Describe alternatives you've considered
A restful API endpoint that could be triggered from "outside" as a cluster admin. Haven't thought that through.
Additional context
Is your feature request related to a problem? Please describe.
I'm currently automatically adding Nodes to a Kubernetes Cluster which are connected via Tailscale. While joining the network via authkey works well, there is no similar approach for a node to leave the network.
The problem here is, that Kubernetes/Cluster-Autoscaler deprovisions nodes as part of a normal cluster lifecycle. This means those nodes are not part of Kubernetes anymore, but are still part of the Tailscale network (nodes are terminated, but they are listed in the admin panel).
At the moment this makes it necessary to identify nodes that are not existent anymore and manually remove them via admin panel.
The same issue occurs, when the tailscale client is running in a container and this container is killed at some point.
Describe the solution you'd like
In my opinion a Tailscale client should be enabled to deregister itself from the Tailscale network. This deregistration should lead to a removal of the entry in the admin panel.
This enables a user to create a hook on node termination, that is taking care for deregistration of the client.
This could be realised with a tailscale command similar to
tailscale up- e.g.tailscale downortailscale rm.Describe alternatives you've considered
A restful API endpoint that could be triggered from "outside" as a cluster admin. Haven't thought that through.
Additional context