Here we list a series of instructions to add or remove nodes from the cluster (for more info go here).
Remove nodes
You may want to remove master, worker, or etcd nodes from your existing cluster. This can be done by running the remove-node.yml playbook. First, all specified nodes will be drained, then stop some kubernetes services and delete some certificates, and finally execute the kubectl command to delete these nodes. Use --extra-vars flag to select the node(s) you want to delete
...
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
# Use this playbook to add a worker node to the cluster $ ansible-playbook -i inventory/mycluster/hosts.yaml -b scale.yml [--limit=<node_name>name1>,<node_name2>] |
To save further processing time, you can use --limit=<node_name> flag to limit KS to avoid disturbing other nodes in the cluster. Before launching the playbook with this flag, it is advisable to launch the facts.yml playbook to refresh facts cache for all nodes.
...