Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RKE2 re-register existing nodes #4852

Closed
wrender opened this issue Oct 6, 2023 · 1 comment
Closed

RKE2 re-register existing nodes #4852

wrender opened this issue Oct 6, 2023 · 1 comment

Comments

@wrender
Copy link

wrender commented Oct 6, 2023

Is your feature request related to a problem? Please describe.
In RKE1 we could re-provision ephemeral hosts and have them re-register into the cluster over top of the existing node name. Without changing the dns/nodeName to something new. This was great in our environment as we often re-use the dns name on the hosts as they are bare metal.

Describe the solution you'd like
Would it be possible to have an option with RKE2 to allow nodes re-registering in with the same dns/nodeName and basically overwrite the existing node that was registered in the cluster?

@brandond
Copy link
Member

brandond commented Oct 12, 2023

If you want to re-register with the same name, you need to either retain the node password file, or delete the node password secret. This is covered in the docs at https://docs.rke2.io/advanced

Agents register with the server using the cluster secret portion of the join token, along with a randomly generated node-specific password, which is stored on the agent at /etc/rancher/node/password. The server will store the passwords for individual nodes as Kubernetes secrets, and any subsequent attempts must use the same password. Node password secrets are stored in the kube-system namespace with names using the template .node-password.rke2. These secrets are deleted when the corresponding Kubernetes node is deleted.

If the /etc/rancher/node directory of an agent is removed, the password file should be recreated for the agent prior to startup, or the entry removed from the server or Kubernetes cluster (depending on the RKE2 version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants