I have recently starting experimenting with Kubernetes. I have a cluster and everything looks good. I am trying to create a fully automation Ansible script to join / remove workers / master nodes at any point in time.
So far I have managed to do so but the token expires in 24h after launching the master prime node. So I am looking in between kubeadm token create or kubeadm token generate options.
I am not sure what is the difference between those two. Can someone with more experience explain a bit more than the official documentation: kubeadm token.
kubeadm token generate only generates a string which is in the correct format to be a valid token. It does not do anything else with it, only give it to you so you can use it later.
You can store this string somewhere if you need to use it later.
You can also pass it to
kubeadm token create to use that string instead of it generating one.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.