Skip to main content

Managed Kubernetes: Quick Start

You can manage a Managed Kubernetes cluster in the control panel, via the Managed Kubernetes API, or Terraform.

  1. Create a cluster on a cloud server in the control panel.
  2. Connect to the cluster.
  3. Install Envoy Gateway.

1. Create a cluster on a cloud server in the control panel

  1. Configure a cluster on a cloud server.
  2. Configure a node group.
  3. Configure automation.

1. Configure a cluster on a cloud server

  1. In the control panel, on the top menu, click Products and select Managed Kubernetes.

  2. Click Create cluster.

  3. Enter a cluster name. The name will be used in cluster object names: node groups, nodes, load balancers, networks, and volumes. For example, if the cluster name is kelsie, the node group name will be kelsie-node-gdc8q, and the boot volume name will be kelsie-node-gdc8q-volume.

  4. Select a location where master nodes will be located. You cannot change the location after the cluster is created.

  5. Select a Kubernetes version. You can upgrade the Kubernetes version after creating the cluster.

  6. 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 daemonset setting is enabled – read more in the Envoy section of the Cilium documentation;
    • the hubble-relay setting is disabled – read more in 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-relay setting, the node must have at least 4 GB of RAM.

  7. Select a cluster type. You cannot change the cluster type after the cluster is created.

  8. 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 in a public network and is automatically assigned a public kube API IP address, which is accessible from the internet. You cannot change the kube API access type after the cluster is created.

  9. Click Continue.

2. Configure a node group

  1. In the Server type field, select Cloud server.

  2. Select a location where all worker nodes in the group will be located. You cannot change the location after the cluster is created.

  3. Configure the worker node group settings:

    3.1. Click Select configuration and choose a worker node group configuration:

    • custom — you can specify any resource ratio;
    • or fixed with GPU — prebuilt node configurations with GPUs and a specified resource ratio.

    If default configurations do not suit your needs, after the cluster is created, you can add a node group with a fixed cloud server configuration via the Managed Kubernetes API or Terraform.

    3.2. If you selected a custom configuration, specify the number of vCPUs, RAM, and select a boot volume. Specify the volume size.

    3.3. If you selected a fixed configuration with GPU, choose a prebuilt node configuration with GPUs, specify a boot volume, and specify the volume size. To install GPU drivers yourself, disable the GPU drivers switch. By default, the GPU drivers switch is enabled, and the cluster uses preinstalled drivers.

    3.4. Click Save.

  4. 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. 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 in a node group, open the 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 node groups with GPUs without drivers.

  5. Optional: to make a node group preemptible, check the Preemptible node group checkbox. Preemptible node groups are available in the regions of St. Petersburg, Moscow, and Novosibirsk.

  6. 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.

  7. 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 scheduled, and existing ones will continue to run;
    • PreferNoSchedule — new pods will be scheduled if there is no other capacity in the cluster;
    • NoExecute — running pods without corresponding tolerations will be evicted.

    7.5. Click Add.

  8. Optional: add a script with custom parameters to configure the Managed Kubernetes cluster:

    8.1. In the User data field, click Add.

    8.2. Paste the script. The maximum size of the script with data that is not Base64-encoded is 47 KB. You can find script examples and supported formats in the User data guide.

  9. 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.

  10. In the Cloud network block, configure a private subnet without internet access to group all cluster nodes.

    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 <cluster_name>-router router will be created automatically, where <cluster_name> is the cluster name. The CIDR is assigned automatically.

    A default security group will be assigned to the node ports. Do not change its rules or assign another security group. This will prevent cluster malfunctions.

    10.2. If a private subnet is already created, in the Subnet for nodes field, select an existing subnet. The subnet must meet the following conditions:

    • it belongs to the project network where you are creating the cluster. You can check the network's project in the control panel: on the top menu, click ProductsManaged KubernetesNetworkPrivate networks tab → network card. If the network belongs to a different project, the network card will show a Cross-project tag and the ID of the project where it was created;
    • it is connected to a cloud router;
    • it does not overlap with the ranges 10.10.0.0/16, 10.96.0.0/12, 10.250.0.0/16, and 10.251.0.0/24. 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 another security group. This will prevent cluster malfunctions. You can view the security groups on ports.
  11. Click Continue.

3. Configure automation

  1. Optional: to enable node auto-recovery, check the Node auto-recovery checkbox. If the cluster has only one worker node, auto-recovery is not available.

  2. Optional: to enable automatic patch version upgrades, check the Automatic patch version upgrades checkbox. If the cluster has only one master node (base cluster) or one worker node, automatic patch version upgrades for Kubernetes are not available.

  3. Select the maintenance window start time for the cluster — the time when automatic cluster maintenance tasks will begin.

  4. Optional: to enable audit logs, check the Audit logs checkbox. After creating the cluster, configure integration with the log storage and analysis system.

  5. Check the price of the cluster on a cloud server.

  6. Click Create. Cluster creation takes a few minutes; during this time, the cluster will be in the status CREATING. The cluster will be ready for use when it transitions to the ACTIVE status.

2. Connect to the cluster

To get started with the cluster, you need to configure kubectl.

For your information

We recommend performing all actions with cluster nodes, load balancers, and volumes only via kubectl.

After updating certificates for system components, you must reconnect to the cluster.

  1. Install the kubectl Kubernetes console client by following the official instructions.

  2. In the control panel, on the top menu, click Products and select Managed Kubernetes.

  3. Open the cluster page → Settings tab.

  4. If you are using a private kube API, check access to it. The IP address is listed in the Kube API field.

  5. Click Download kubeconfig. You cannot download the kubeconfig file if the cluster status is PENDING_CREATE, PENDING_ROTATE_CERTS, PENDING_DELETE, or ERROR.

  6. Export the path to the kubeconfig file to the KUBECONFIG environment variable:

    export KUBECONFIG=<path>

    Specify <path> — the path to the cluster_name.yaml kubeconfig file.

  7. Check that the setup is correct — connect to the cluster via kubectl:

    kubectl get nodes

    Nodes must be in the Ready status.

3. Install Envoy Gateway

A load balancer of the Basic with redundancy type and a public floating IP address will be created for the application to work. You cannot change the type of the created load balancer. If you want to change the load balancer type or its parameters, install the application using a Helm chart.

  1. Ensure that a quota for at least one public floating IP address is allocated in the pool.
  2. In the Control panel, on the top menu, click Products and select Managed Kubernetes.
  3. Open the cluster page → Applications tab.
  4. In the Available for installation block, click Envoy Gateway.
  5. Check the price of the load balancer and the public floating IP address.
  6. 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.