Hi there,
I used kubeadm init
to create my master node successfully, but when I tried to use commanc kubeadm join
on my other node I got the error below:
The node could not join master node and it said “unauthorized” error.
Please suggest how to solve this. Thanks in advance!
mag1
April 24, 2023, 7:51am
2
Seems you either didn’t specify … or your token has expired (somehow). Anyway, in such a case get a new one and try joining again:
On you Control-Plane execute:
token create --print-join-command
This will generate not only a new cluster-toke but also print out the command you’ll need to execute on your worker node to join the cluster.
Finally set the correct role - e.g.:
kubectl label node <k8s-worker1> node-role.kubernetes.io/worker=worker