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

OptionShorthandUsageRequiredDefault
--base-dir-bSets the base directory for Olares.No$HOME/.olares
--master-hostDefines the IP address of the master node.YesN/A
--master-node-nameSpecifies the Kubernetes node name of the master node.NoN/A
--master-ssh-userSets the remote Linux user name for SSH login to the master node.Noroot
--master-ssh-passwordProvides the password for the Linux user.Yes if a non-root master-ssh-user is specified.N/A
--master-ssh-private-key-pathSpecifies the path to the private SSH key for authenticating as the Linux user.No/root/.ssh/id_rsa
--master-ssh-portSets the SSH service's listening port on the master node.No22
--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.
NoCurrent version
--help-hDisplays help information.NoN/A

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