Add and remove cluster nodes
ℹ️
To avoid unexpected complications, make sure that you have an MKE 4 cluster
up and running before you follow the procedures herein for adding and
removing nodes.
Add nodes to an MKE 4 cluster
Append the host information for the new node to the
hosts
section of the MKE configuration file in the following format:- role: worker ssh: address: <address> keyPath: <key location> port: <ssh port> user: <username>
Run
mkectl apply
command to add the new node.
Remove nodes from an MKE 4 cluster
The method for removing nodes from an MKE cluster differs, depending on whether the node is a control plane node or a worker node.
Remove a control plane node
Refer to the k0s documentation, Remove or replace a controller for information on how to remove a control plane node from an MKE 4 cluster.
Remove a worker node
Delete the worker node from the cluster:
kubectl --kubeconfig ~/.mke/mke.kubeconf delete node <worker_node_name>
Run the following command sequence on the node itself, to uninstall k0s:
k0s stop k0s reset reboot
Delete the host information for the deleted node from the
hosts
section of the MKE configuration file, to circumvent any potential mkectl issues.Apply the configuration:
mkectl apply -f <mke-configuration-file>
Last updated on