Scale an MKE cluster¶
By adding or removing nodes from the MKE cluster, you can horizontally scale MKE to fit your needs as your applications grow in size and use.
Scale using the MKE web UI¶
For detail on how to use the MKE web UI to scale your cluster, refer to Join Linux nodes or Join Windows worker nodes, depending on which operating system you use. In particular, these topics offer information on adding nodes to a cluster and configuring node availability.
Scale using the CLI¶
You can also use the command line to perform all scaling operations.
Scale operation |
Command |
---|---|
Obtain the join token |
Run the following command on a manager node to obtain the docker swarm join-token <node-type>
|
Configure a custom listen address |
Specify the address and port where the new node listens for inbound cluster management traffic: docker swarm join \
--token SWMTKN-1-2o5ra9t7022neymg4u15f3jjfh0qh3yof817nunoioxa9i7lsp-dkmt01ebwp2m0wce1u31h6lmj \
--listen-addr 234.234.234.234 \
192.168.99.100:2377
|
Verify node addition |
Once your node is added, run the following command on a manager node to verify its presence: docker node ls
|
Set node availability state |
Use the --availability option to set node availability,
indicating docker node update --availability <availability-state> <node-hostname>
|
Remove the node |
docker node rm <node-hostname>
|