Can't find kubeadm token after initializing master

vallard picture vallard · Oct 13, 2016 · Viewed 33.2k times · Source

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!

Answer

Chris Fregly picture Chris Fregly · Feb 8, 2018

The instruction for Kubernetes 1.9.x (and above) can be found here.

The commands I used are:

kubeadm token generate
kubeadm token create <generated-token> --print-join-command --ttl=0