Information in this document may be out of date

This document has an older update date than the original, so the information it contains may be out of date. If you're able to read English, see the English version for the most up-to-date information:

生成并打印一个引导令牌,但不要在服务器上创建它。

概要

此命令将打印一个随机生成的可以被 "init" 和 "join" 命令使用的引导令牌。

你不必使用此命令来生成令牌。你可以自己设定,只要格式符合 "[a-z0-9]{6}.[a-z0-9]{16}"。 之所以提供这个命令是为了方便生成规定格式的令牌。

你也可以使用 "kubeadm init" 并且不指定令牌,该命令会生成一个令牌并打印出来。

kubeadm token generate [flags]

选项

-h, --help

generate 操作的帮助命令。

从父命令继承的选项

--dry-run

是否启用 `dry-run` 模式。

--kubeconfig string     默认值:"/etc/kubernetes/admin.conf"

用于和集群通信的 kubeconfig 文件。如果它没有被设置,那么 kubeadm 将会搜索一个已经存在于标准路径的 kubeconfig 文件。

--rootfs string

[实验] 指向 '真实' 宿主机根文件系统的路径。

最后修改 September 17, 2023 at 9:36 AM PST: [zh] Clean up kubeadm_token files (f4110cf4a8)