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, on the top menu, click Products and select Managed Kubernetes.
-
Click Create cluster.
-
Enter a cluster name. The name will be included 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. You cannot change the location after the cluster is created.
-
Select the Kubernetes version. After the cluster is created, you can update 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:
- envoy daemonset setting is enabled
envoy daemonset– learn more about this setting in the Envoy section of the Cilium documentation; - hubble-relay setting is disabled
hubble-relay– learn more about this setting in the Hubble Relay section of the Hubble internals article in the Cilium documentation.
If you want to change these settings, create a cluster using the Managed Kubernetes API. Keep in mind that using the
hubble-relaysetting requires at least 4 GB of RAM on the node. - envoy daemonset setting is enabled
-
Select the cluster type. You cannot change the cluster type after the cluster is created.
-
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. You cannot change the kube API access type after the cluster is created.
-
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. You cannot change the location after the cluster is created.
-
Configure the worker node settings in the group:
3.1. Click Select configuration and select a worker node configuration in the group:
- custom — any resource ratio can be specified;
- or fixed with GPU — prebuilt node configurations with GPUs and a specified resource ratio.
If the standard configurations do not fit your needs, you can add a node group with a fixed cloud server configuration via the Managed Kubernetes API or Terraform after the cluster is created.
3.2. If you have selected a custom configuration, specify the number of vCPUs, RAM, and select a boot disk. Specify the disk size.
3.3. If you have selected a fixed configuration with GPU, select a prebuilt node configuration with graphics processors, a boot disk, and specify the disk size. To install GPU drivers yourself, disable the GPU drivers toggle. By default, the GPU drivers toggle is enabled, and the cluster uses preinstalled drivers.
3.4. Click Save.
-
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; nodes can be located in different groups:
4.1. To have a fixed number of nodes in a node group, open the Fixed tab and specify the number of nodes.
4.2. To use autoscaling with Cluster Autoscaler, open the With autoscaling tab and set the minimum and maximum number of nodes in the group — the number of nodes will only change within this range. Autoscaling is not available for GPU node groups without drivers.
-
Optional: to make a node group preemptible, select the Preemptible node group checkbox. Preemptible node groups are available in the regions of St. Petersburg, Moscow, and Novosibirsk.
-
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.
6.4. Click Add.
-
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 an 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 spaces available in the cluster;
- NoExecute — running pods without tolerations will be evicted.
7.5. Click Add.
-
Optional: add a script with custom parameters for configuring the Managed Kubernetes cluster:
8.1. In the User data field, click Add.
8.2. Insert the script. The maximum size of the script with non-Base64-encoded data is 47 KB. Examples of scripts and supported formats can be viewed 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 a failure in one of the segments.
-
In the Cloud network block, configure a private subnet with no internet access where all cluster nodes will be grouped.
10.1. To create a private subnet, in the Subnet for nodes field, select 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 node ports. Do not change the rules in it and do not assign a different security group. This will prevent cluster malfunctions.
10.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 project in which you are creating the cluster. You can check which project a network belongs to in the Control panel: on the top menu, click Products → Managed Kubernetes → Network → tab Private networks → network card. If the network belongs to a different project, the network card will have a Cross-project tag and information about the ID of the project in which it was created;
- it is connected to a cloud router;
- it 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 internal Managed Kubernetes addressing; - DHCP is disabled;
- only the default security group is assigned to the ports. Do not change the rules in it and do not assign a different security group. This will prevent cluster malfunctions. You can view security groups on ports.
-
Click Continue.
3. Configure automation
-
Optional: to enable automatic node recovery, select the Automatic node recovery checkbox. If the cluster has only one worker node, automatic recovery is not available.
-
Optional: to enable automatic patch version updates, select the Automatic patch version update 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 actions will begin.
-
Optional: to enable audit logs, select the Audit logs checkbox. After the cluster is created, configure integration with a log storage and analysis system.
-
Check the cluster price on the cloud server.
-
Click Create. Creating a cluster takes several minutes; during this time, the cluster will be in the status
CREATING. The cluster will be ready to work when it switches to the statusACTIVE.