Add a node group to a Managed Kubernetes cluster
You can add a node group on a cloud server or dedicated server to a Managed Kubernetes cluster. You cannot simultaneously use node groups on dedicated servers and node groups on cloud servers in the same cluster.
Learn more about configurations in the Managed Kubernetes node configurations instructions.
Add a node group on a cloud server
Control panel
API
Terraform
-
In the Control panel, in the top menu, click Products and select Managed Kubernetes.
-
In the Clusters section, open the cluster page → Cluster topology tab.
-
Click Add node group.
-
Select the location where all worker nodes in the group will be located. After adding the node group, the location cannot be changed.
-
Configure the worker nodes in the group:
5.1. Select the configuration of the worker nodes in the group:
- Standard — you can specify any resource ratio;
- or GPU — pre-configured node configurations with GPUs and a fixed resource ratio.
If these configurations do not suit your needs, after creating the cluster, you can add a node group with a fixed cloud server configuration using the Managed Kubernetes API or Terraform.
5.2. If you selected the Standard configuration, specify the number of vCPUs, RAM, and select a boot drive. Specify the disk size.
5.3. If you selected the GPU configuration, select the GPU model and node configuration. To install GPU drivers yourself, turn off the GPU Drivers toggle switch. By default, the GPU Drivers toggle switch is on, and preinstalled drivers are used in the cluster. Select a boot disk and specify the disk size.
-
Configure the number of worker nodes. For fault-tolerant operation of system components and the Cilium network plugin, we recommend having at least two worker nodes in the cluster; the nodes can be in different groups:
6.1. To set a fixed number of nodes in the node group, open the Fixed tab and specify the number of nodes.
6.2. To use autoscaling with Cluster Autoscaler in the node group, open the Autoscaled tab and set the minimum and maximum number of nodes in the group — the number of nodes will change only within this range. Autoscaling is not available for GPU node groups without drivers.
-
Configure the Kubernetes version upgrade strategy in node groups:
7.1. Select the node upgrade method. The node upgrade method cannot be changed after the cluster is created.
7.2. In the Max node group size expansion field, specify the maximum number of additional nodes that are temporarily created in the group during the Kubernetes version upgrade. Cannot be zero if the Max group size reduction field value is zero.
7.3. Make sure there are enough quotas to create additional nodes. If necessary, change the quotas.
7.4. In the Max node group size reduction field, specify the maximum number of nodes that can be simultaneously unavailable during the Kubernetes version upgrade. Cannot be zero if the Max group size expansion field value is zero.
-
Optional: add node group labels:
8.1. In the Labels field, click Add.
8.2. Enter the label key.
8.3. Enter the label value.
-
Optional: add node group taints:
9.1. In the Taints field, click Add.
9.2. Enter the taint key.
9.3. Enter the taint value.
9.4. Select the effect:
- NoSchedule — new pods will not be added and existing pods will continue to run;
- PreferNoSchedule — new pods will be added if there are no other free slots in the cluster;
- NoExecute — running pods without tolerations will be evicted.
-
Optional: to make the node group preemptible, in the Additional settings field, select the Preemptible node group checkbox. Preemptible node groups are available in the regions of St. Petersburg, Moscow, and Novosibirsk.
-
Optional: add a script with custom parameters to configure the Managed Kubernetes cluster:
11.1. In the User data field, click Add.
11.2. Paste the script. The maximum size of a script with non-Base64-encoded data is 47 KB. Script examples and supported formats can be found in the User data guide.
-
In the Cloud network block, configure a private subnet with no internet access in which all cluster nodes will be grouped.
12.1. To create a private subnet, select New private subnet in the Subnet for nodes field.
A private network
<cluster_name>-network, a private subnet, and a router<cluster_name>-routerwill be created automatically, where<cluster_name>is the cluster name. CIDR is assigned automatically.The default security group will be assigned to the node ports. Do not change its rules or assign another security group. This will help avoid cluster malfunctions.
12.2. If a private subnet has been created, in the Subnet for nodes field, select an existing subnet. The subnet must meet the following conditions:
- belongs to the network of the project in which you are creating the cluster. You can check which project the network belongs to in the control panel: in the top menu, click Products → Managed Kubernetes → Network → the Private networks tab → the network card. If the network belongs to another project, the network card will display the Cross-project tag and information about the ID of the project in which it was created;
- connected to a cloud router;
- does not overlap with the
10.10.0.0/16,10.96.0.0/12,10.250.0.0/16, and10.251.0.0/24ranges. These ranges are used for Managed Kubernetes internal addressing; - DHCP is disabled;
- only the default security group is assigned to ports. Do not change its rules or assign another security group. This will help avoid cluster failures. You can view the security groups on ports.
-
Click Add. You can view all created nodes in the control panel: in the top menu, click Products and select Cloud servers.
View a list of flavors in a specific pool
Flavors correspond to cloud server configurations and determine the number of vCPUs, RAM, and local disk size (optional) of the server. You can view all ready-to-use cloud server flavors and custom flavors.
-
Open OpenStack CLI.
-
If the pool you specified when configuring OpenStack CLI does not match the pool whose flavors you want to view, change the authorization data in OpenStack API.
-
View a list of available flavors:
openstack flavor listExample response for the ru-9 pool (abbreviated):
+------------+-----------------------+--------+------+-----------+-------+-----------+| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |+------------+-----------------------+--------+------+-----------+-------+-----------+| 1 | m1.tiny | 512 | 0 | 0 | 1 | True || 1011 | SL1.1-1024 | 1024 | 0 | 0 | 1 | True || 3021 | GL2.6-24576-0-1GPU | 24576 | 0 | 0 | 6 | True || 9011 | PRC10.1-512 | 512 | 0 | 0 | 1 | True || 9021 | PRC20.1-512 | 512 | 0 | 0 | 1 | True || 9051 | PRC50.1-512 | 512 | 0 | 0 | 1 | True || 8301 | HFL1.1-2048-30 | 2048 | 30 | 0 | 1 | True |+------------+-----------------------+--------+------+-----------+-------+-----------+Where:
-
ID— the ID of the cloud server flavor; -
Name— the flavor name corresponding to the configuration:m1.XX— OpenStack base configurations, similar to custom configurations;SLX.XX— fixed configurations of the Standard line;GLX.XX— fixed configurations of the GPU line;PRC10.XX— fixed configurations of the Shared line with a 10% vCPU share;PRC20.XX— fixed configurations of the Shared line with a 20% vCPU share;PRC50.XX— fixed configurations of the Shared line with a 50% vCPU share;HFLX.XX— fixed configurations of the HighFreq line;
-
RAM— the amount of RAM in MB; -
Disk— the size of the local disk in GB; -
VCPUs— the number of vCPUs; -
Is Public— the flavor visibility scope:True— public ready-made flavors;False— private flavors.
-
Add a node group on a dedicated server
You can only add a node group in locations where no more than one VLAN is allocated for the private network. To check how many private VLANs are allocated in each location, go to the control panel: in the top menu, click Products → Dedicated servers → the Network section → the VLAN tab.
-
In the control panel, on the top menu, click Products and select Managed Kubernetes.
-
In the Clusters section, open the cluster page → the Cluster Composition tab.
-
Click Add node group.
-
Select the pool where all worker nodes in the group will be located. The worker nodes must be in a pool from the same availability zone as the master nodes. Once the node group is created, the pool cannot be changed.
-
Configure the worker nodes in the group:
5.1. Click Select configuration.
5.2. Select a pricing plan.
5.3. If you need a configuration with GPU, check the GPU only checkbox.
5.4. Select a ready-made dedicated server configuration.
5.5. Click Select.
Once the cluster is created, the node configuration cannot be changed.
-
Optional: change the default disk partitioning:
6.1. Click Edit.
6.2. To omit the
/storagepartition, clear the /storage checkbox.6.3. To change the size of the
/rootpartition, enter the desired number of gigabytes allocated for this partition in the /root row. The minimum size is 30 GB. The maximum size is 2 GB less than the disk size (1 GB for the/bootpartition and 1 GB for the/storagepartition).6.4. Click Save.
-
Configure the number of worker nodes:
7.1. Open the Fixed tab.
7.2. Specify the number of nodes. The minimum number of nodes is one. For fault-tolerant operation of system components, we recommend having at least two worker nodes in the cluster; the nodes can be in different groups.
-
Optional: in the Node group subnet CIDR field, enter the CIDR of the new private subnet to be used for the group's worker nodes.
The subnetwork must meet the conditions:
- the subnet must be private, belonging to the
10.0.0.0/8,172.16.0.0/12, or192.168.0.0/16range; - the subnet size must be
/24; - the subnet must not overlap with the
10.10.0.0/16,10.222.0.0/16,10.250.0.0/16,10.251.0.0/24, and172.250.0.0/14ranges. These ranges are used for internal addressing in Managed Kubernetes; - the subnet must not overlap with the subnet CIDR of another node group or the cloud network CIDR used for communication between master nodes and the service global router.
The subnet will be created in a separate VLAN. If you do not specify a CIDR, it will be assigned automatically when the cluster is created.
- the subnet must be private, belonging to the
-
Optional: add node group labels:
8.1. In the Labels field, click Add.
8.2. Enter the label key and value.
8.3. Click Add.
-
Optional: add node group taints:
9.1. In the Taints field, click Add.
9.2. Enter the taint key and value.
9.3. Select the effect:
- NoSchedule — new pods will not be scheduled, and existing pods will continue to run;
- PreferNoSchedule — new pods will be scheduled if there are no other available slots in the cluster;
- NoExecute — running pods without tolerations will be evicted.
9.4. Click Add.
-
Optional: add a script with custom parameters to configure the Managed Kubernetes cluster:
9.1. In the User data field, click Add.
9.2. Paste the script. The maximum size of a script with data that is not Base64-encoded is 47 KB. For script examples and supported formats, see the User data guide.
-
Click Add. You can view all created nodes in the control panel: in the top menu, click Products → Dedicated Servers.