Change the node orchestrator¶
This topic describes how to set the default orchestrator and change the orchestrator for individual nodes.
Set the default orchestrator¶
To set the default orchestrator using the MKE web UI:
Log in to the MKE web UI as an administrator.
In the left-side navigation panel, navigate to <user name> > Admin Settings > Orchestration.
Under Scheduler, select the required default orchestrator.
Click Save.
New workloads will now be scheduled by the specified orchestrator type. Existing nodes in the cluster are not affected.
Once a node is joined to the cluster, you can change the orchestrator that schedules its workloads.
To set the default orchestrator using the MKE configuration file:
Obtain the current MKE configuration file for your cluster.
Set
default_node_orchestrator
to"swarm"
or"kubernetes"
.Upload the new MKE configuration file. Be aware that this will require a wait time of approximately five minutes.
Change the node orchestrator¶
To change the node orchestrator using the MKE web UI:
Log in to the MKE web UI as an administrator.
From the left-side navigation panel, navigate to Shared Resources > Nodes.
Click the node that you want to assign to a different orchestrator.
In the upper right, click the Edit Node icon.
In the Details pane, in the Role section under ORCHESTRATOR TYPE, select either Swarm, Kubernetes, or Mixed.
Warning
Mirantis strongly recommends against using the
Mixed
mode in production environments.Click Save to assign the node to the selected orchestrator.
To change the node orchestrator using the CLI:
Set the orchestrator on a node by assigning the orchestrator labels,
com.docker.ucp.orchestrator.swarm
or
com.docker.ucp.orchestrator.kubernetes
to true
.
Change the node orchestrator. Select from the following options:
Schedule Swarm workloads on a node:
docker node update --label-add com.docker.ucp.orchestrator.swarm=true <node-id>
Schedule Kubernetes workloads on a node:
docker node update --label-add com.docker.ucp.orchestrator.kubernetes=true <node-id>
Schedule both Kubernetes and Swarm workloads on a node:
docker node update --label-add com.docker.ucp.orchestrator.swarm=true <node-id> docker node update --label-add com.docker.ucp.orchestrator.kubernetes=true <node-id>
Warning
Mirantis strongly recommends against using the
Mixed
mode in production environments.Change the orchestrator type for a node from Swarm to Kubernetes:
docker node update --label-add com.docker.ucp.orchestrator.kubernetes=true <node-id> docker node update --label-rm com.docker.ucp.orchestrator.swarm <node-id>
Change the orchestrator type for a node from Kubernetes to Swarm:
docker node update --label-add com.docker.ucp.orchestrator.swarm=true <node-id> docker node update --label-rm com.docker.ucp.orchestrator.kubernetes <node-id>
Note
You must first add the target orchestrator label and then remove the old orchestrator label. Doing this in the reverse order can fail to change the orchestrator.
Verify the value of the orchestrator label by inspecting the node:
docker node inspect <node-id> | grep -i orchestrator
Example output:
"com.docker.ucp.orchestrator.kubernetes": "true"
Important
The com.docker.ucp.orchestrator
label is not displayed in the MKE web UI
Labels list, which presents in the Overview pane for
each node.