Skip to main content


sealos gen

generate a Clusterfile


generate a Clusterfile of the kubernetes cluster, which can be applied by 'sealos apply' command

sealos gen [flags]


generate a cluster with multi images, specify masters and nodes:
sealos gen labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \
--masters,, \
--nodes,, --passwd xxx

specify server InfraSSH port:
all servers use the same InfraSSH port:
sealos gen labring/kubernetes:v1.24.0 --masters,, \
--nodes,, --port 24 --passwd xxx
different InfraSSH port numbers:
sealos gen labring/kubernetes:v1.24.0 --masters,, \
--nodes,, --passwd xxx


      --cluster string        name of cluster to applied run action (default "default")
--cmd strings override CMD directive in images
--config-file strings path of custom config files, to use to replace the resource
--env strings environment variables to set during command execution
-h, --help help for gen
--masters string masters to run with
--nodes string nodes to run with
-o, --output string print output to named file
-p, --passwd string use given password to authenticate with
-i, --pk string selects a file from which the identity (private key) for public key authentication is read (default "/root/.ssh/id_rsa")
--pk-passwd string passphrase for decrypting a PEM encoded private key
--port uint16 port to connect to on the remote host (default 22)
-u, --user string username to authenticate as

Options inherited from parent commands

      --cluster-root string   cluster root directory (default "/var/lib/sealos")
--debug enable debug logger


  • sealos - simplest way install kubernetes tools.
Auto generated by spf13/cobra on 13-Oct-2022