Skip to main content

Managed Kubernetes: Quick Start

Last update:

You can work with 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.

Learn more about infrastructure planning and application deployment in Managed Kubernetes in our blog article Cloud-native in Kubernetes.

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 included 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 — kelsie-node-gdc8q-volume.

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

  5. Select a Kubernetes version. After the cluster is created, you can upgrade the Kubernetes version.

  6. Optional: select a network plugin (CNI). Calico is used in the cluster by default. The CNI cannot be changed after the cluster is created.

    In the Cilium network plugin, the default settings are:

    • the envoy daemonset setting is enabled — read more about this in the Envoy section of the Cilium documentation;
    • the hubble-relay setting is disabled — read more about this 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 at least 4 GB of RAM is required on the node to use the hubble-relay setting.

  7. Select a cluster type. The cluster type cannot be changed after the cluster is created.

  8. 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 the public network and is automatically assigned a public kube API IP address accessible from the internet. The kube API access type cannot be changed after the cluster is created.

  9. Click Continue.

2. Configure the node group

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

  2. Select a location where all working nodes in the group will be located. The location cannot be changed after the cluster is created.

  3. Configure the working node configuration in the group:

    3.1. Click Select configuration and select the configuration for working nodes 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 standard configurations are not suitable, 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 the boot disk. Specify the disk size.

    3.3. If you selected a fixed configuration with GPU, select a prebuilt node configuration with GPUs, the boot disk, and specify the disk size. To install GPU drivers yourself, turn off the GPU drivers toggle. By default, the GPU drivers toggle is turned on, and preinstalled drivers are used in the cluster.

    3.4. Click Save.

  4. Configure the number of working nodes. For fault-tolerant operation of system components and the Cilium network plugin, we recommend having at least two working 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 in a 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. For GPU node groups without drivers, autoscaling is not available.

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

  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 an effect:

    • NoSchedule — new pods will not be added, and existing pods will continue to run;
    • PreferNoSchedule — new pods will be added if there is no other available space in the cluster;
    • NoExecute — running pods without tolerations will be evicted.

    7.5. Click Add.

  8. 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 size of the script with data that is not Base64 encoded is 47 KB. Examples of scripts and supported formats can be found in the User data instructions.

  9. Optional: to add an additional node group in the cluster, click Add node group. You can create a cluster with working node groups in different segments of the same pool. This will increase fault tolerance and help preserve application availability if an accident occurs in one of the segments.

  10. In the Cloud network block, configure a private subnet with no internet access in which all cluster nodes will be combined.

    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>-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 node ports. Do not change the rules in it and do not assign another security group. This will help avoid cluster malfunctions.

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

    • It belongs to the project network 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 ProductsManaged KubernetesNetworkPrivate networks tab → network card. If the network belongs to another 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, and 10.251.0.0/24 ranges. 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 the rules in it and do not assign another security group. This will help avoid cluster malfunctions. You can view security groups on ports.
  11. Click Continue.

3. Configure automation

  1. Optional: to enable node auto-repair, select the Node auto-repair checkbox. If the cluster has only one working node, auto-repair is unavailable.

  2. Optional: to enable patch version auto-update, select the Patch version auto-update checkbox. If the cluster has only one master node (base cluster) or one working node, Kubernetes patch version auto-update is unavailable.

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

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

  5. Check the cluster price on the cloud server.

  6. Click Create. Creating a cluster takes a few minutes; during this time, the cluster will be in the status CREATING. The cluster will be ready for operation when it changes to the ACTIVE status.

2. Connect to the cluster

To start working 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 the certificates for system components, you must reconnect to the cluster.

  1. Install the Kubernetes console client kubectl according to the official instructions.

  2. In the Control panel, in 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 specified in the Kube API field.

  5. Click Download kubeconfig. Downloading the kubeconfig file is unavailable 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 kubeconfig file cluster_name.yaml.

  7. Check that the configuration is correct — access 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.