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

Microk8s clustering, Connection Filed, Invalid Token (500) error only when joining cluster with --worker flag in 1.30/stable #4513

Closed
MateuszBeru opened this issue Apr 26, 2024 · 1 comment

Comments

@MateuszBeru
Copy link

Hi, I do try to set up a cluster of 5 VMs (2x master + 3x worker). During set up of a cluster I do receive an error when using command

microk8s join 11.22.33.44:25000/token/token --worker
Contacting cluster at 11.22.33.44
Connection failed. Invalid token (500).

When joining cluster as a master (without --worker flag) there is no problems and I do have successful join

microk8s join 11.22.33.44:25000/token/token
Contacting cluster at 11.22.33.44
Waiting for this node to finish joining the cluster. .. .. .. ..
Successfully joined the cluster.

I had found an Issue on github related to the error Joining a cluster not possible in v1.24 #3225 and I had proceed to add all of related IPs to /etc/hosts as suggested but still with the same output: masters can join, workers spit out Invalid Token error

I'm not using version 1.24 but 1.30/stable but seems like this problem is still occurring.
snap install microk8s --channel=1.30/stable --classic

@MateuszBeru
Copy link
Author

My bad

Note that if you attempt to microk8s join a node and it fails for whatever reason, the token will still be consumed (so you need to create a new one). Alternatively, you can create a token with a specified TTL like so:

microk8s add-node --token-ttl 3600

Newly generated token worked with --worker flag

Issue closed

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

1 participant