Skip to main content

sealos_gen

sealos gen

Generate a Clusterfile

Synopsis

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

sealos gen [flags]

Examples


generate a cluster with multi images, specify masters and nodes:
sealos gen labring/kubernetes:v1.24.0 labring/calico:v3.22.1 \
--masters 192.168.0.2,192.168.0.3,192.168.0.4 \
--nodes 192.168.0.5,192.168.0.6,192.168.0.7 --passwd xxx

specify server InfraSSH port:
all servers use the same InfraSSH port:
sealos gen labring/kubernetes:v1.24.0 --masters 192.168.0.2,192.168.0.3,192.168.0.4 \
--nodes 192.168.0.5,192.168.0.6,192.168.0.7 --port 24 --passwd xxx
different InfraSSH port numbers:
sealos gen labring/kubernetes:v1.24.0 --masters 192.168.0.2,192.168.0.3:23,192.168.0.4:24 \
--nodes 192.168.0.5:25,192.168.0.6:25,192.168.0.7:27 --passwd xxx

Options

      --cmd strings        set cmd for image cmd instruction
-e, --env strings set custom environment variables
-h, --help help for gen
-m, --masters string set Count or IPList to masters
--name string set cluster name variables (default "default")
-n, --nodes string set Count or IPList to nodes
-p, --passwd string set cloud provider or baremetal server password
--pk string set baremetal server private key (default "/home/ubuntu/.ssh/id_rsa")
--pk-passwd string set baremetal server private key password
--port uint16 set the sshd service port number for the server (default 22)
-u, --user string set baremetal server username (default "root")

Options inherited from parent commands

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

SEE ALSO

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