-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Nodes joined with kubeadm-style bootstrap tokens cannot automatically rejoin when the node object is deleted. #7797
Comments
Validated on master branch using commit id 3461739Docs: https://docs.k3s.io/cli/token#bootstrap Environment DetailsInfrastructure Node(s) CPU architecture, OS, and Version: Cluster Configuration: Replication results using k3s v1.27.3+k3s1
Used the token generated to join the agent node
Deleted agent node after stopping agent service
Deleted password file on agent node
After starting the agent service now, agent refuses to join the cluster with below logs
On Agent
Workaround as described after removing the client-kubelet.crt and client-kubelet.key and password file, agent was able to join the cluster
Validation results using commit id 3461739 from master branch Following the above steps, agent successfully joined the cluster after restarting the service without workaround
|
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Linux dev-master-0 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
3 servers, 3 nodes, all on qemu VMs
Describe the bug:
Documentation here https://docs.k3s.io/architecture#how-agent-node-registration-works states that it is enough to delete the node and delete from this node
/etc/rancher/node/password
. I tried but got on the worker node log entries:Log on master (server) nodes:
Steps To Reproduce:
k3s token create --ttl 24h
systemctl stop k3s-agent
)kubectl delete node xxx
)rm -rf /etc/rancher/node/
on host xxxsystemctl start k3s-agent
If I deleted
rm -r /etc/rancher/node/ /var/lib/rancher/k3s/agent/client-kubelet.crt /var/lib/rancher/k3s/agent/client-kubelet.key
in step 7 the node was correctly recreated and joined in the cluster.Expected behavior:
Either update the documentation or refresh client-kubelet.crt and client-kubelet.key during rejoining to the cluster.
Actual behavior:
Node is not able to correctly rejoin the cluster after being deleted following the official documentation.
Additional context / logs:
(https://rancher-users.slack.com/archives/CGGQEHPPW/p1687006438335789)
The text was updated successfully, but these errors were encountered: