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#

      --data-dir string        Data Directory for k0s. DO NOT CHANGE for an existing setup, things will break! (default "/var/lib/k0s")
  -d, --debug                  Debug logging (default: false)
      --debugListenOn string   Http listenOn for Debug pprof handler (default ":6060")
      --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")
      --status-socket string   Full file path to the socket file. (default: <rundir>/status.sock)
  -v, --verbose                Verbose logging (default: false)
      --wait                   wait forever (default false)

SEE ALSO#