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
# If you don't remember them, find the node names in the inventory/mycluster/hosts.yml file $ ansible-playbook -i inventory/mycluster/hosts.yaml -b remove-node.yml --extra-vars "node=<node1>,<node2>" |
To delete the entire cluster, however, simply use the playbook reset.yaml. Before launching the playbook it is advisable to take a look at the inventory file, as it is possible that there are some nodes left inside it, but no longer part of the cluster.
You may want to add worker, master or etcd nodes to your existing cluster. This can be done by re-running the cluster.yml playbook, after adding a new node in the inventory file.