cmd.Flags().String("secret","","Specify a cluster secret. By default, we generate one.")
cmd.Flags().StringArrayP("volume","v",nil,"Mount volumes into the nodes (Format: `--volume [SOURCE:]DEST[@NODEFILTER[;NODEFILTER...]]`\n - Example: `k3d create -w 2 -v /my/path@worker[0,1] -v /tmp/test:/tmp/other@master[0]`")
cmd.Flags().StringArrayP("port","p",nil,"Map ports from the node containers to the host (Format: `[HOST:][HOSTPORT:]CONTAINERPORT[/PROTOCOL][@NODEFILTER]`)\n - Example: `k3d create -w 2 -p 8080:80@worker[0] -p 8081@worker[1]`")
cmd.Flags().IntVar(&createClusterOpts.WaitForMaster,"wait",-1,"Wait for a specified amount of time (seconds >= 0, where 0 means forever) for the master(s) to be ready or timeout and rollback before returning")
cmd.Flags().BoolVar(&createClusterOpts.WaitForMaster,"wait",false,"Wait for for the master(s) to be ready before returning. Use `--timeout DURATION` to not wait forever.")
cmd.Flags().DurationVar(&createClusterOpts.Timeout,"timeout",0*time.Second,"Rollback changes if cluster couldn't be created in specified duration.")
/* Image Importing */
cmd.Flags().BoolVar(&createClusterOpts.DisableImageVolume,"no-image-volume",false,"Disable the creation of a volume for importing images")
// TODO: avoid `level=fatal msg="starting kubernetes: preparing server: post join: a configuration change is already in progress (5)"`
// ... by scanning for this line in logs and restarting the container in case it appears
log.Debugf("Starting to wait for master node '%s'",masterNode.Name)
// TODO: it may be better to give endtime=starttime+timeout here so that there is no difference between the instances (go func may be called with a few (milli-)seconds difference)