I've lost the original 'kubeadm join' command when I previously ran kubeadm init
.
How can I retrieve this value again?
By using the –print-join-command argument kubeadm will output the token and SHA hash required to securely communicate with the master. Use kubeadm to list all tokens in order to verify our new one.
To join a master node to a Kubernetes cluster, you need more steps than to join a worker node. You need to get a cluster configuration file, upload control-plane certificates, generate a join command, and then combine the 2 of them to create a full join command and execute the command on the new master node.
To create a new certificate key you must use 'kubeadm init phase upload-certs --upload-certs'. Path to a kubeadm configuration file. A human friendly description of how this token is used. Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.
Kubeadm is a tool built to provide kubeadm init and kubeadm join as best-practice "fast paths" for creating Kubernetes clusters. kubeadm performs the actions necessary to get a minimum viable cluster up and running. By design, it cares only about bootstrapping, not about provisioning machines.
kubeadm token create --print-join-command
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With