code: func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, cfg *kubeadmapiv1beta2.InitConfiguration, printJoinCommand bool, kubeConfigFile string) error {
  	// KubernetesVersion is not used, but we set it explicitly to avoid the lookup
  	// of the version from the internet when executing LoadOrDefaultInitConfiguration
  	phaseutil.SetKubernetesVersion(&cfg.ClusterConfiguration)
  
  	// This call returns the ready-to-use configuration based on the configuration file that might or might not exist and the default cfg populated by flags
  	klog.V(1).Infoln("[token] loading configurations")
  	internalcfg, err := configutil.LoadOrDefaultInitConfiguration(cfgPath, cfg)
  	if err != nil {
  		return err
  	}
  
  	klog.V(1).Infoln("[token] creating token")
  	if err := tokenphase.CreateNewTokens(client, internalcfg.BootstrapTokens); err != nil {
  		return err
  	}
  
  	// if --print-join-command was specified, print a machine-readable full `kubeadm join` command
  	// otherwise, just print the token
  	if printJoinCommand {
  		skipTokenPrint := false
  		joinCommand, err := cmdutil.GetJoinWorkerCommand(kubeConfigFile, internalcfg.BootstrapTokens[0].Token.String(), skipTokenPrint)
  		if err != nil {
  			return errors.Wrap(err, "failed to get join command")
  		}
  		joinCommand = strings.ReplaceAll(joinCommand, "\\\n", "")
  		joinCommand = strings.ReplaceAll(joinCommand, "\t", "")
  		fmt.Fprintln(out, joinCommand)
  	} else {
  		fmt.Fprintln(out, internalcfg.BootstrapTokens[0].Token.String())
  	}
  
  	return nil
  }
docs: // RunCreateToken generates a new bootstrap token and stores it as a secret on the server.