Rancher Agent Options
Rancher deploys an agent on each node to communicate with the node. This pages describes the options that can be passed to the agent. To use these options, you will need to create a cluster with custom nodes and add the options to the generated docker run
command when adding a node.
For an overview of how Rancher communicates with downstream clusters using node agents, refer to the architecture section.
General options
Parameter | Environment variable | Description |
---|---|---|
—server | CATTLE_SERVER | The configured Rancher server-url setting which the agent connects to |
—token | CATTLE_TOKEN | Token that is needed to register the node in Rancher |
—ca-checksum | CATTLE_CA_CHECKSUM | The SHA256 checksum of the configured Rancher cacerts setting to validate |
—node-name | CATTLE_NODE_NAME | Override the hostname that is used to register the node (defaults to hostname -s ) |
—label | CATTLE_NODE_LABEL | Add node labels to the node. For multiple labels, pass additional —label options. (—label key=value ) |
—taints | CATTLE_NODE_TAINTS | Add node taints to the node. For multiple taints, pass additional —taints options. (—taints key=value:effect ) |
Role options
Parameter | Environment variable | Description |
---|---|---|
—all-roles | ALL=true | Apply all roles (etcd ,controlplane ,worker ) to the node |
—etcd | ETCD=true | Apply the role etcd to the node |
—controlplane | CONTROL=true | Apply the role controlplane to the node |
—worker | WORKER=true | Apply the role worker to the node |
IP address options
Parameter | Environment variable | Description |
---|---|---|
—address | CATTLE_ADDRESS | The IP address the node will be registered with (defaults to the IP used to reach 8.8.8.8 ) |
—internal-address | CATTLE_INTERNAL_ADDRESS | The IP address used for inter-host communication on a private network |
Dynamic IP address options
For automation purposes, you can’t have a specific IP address in a command as it has to be generic to be used for every node. For this, we have dynamic IP address options. They are used as a value to the existing IP address options. This is supported for --address
and --internal-address
.