Skip to content

K0s token create

k0s token create#

Create join token

k0s token create [flags]

Examples#

k0s token create --role worker --expiry 100h //sets expiration time to 100 hours
k0s token create --role worker --expiry 10m  //sets expiration time to 10 minutes

Options#

      --expiry string   Expiration time of the token. Format 1.5h, 2h45m or 300ms. (default "0s")
  -h, --help            help for create
      --role string     Either worker or controller (default "worker")
      --wait            wait forever (default false)

Options inherited from parent commands#

  -c, --config string          config file, use '-' to read the config from stdin
      --data-dir string        Data Directory for k0s (default: /var/lib/k0s). DO NOT CHANGE for an existing setup, things will break!
  -d, --debug                  Debug logging (default: false)
      --debugListenOn string   Http listenOn for Debug pprof handler (default ":6060")
      --status-socket string   Full file path to the socket file. (default "/var/lib/k0s/run/status.sock")
  -v, --verbose                Verbose logging (default: false)

SEE ALSO#