diff --git a/cli/commands.go b/cli/commands.go index 622620ae..c8864a94 100644 --- a/cli/commands.go +++ b/cli/commands.go @@ -117,7 +117,7 @@ func CreateCluster(c *cli.Context) error { k3sServerArgs, env, c.String("name"), - strings.Split(c.String("volume"), ","), + c.StringSlice("volume"), portmap, ) if err != nil { @@ -184,7 +184,7 @@ func CreateCluster(c *cli.Context) error { k3sWorkerArgs, env, c.String("name"), - strings.Split(c.String("volume"), ","), + c.StringSlice("volume"), i, c.String("api-port"), portmap, diff --git a/main.go b/main.go index bac021e9..a703d5b0 100644 --- a/main.go +++ b/main.go @@ -56,9 +56,9 @@ func main() { Value: defaultK3sClusterName, Usage: "Set a name for the cluster", }, - cli.StringFlag{ + cli.StringSliceFlag{ Name: "volume, v", - Usage: "Mount one or more volumes into every node of the cluster (Docker notation: `source:destination[,source:destination]`)", + Usage: "Mount one or more volumes into every node of the cluster (Docker notation: `source:destination`)", }, cli.StringSliceFlag{ Name: "publish, add-port",