Create a Managed Kubernetes cluster on a cloud server
You can create no more than 10 high-availability clusters and 10 basic Managed Kubernetes clusters on cloud servers in one project and one pool.
Control panel
Terraform
1. Configure the cluster
-
In the Control panel, in the top menu, click Products and select Managed Kubernetes.
-
In the Clusters section, click Create cluster.
-
Enter the cluster name. The name will be displayed in the names of cluster objects: node groups, nodes, load balancers, networks, and disks. For example, if the cluster name is
kelsie, the node group name will bekelsie-node-gdc8q, and the boot disk name will bekelsie-node-gdc8q-volume. -
Select the location where the master nodes will be located. After creating the cluster, the location cannot be changed.
-
Select the Kubernetes version. After creating the cluster, you can upgrade the Kubernetes version.
-
Optional: select a network plugin (CNI). By default, Calico is used in the cluster. You cannot change the CNI after the cluster is created.
In the Cilium network plugin, by default:
- the
envoy daemonsetsetting is enabled — for more details on the setting, see the Envoy article in the Cilium documentation; - the
hubble-relaysetting is disabled — for more details on the setting, see the Hubble Relay subsection of the Hubble internals article in the Cilium documentation.
If you want to change these settings, create a cluster using the Managed Kubernetes API. Note that to use the
hubble-relaysetting, a node must have at least 4 GB of RAM. - the
-
Select the cluster type. After creating the cluster, the cluster type cannot be changed.
-
Optional: to make the cluster accessible via a private network and inaccessible from the internet, select the Private kube API checkbox. By default, the cluster is created in a public network and is automatically assigned a public kube API IP address accessible from the internet. After creating the cluster, the kube API access type cannot be changed.
-
Click Continue.
2. Configure a node group
-
In the Server type field, select Cloud server.
-
Select the location where all worker nodes in the group will be located. After creating the cluster, the location cannot be changed.
-
Configure the worker node settings in the group:
3.1. Select the worker node configuration in the group:
- Standard — any resource ratio can be specified;
- or GPU — pre-made node configurations with GPUs and a fixed resource ratio.
If these configurations do not fit your needs, after creating the cluster, you can add a node group with a fixed cloud server configuration via the Managed Kubernetes API or Terraform.
3.2. If you selected the Standard configuration, specify the number of vCPUs and RAM, and select a boot drive. Specify the disk size.
3.3. If you selected a GPU configuration, choose the GPU model and node configuration. To install GPU drivers manually, turn off the GPU drivers toggle. By default, the GPU drivers toggle is turned on and pre-installed drivers are used in the cluster. Select a boot volume and specify the volume size.
-
Configure the number of worker nodes. For fault-tolerant operation of system components and the Cilium CNI plugin, we recommend having at least two worker nodes in the cluster; the nodes can be in different groups:
4.1. To have a fixed number of nodes in the node group, open the Fixed tab and specify the number of nodes.
4.2. To use autoscaling with Cluster Autoscaler in a node group, open the Autoscaling tab and specify 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:
5.1. Select the node update method. After the cluster is created, the node update method cannot be changed.
5.2. In the Max node group size extension field, specify the maximum number of additional nodes to be temporarily created in the group during the Kubernetes version upgrade. Cannot be zero if the Max node group size reduction field is zero.
5.3. Make sure there are enough quotas to create additional nodes. If necessary, change the quotas.
5.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 node group size extension field is zero.
-
Optional: add node group labels:
6.1. In the Labels field, click Add.
6.2. Enter the label key.
6.3. Enter the label value.
-
Optional: add node group taints:
7.1. In the Taints field, click Add.
7.2. Enter the taint key.
7.3. Enter the taint value.
7.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 available places 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:
9.1. In the User data field, click Add.
9.2. Paste the script. The maximum size of a script with non-Base64-encoded data is 47 KB. You can find script examples and supported formats in the User data guide.
-
Optional: to add an additional worker node group to the cluster, click Add node group. You can create a cluster with worker node groups in different segments of the same pool. This will improve fault tolerance and help maintain application availability in case of an outage in one of the segments.
-
In the Cloud network block, configure a private subnet with no internet access in which all cluster nodes will be grouped.
11.1. To create a private subnet, in the Subnet for nodes field, select Create new private subnet.
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. The CIDR is assigned automatically.The default security group will be assigned to the node ports. Do not change its rules or assign a different security group. This will prevent cluster malfunctions.
11.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:
- it belongs to the network of the project where 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 → tab Private networks → 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 the ports. Do not change its rules or assign a different security group. This will prevent cluster malfunctions. You can view the security groups on the ports.
-
Click Continue.
3. Configure automation
-
Optional: to enable automatic node recovery, check the Automatic node recovery checkbox. If the cluster has only one worker node, auto-recovery is not available.
-
Optional: to enable automatic patch version updates, check the Automatic patch version updates checkbox. If the cluster has only one master node (basic cluster) or one worker node, automatic Kubernetes patch version updates are not available.
-
Select the cluster maintenance start time — the time when automatic cluster maintenance tasks will begin.
-
Optional: to enable audit logs, check the Audit logs checkbox. After creating the cluster, configure integration with the log storage and analysis system.
-
Check the price of the cluster on the cloud server.
-
Click Create. Creating a cluster takes a few minutes, during which the cluster will be in the status
CREATING. The cluster will be ready for use once it changes to theACTIVEstatus.