Skip to main content

Token Management

Server Token Rotation

Version Gate

Available as of 2023-11 releases (v1.28.3+rke2r2, v1.27.7+rke2r2, v1.26.10+rke2r2, v1.25.15+rke2r2).

The rke2 token rotate command allows you to rotate and replace the original token used for server bootstrap. After running the command on a single server, all servers and agents that used the original token should be restarted with the new token. The original token will be invalidated and cannot be used to join any new servers or agents to the cluster.

--data-dir valueFolder to hold state/var/lib/rancher/rke2
--kubeconfig valueKubeconfig for authentication to server/etc/rancher/rke2/rke2.yaml
--server valueServer to connect to""
--token valueExisting token used to join a server or agent to a clusterN/A
--new-token valueNew token to replace the original tokenIf not specified, a random 16 character token will be generated