CloudEphemeral node management is moving from Machine Controller Manager (MCM) to Cluster API (CAPI). Existing NodeGroups keep running on MCM, new ones are created on CAPI by default. The procedure for moving existing groups is described in How to migrate node groups to Cluster API (CAPI).
vSphere resource management
Removing CloudPermanent nodes in vSphere
Nodes of the CloudPermanent type are created based on the node group configuration specified in the nodeGroups section of the VsphereClusterConfiguration resource.
The replicas parameter defines the required number of virtual machines in the group. After the configuration is changed, run the dhctl converge command to start Terraform and bring the state of virtual machines in VMware vSphere in line with the specified number of replicas.
To reduce the number of nodes in a group, decrease the replicas value and run dhctl converge.
Do not remove the group definition from the nodeGroups section while the value of the replicas parameter is greater than zero.
If the group definition is removed before the number of replicas is reduced to zero, the Terraform state may become inconsistent with the state of virtual machines and disks in VMware vSphere. As a result, a subsequent dhctl converge run may fail and require manual state recovery.
Reducing the number of nodes
To reduce the number of nodes in a CloudPermanent group:
-
Open the vSphere configuration for editing:
d8 system edit provider-cluster-configuration -
In the
nodeGroupssection, find the required group and decrease the value of thereplicasparameter to the required number of nodes.For example, to reduce the number of nodes in the
workergroup from three to two, setreplicas: 2:nodeGroups: - name: worker replicas: 2 zones: - zone-a instanceClass: numCPUs: 4 memory: 8192 template: Templates/ubuntu-24.04 datastore: datastore-1 mainNetwork: network-1Save the changes.
-
In the Deckhouse Platform installer container, apply the updated configuration:
dhctl converge \ --ssh-host <MASTER-NODE-IP-ADDRESS> \ --ssh-user <USERNAME> \ --ssh-agent-private-keys /tmp/.ssh/<PRIVATE-SSH-KEY-NAME> -
Wait for
dhctl convergeto complete and check the number of nodes in the group:d8 k get nodes -l node.deckhouse.io/group=<GROUP-NAME>
Completely removing a node group
A CloudPermanent group must be removed in two stages. First, reduce the number of replicas to zero and wait for the nodes and virtual machines to be removed. You can then remove the group definition from the vSphere configuration.
To completely remove a CloudPermanent group:
-
Open the vSphere configuration for editing:
d8 system edit provider-cluster-configuration -
In the
nodeGroupssection, find the group to be removed and setreplicas: 0. Do not remove the group definition at this stage. For example:nodeGroups: - name: worker replicas: 0 zones: - zone-a instanceClass: numCPUs: 4 memory: 8192 template: Templates/ubuntu-24.04 datastore: datastore-1 mainNetwork: network-1Save the changes.
-
In the Deckhouse Platform installer container, apply the updated configuration:
dhctl converge \ --ssh-host <MASTER-NODE-IP-ADDRESS> \ --ssh-user <USERNAME> \ --ssh-agent-private-keys /tmp/.ssh/<PRIVATE-SSH-KEY-NAME> -
Wait for
dhctl convergeto complete successfully and make sure that no nodes remain in the group:d8 k get nodes -l node.deckhouse.io/group=<GROUP-NAME>The command must not return any nodes from the group being removed.
Also use vSphere Client to make sure that the virtual machines associated with the group have been removed.
-
Open the cloud provider configuration again:
d8 system edit provider-cluster-configuration -
Remove the group definition from the
nodeGroupssection and save the changes. -
Apply the configuration again:
dhctl converge \ --ssh-host <MASTER-NODE-IP-ADDRESS> \ --ssh-user <USERNAME> \ --ssh-agent-private-keys /tmp/.ssh/<PRIVATE-SSH-KEY-NAME> -
Make sure that the NodeGroup object has been removed:
d8 k get nodegroup <GROUP-NAME>The command must return a message stating that the requested resource was not found.