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 string name of cluster to applied exec action (default "default")
-h, --help help for exec
--ips strings run command on nodes with ip address
-r, --roles string run command on nodes with role
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.