LCM Controller¶
LCM Controller runs on the management and regional cluster and orchestrates
the LCMMachine
objects according to their type and their LCMCluster
object.
Once the LCMCluster
and LCMMachine
objects are created, LCM Controller
starts monitoring them to modify the spec
fields and update
the status
fields of the LCMMachine
objects when required.
The status
field of LCMMachine
is updated by LCM Agent
running on a node of a management, regional, or managed cluster.
Each LCMMachine
has the following lifecycle states:
Uninitialized - the machine is not yet assigned to an
LCMCluster
.Pending - the agent reports a node IP address and host name.
Prepare - the machine executes
StateItems
that correspond to theprepare
phase. This phase usually involves downloading the necessary archives and packages.Deploy - the machine executes
StateItems
that correspond to thedeploy
phase that is becoming a Mirantis Kubernetes Engine (MKE) node.Ready - the machine is being deployed.
Upgrade - the machine is being upgraded to the new MKE version.
Reconfigure - the machine executes
StateItems
that correspond to thereconfigure
phase. The machine configuration is being updated without affecting workloads running on the machine.
The templates for StateItems
are stored in the machineTypes
field of an LCMCluster
object, with separate lists
for the MKE manager and worker nodes.
Each StateItem
has the execution phase
field for a management,
regional, and managed cluster:
The
prepare
phase is executed for all machines for which it was not executed yet. This phase comprises downloading the files necessary for the cluster deployment, installing the required packages, and so on.During the
deploy
phase, a node is added to the cluster. LCM Controller applies thedeploy
phase to the nodes in the following order:First manager node is deployed.
The remaining manager nodes are deployed one by one and the worker nodes are deployed in batches (by default, up to 50 worker nodes at the same time).
LCM Controller deploys and upgrades a Mirantis Container Cloud cluster
by setting StateItems
of LCMMachine
objects following the corresponding
StateItems
phases described above. The Container Cloud cluster upgrade
process follows the same logic that is used for a new deployment,
that is applying a new set of StateItems
to the LCMMachines
after
updating the LCMCluster
object. But if the existing worker node is being
upgraded, LCM Controller performs draining and cordoning on this node honoring
the Pod Disruption Budgets.
This operation prevents unexpected disruptions of the workloads.