Managed Kubernetes: Quick Start
You can work with a Managed Kubernetes cluster in the control panel, via the Managed Kubernetes API, or with Terraform.
- Create a cluster on a cloud server in the control panel.
- Connect to the cluster.
- Install Envoy Gateway.
1. Create a cluster on a cloud server in the control panel
1. Configure a cluster on a cloud server
-
In the control panel, in the top menu, click Products and select Managed Kubernetes.
-
In the Clusters section, click Create cluster.
-
Enter a 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 reside. After the cluster is created, the location cannot be changed.
-
Select the Kubernetes version. After the cluster is created, you can upgrade the Kubernetes version.
-
Optional: select a network plugin (CNI). Calico is used in the cluster by default. You cannot change the CNI after the cluster is created.
In the Cilium network plugin, the following are enabled by default:
- the
envoy daemonsetsetting is enabled — for details, see the Envoy article in the Cilium documentation; - the
hubble-relaysetting is disabled — for details, see 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. Note that to use the
hubble-relaysetting, a node must have at least 4 GB of RAM. - the
-
Select the cluster type. After the cluster is created, the cluster type cannot be changed.
-
Optional: to make the cluster accessible via a private network and inaccessible from the internet, check the Private kube API checkbox. By default, the cluster is created on a public network and is automatically assigned a public kube API IP address accessible from the internet. After the cluster is created, 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 the cluster is created, the location cannot be changed.
-
Configure the worker node group settings:
3.1. Select the worker node configuration 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 fit, 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, RAM, and select the boot disk. Specify the disk size.
3.3. If you selected the GPU configuration, select the GPU model and node configuration. To install GPU drivers manually, toggle off GPU Drivers. By default, the GPU Drivers toggle is turned on and preinstalled drivers are used in the cluster. Select the boot disk and specify the disk size.
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, which can be in different groups:
4.1. For the node group to have a fixed number of nodes, open the Fixed tab and specify the number of nodes.
4.2. To use autoscaling with Cluster Autoscaler in the node group, 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: add node group labels:
5.1. In the Labels field, click Add.
5.2. Enter the label key.
5.3. Enter the label value.
-
Optional: add node group taints:
6.1. In the Taints field, click Add.
6.2. Enter the taint key.
6.3. Enter the taint value.
6.4. Select the effect:
- NoSchedule — new pods will not be scheduled, and existing pods will continue running;
- PreferNoSchedule — new pods will be scheduled if there are no other available spots 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 Saint Petersburg, Moscow, and Novosibirsk.
-
Optional: add a script with custom parameters for configuring the Managed Kubernetes cluster:
8.1. In the User data field, click Add.
8.2. Paste the script. The maximum script size for data not encoded in Base64 is 47 KB. Script examples and supported formats can be found in the User data instructions.
-
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 increase fault tolerance and help maintain application availability if a failure occurs in one of the segments.
-
In the Cloud network block, configure a private subnet without internet access where all cluster nodes will be grouped.
10.1. To create a private subnet, in the Node subnet field, select Create new private subnet.
The private network
<cluster_name>-network, private subnet, and 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 rules in it and do not assign another security group. This will prevent cluster failures.
10.2. If a private subnet is already created, in the Node subnet field, select an existing subnet. The subnet must meet the following conditions:
- 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 → the Private networks tab → network card. If the network belongs to another project, the network card will show 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 ranges
10.10.0.0/16,10.96.0.0/12,10.250.0.0/16, and10.251.0.0/24. These ranges are used in Managed Kubernetes internal addressing; - DHCP is disabled;
- only the default security group is assigned to ports. Do not change rules in it and do not assign another security group. This will prevent cluster failures. You can view security groups on ports.
-
Click Continue.
3. Configure automation
-
Optional: to enable node auto-recovery, select the Node auto-recovery checkbox. If the cluster has only one worker node, auto-recovery is not available.
-
Optional: to enable patch version auto-upgrade, select the Patch version auto-upgrade checkbox. If the cluster has only one master node (basic cluster) or one worker node, Kubernetes patch version auto-upgrade is not available.
-
Select the cluster maintenance start time — the time when automatic cluster maintenance tasks will begin.
-
Optional: to enable audit logs, select the Audit logs checkbox. After creating the cluster, configure integration with a log storage and analysis system.
-
Check the cluster price on the cloud server.
-
Click Create. Creating the cluster takes several minutes, during which the cluster will be in the status
CREATING. The cluster will be ready for operation once its status changes toACTIVE.
2. Connect to the cluster
To start working with the cluster, configure kubectl.
We recommend performing all actions with cluster nodes, load balancers, and disks only via kubectl.
After updating certificates for system components, you must reconnect to the cluster.
Linux
Windows
-
Install the Kubernetes kubectl command-line client following the official instructions.
-
In the Control panel, in the top menu, click Products and select Managed Kubernetes.
-
In the Clusters section, open the cluster page → Settings tab.
-
If you are using a private kube API, check access to it. The IP address is specified in the Kube API field.
-
Click Download kubeconfig. Downloading the kubeconfig file is unavailable if the cluster has the status
PENDING_CREATE,PENDING_ROTATE_CERTS,PENDING_DELETE, orERROR. -
Export the path to the kubeconfig file to the
KUBECONFIGenvironment variable:export KUBECONFIG=<path>Specify
<path>— the path to thecluster_name.yamlkubeconfig file. -
Verify that the setup is correct by accessing the cluster via kubectl:
kubectl get nodesNodes must be in the
Readystatus.
3. Install Envoy Gateway
Control panel
Helm
For the application to work, a load balancer of the type Basic with redundancy and a public floating IP address will be created. You cannot change the type of the created load balancer. If you want to change the load balancer type or its settings, install the application using a Helm chart.
- Make sure that a quota for at least one public floating IP address is allocated in the pool.
- In the control panel, in the top menu, click Products and select Managed Kubernetes.
- In the Clusters section, open the cluster page → tab Applications.
- In the Available for installation section, click Envoy Gateway.
- Check the price of the load balancer and the public floating IP address.
- Click Install. A new Basic with redundancy load balancer with a public floating IP address will be created. The load balancer will appear in the control panel: in the top menu, click Products and select Cloud Servers → section Load Balancers → tab Load Balancers.