Skip to main content

sealos_exec

sealos exec

exec a shell command or script on all node.

sealos exec [flags]

Examples


exec to default cluster: default
sealos exec "cat /etc/hosts"
specify the cluster name(If there is only one cluster in the $HOME/.sealos directory, it should be applied. ):
sealos exec -c my-cluster "cat /etc/hosts"
set role label to exec cmd:
sealos exec -c my-cluster -r master,slave,node1 "cat /etc/hosts"
set ips to exec cmd:
sealos exec -c my-cluster --ips 172.16.1.38 "cat /etc/hosts"

Options

  -c, --cluster-name string   submit one cluster name (default "default")
-h, --help help for exec
--ips strings ssh ips list on node
-r, --roles string set role label to roles

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