Skip to content

node

Synopsis

The node command manages node-related operations.

bash
olares-cli node subcommand [options]

Subcommands

SubcommandDescription
masterinfoRetrieves system information about a target master node and checks whether the current node can join the cluster as a worker.
addAdds the current node to an existing Olares cluster. The node's environment must already meet all prerequisites for Olares.

Options

NameShortDescription
--base-dir-bSets the base directory for Olares.
Defaults to $HOME/.olares.
--master-hostDefines the IP address of the master node.
This option is required.
--master-node-nameSpecifies the Kubernetes node name of the master node.
--master-ssh-userSets the remote Linux user name for SSH login to the master node.
Defaults to root.
--master-ssh-passwordProvides the password for the Linux user.
Required if a non-root master-ssh-user is specified.
--master-ssh-private-key-pathSpecifies the path to the private SSH key for authenticating as the Linux user.
Defaults to /root/.ssh/id_rsa.
--master-ssh-portSets the SSH service's listening port on the master node.
Defaults to 22.
--version-vSpecifies the Olares version.
Version values follow the format x.y.z (e.g., 1.10.0) or include a build date (e.g., 1.10.0-20241109).
Refer to the GitHub Releases page for available versions.
--help-hDisplays help information.

Example

bash
# Retrieve system information from a master node at IP 192.168.1.15
olares-cli node masterinfo --master-host 192.168.1.15

# If a specific SSH key is required for authentication
olares-cli node masterinfo --master-host 192.168.1.15 --master-ssh-private-key-path /home/olares/.ssh/id_rsa

# For non-root SSH users, specify the username and password
olares-cli node masterinfo --master-host 192.168.1.15 --master-ssh-user olares --master-ssh-password password123

# Add the current node to a cluster with the master node at IP 192.168.1.15
olares-cli node add --master-host 192.168.1.15

# Specify a custom base directory for the installation
olares-cli node add --base-dir /custom/path --master-host 192.168.1.15