kubeadm token

    creates an initial token with a 24-hour TTL. The following commands allow you to managesuch a token and also to create and manage new ones.

    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.

    Options

    Options inherited from parent commands

    —dry-run
    Whether to enable dry-run mode or not
    —kubeconfig string Default: "/etc/kubernetes/admin.conf"
    The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
    —rootfs string
    [EXPERIMENTAL] The path to the 'real' host root filesystem.

    kubeadm token delete

    Synopsis

    The [token-value] is the full Token of the form “[a-z0-9]{6}.[a-z0-9]{16}” or theToken ID of the form “[a-z0-9]{6}” to delete.

    Options inherited from parent commands

    —dry-run
    Whether to enable dry-run mode or not
    —kubeconfig string Default: "/etc/kubernetes/admin.conf"
    The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
    —rootfs string
    [EXPERIMENTAL] The path to the 'real' host root filesystem.

    Synopsis

    This command will print out a randomly-generated bootstrap token that can be used withthe “init” and “join” commands.

    You don’t have to use this command in order to generate a token. You can do soyourself as long as it is in the format “[a-z0-9]{6}.[a-z0-9]{16}“. Thiscommand is provided for convenience to generate tokens in the given format.

    Options

    —dry-run
    Whether to enable dry-run mode or not
    —kubeconfig string Default: "/etc/kubernetes/admin.conf"
    The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
    —rootfs string
    [EXPERIMENTAL] The path to the 'real' host root filesystem.

    kubeadm token list

    Synopsis

    This command will list all bootstrap tokens for you.

    Options

    Options inherited from parent commands

    —dry-run
    Whether to enable dry-run mode or not
    —kubeconfig string Default: "/etc/kubernetes/admin.conf"
    The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
    —rootfs string
    [EXPERIMENTAL] The path to the 'real' host root filesystem.
    • to bootstrap a Kubernetes worker node and join it to the cluster

    Feedback

    Was this page helpful?

    Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on.Open an issue in the GitHub repo if you want toreport a problemor.