Search code examples
kuberneteskubeadm

Can't find kubeadm token after initializing master


When i run kubeadm init it shows a token that I should use from the other hosts to connect to this host. Where is that token stored? I'm trying to figure out more ways to automate this by adding kubeadm inside of Terraform.

Thanks for any help!


Solution

  • --token

    By default, kubeadm init automatically generates the token used to initialise each new node. If you would like to manually specify this token, you can use the --token flag. The token must be of the format ‘<6 character string>.<16 character string>’.

    you can see token value on master node using command:

    cat /etc/kubernetes/pki/tokens.csv