Add a machine

After you create a new OpenStack-based Mirantis Container Cloud managed cluster as described in Create a managed cluster, proceed with adding machines to this cluster using the Container Cloud web UI.

You can also use the instruction below to scale up an existing managed cluster.

To add a machine to an OpenStack-based managed cluster:

  1. Optional. Available since Container Cloud 2.18.0 as TechPreview. If you need to boot a machine from a block storage volume, complete steps described in Boot a machine from a block storage volume.

  2. Log in to the Container Cloud web UI with the m:kaas:namespace@operator or m:kaas:namespace@writer permissions.

  3. Switch to the required project using the Switch Project action icon located on top of the main left-side navigation panel.

  4. In the Clusters tab, click the required cluster name. The cluster page with Machines list opens.

  5. On the cluster page, click Create Machine.

  6. Fill out the form with the following parameters as required:

    Container Cloud machine configuration

    Parameter

    Description

    Create Machines Pool

    Available since Container Cloud 2.17.0. Select to create a set of machines with the same provider spec to manage them as a single unit. Enter the machine pool name in the Pool Name field.

    Count

    Specify the number of machines to create. If you create a machine pool, specify the replicas count of the pool.

    Select Manager or Worker to create a Kubernetes manager or worker node.

    Caution

    The required minimum number of machines:

    • 3 manager nodes for HA.

    • 2 worker nodes for the Container Cloud workloads. If the multiserver mode is enabled for StackLight, add 3 worker nodes.

    A cluster can have more than 3 manager machines, but only an odd number. In an even-sized cluster, an additional machine remains in the Pending state until an extra manager machine is added. An even number of manager machines does not provide additional fault tolerance but increases the number of node required for etcd quorum.

    Flavor

    From the drop-down list, select the required hardware configuration for the machine. The list of available flavors corresponds to the one in your OpenStack environment.

    For the hardware requirements, see Requirements for an OpenStack-based cluster.

    Image

    From the drop-down list, select the required cloud image:

    • CentOS 7.9

    • Ubuntu 20.04

    If you do not have the required image in the list, add it to your OpenStack environment using the Horizon web UI by downloading it from:

    Warning

    A Container Cloud cluster based on both Ubuntu and CentOS operating systems is not supported.

    Availability Zone

    From the drop-down list, select the availability zone from which the new machine will be launched.

    Configure Server Metadata

    Optional. Select Configure Server Metadata and add the required number of string key-value pairs for the machine meta_data configuration in cloud-init.

    Prohibited keys are: KaaS, cluster, clusterID, namespace as they are used by Container Cloud.

    Boot From Volume Available since 2.19.0

    Optional. Select to boot a machine from a block storage volume. Use the Up and Down arrows in the Volume Size (GiB) field to define the required volume size.

    This optoin applies to clouds that do not have enough space on hypervisors. After enabling this option, the Cinder storage is used instead of the Nova storage.

    Upgrade Index

    Optional. Generally available since Container Cloud 2.19.0. A positive numeral value that defines the order of machine upgrade during a cluster update.

    Note

    You can change the upgrade order later on an existing cluster. For details, see Change the upgrade order of a machine or machine pool.

    Consider the following upgrade index specifics:

    • The first machine to upgrade is always one of the control plane machines with the lowest upgradeIndex. Other control plane machines are upgraded one by one according to their upgrade indexes.

    • If the Cluster spec dedicatedControlPlane field is false, worker machines are upgraded only after the upgrade of all control plane machines finishes. Otherwise, they are upgraded after the first control plane machine, concurrently with other control plane machines.

    • If several machines have the same upgrade index, they have the same priority during upgrade.

    • If the value is not set, the machine is automatically assigned a value of the upgrade index.

    Node Labels

    Select the required node labels for the worker machine to run certain components on a specific node. For example, for the StackLight nodes that run OpenSearch and require more resources than a standard node, select the StackLight label. The list of available node labels is obtained from your current Cluster release.

    Note

    Due to the known issue 23002, a custom value for a predefined node label cannot be set using the Container Cloud web UI. For a workaround, refer to the issue description.

    Caution

    If you deploy StackLight in the HA mode (recommended):

    • Add the StackLight label to minimum three worker nodes. Otherwise, StackLight will not be deployed until the required number of worker nodes is configured with the StackLight label.

    • Removal of the StackLight label from worker nodes along with removal of worker nodes with StackLight label can cause the StackLight components to become inaccessible. It is important to correctly maintain the worker nodes where the StackLight local volumes were provisioned. For details, see Delete a cluster machine.

      To obtain the list of nodes where StackLight is deployed, refer to Upgrade managed clusters with StackLight deployed in HA mode.

    Note

    You can add node labels after deploying a worker machine. On the Machines page, click the More action icon in the last column of the required machine field and select Configure machine.

  7. Click Create.

  8. Repeat the steps above for the remaining machines.

    Monitor the deploy or update live status of the machine:

    • Quick status

      On the Clusters page, in the Managers or Workers columns. The green status icon indicates that the machine is Ready, the orange status icon indicates that the machine is Updating.

    • Detailed status

      In the Machines section of a particular cluster page, in the Status column. Hover over a particular machine status icon to verify the deploy or update status of a specific machine component.

    You can monitor the status of the following machine components:

    Component

    Description

    Kubelet

    Readiness of a node in a Kubernetes cluster

    Swarm

    Health and readiness of a node in a Docker Swarm cluster

    LCM

    LCM readiness status of a node

    ProviderInstance

    Readiness of a node in the underlying infrastructure (virtual or bare metal, depending on the provider type)

    The machine creation starts with the Provision status. During provisioning, the machine is not expected to be accessible since its infrastructure (VM, network, and so on) is being created.

    Other machine statuses are the same as the LCMMachine object states described in LCM Controller.

    Once the status changes to Ready, the deployment of the managed cluster components on this machine is complete.

  9. Verify the status of the cluster nodes as described in Connect to a Mirantis Container Cloud cluster.

Warning

An operational managed cluster must contain a minimum of 3 Kubernetes manager nodes and 2 Kubernetes worker nodes. The deployment of the cluster does not start until the minimum number of nodes is created.

A machine with the manager node role is automatically deleted during the cluster deletion.

  • Before Container Cloud 2.17.0, to meet the etcd quorum and prevent the deployment failure, deletion of the manager nodes is prohibited.

  • Since Container Cloud 2.17.0, deletion of the manager nodes is allowed for non-MOSK-based clusters within the Technology Preview features scope for the purpose of node replacement or recovery.