3.0 KiB
3.0 KiB
Create bootstrap tokens on the server.
Synopsis
This command will create a bootstrap token for you. You can specify the usages for this token, the "time to live" and an optional human friendly description.
The [token] is the actual token to write. This should be a securely generated random token of the form "[a-z0-9]{6}.[a-z0-9]{16}". If no [token] is given, kubeadm will generate a random token instead.
kubeadm token create [token]
Options
<tr>
<td colspan="2">--config string</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">Path to kubeadm config file (WARNING: Usage of a configuration file is experimental)</td>
</tr>
<tr>
<td colspan="2">--description string</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">A human friendly description of how this token is used.</td>
</tr>
<tr>
<td colspan="2">--groups stringSlice Default: [system:bootstrappers:kubeadm:default-node-token]</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">Extra groups that this token will authenticate as when used for authentication. Must match "system:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]".</td>
</tr>
<tr>
<td colspan="2">-h, --help</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">help for create</td>
</tr>
<tr>
<td colspan="2">--print-join-command</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">Instead of printing only the token, print the full 'kubeadm join' flag needed to join the cluster using the token.</td>
</tr>
<tr>
<td colspan="2">--ttl duration Default: 24h0m0s</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">The duration before the token is automatically deleted (e.g. 1s, 2m, 3h). If set to '0', the token will never expire.</td>
</tr>
<tr>
<td colspan="2">--usages stringSlice Default: [signing,authentication]</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [signing,authentication].</td>
</tr>
Options inherited from parent commands
<tr>
<td colspan="2">--dry-run</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">Whether to enable dry-run mode or not</td>
</tr>
<tr>
<td colspan="2">--kubeconfig string Default: "/etc/kubernetes/admin.conf"</td>
</tr>
<tr>
<td></td><td style="line-height: 130%">The KubeConfig file to use when talking to the cluster</td>
</tr>