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#

      --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 "/var/lib/k0s/run/status.sock")
  -v, --verbose                Verbose logging (default: false)
      --wait                   wait forever (default false)

Options inherited from parent commands#

      --data-dir string   Data Directory for k0s (default: /var/lib/k0s). DO NOT CHANGE for an existing setup, things will break!
      --debug             Debug logging [$DEBUG]

SEE ALSO#