> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to get started with Managed Service for Kubernetes®: Create your first cluster for Kubernetes

With [Kubernetes](https://kubernetes.io/), you can efficiently manage and scale your containerized ML/AI applications and ensure they are portable and fault-tolerant. To get started, create a Managed Service for Kubernetes cluster and its child node group in the `eu-north1` region. Then, connect to the cluster.

## Prerequisites

<Tabs group="interfaces">
  <Tab title="Web console">
    1. [Install and configure](/cli/install) the Nebius AI Cloud CLI.

       You will use the CLI to get the cluster credentials for connecting with kubectl.

    2. Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl), the Kubernetes command-line interface:

           <CodeGroup>
             ```bash Ubuntu theme={null}
             curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
             sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
             ```

             ```bash macOS theme={null}
             curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"
             chmod +x ./kubectl
             sudo mv ./kubectl /usr/local/bin/kubectl
             sudo chown root: /usr/local/bin/kubectl
             ```
           </CodeGroup>
  </Tab>

  <Tab title="CLI">
    1. [Install and configure](/cli/install) the Nebius AI Cloud CLI.

    2. Install [jq](https://jqlang.github.io/jq/) to extract IDs from JSON data returned by the Nebius AI Cloud CLI:

           <CodeGroup>
             ```bash Ubuntu theme={null}
             sudo apt-get install jq
             ```

             ```bash macOS theme={null}
             brew install jq
             ```
           </CodeGroup>

    3. Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl), the Kubernetes command-line interface:

           <CodeGroup>
             ```bash Ubuntu theme={null}
             curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
             sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
             ```

             ```bash macOS theme={null}
             curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl"
             chmod +x ./kubectl
             sudo mv ./kubectl /usr/local/bin/kubectl
             sudo chown root: /usr/local/bin/kubectl
             ```
           </CodeGroup>
  </Tab>
</Tabs>

## Steps

### Create a cluster and a node group

<Tabs group="interfaces">
  <Tab title="Web console">
    1. In the sidebar, go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/rOlLZ_MFvrheaI-h/_assets/sidebar/compute.svg?fit=max&auto=format&n=rOlLZ_MFvrheaI-h&q=85&s=8d3eda9b92f5a626a81d01268852f482" width="16" height="16" data-path="_assets/sidebar/compute.svg" /> **Compute** → **Kubernetes**.

    2. Click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/plus.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=7c9efc69d65fc58db0eb73702fd81aa1" width="16" height="16" data-path="_assets/plus.svg" /> **Create cluster**.

       The creation flow is a step-by-step wizard. The sidebar shows your progress through the configuration sections. To move between sections, click **Back** and **Next**.

    3. On the **Cluster** step, enter the cluster name and review the settings:

       * Select the network and subnet.
       * Keep the recommended Kubernetes version 1.34. For supported versions, see [Kubernetes® versions in Managed Service for Kubernetes](/kubernetes/versions).
       * Keep the public endpoint enabled. As a result, the cluster is available from the internet, and you can connect to it from any machine.

    4. On the **Node groups** step, add a node group to the cluster:

       1. Click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/plus.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=7c9efc69d65fc58db0eb73702fd81aa1" width="16" height="16" data-path="_assets/plus.svg" /> **Add node group**.
       2. On the **General** step, enter the node group name. Under **Size**, set the **Number of nodes** to 2. Keep the rest of the settings unchanged.
       3. On the **Compute resources** step, select **Without GPU**. Select the **Non-GPU Intel Ice Lake** [platform](/compute/virtual-machines/types) and the preset with 2 CPUs and 8 <Tooltip tip={<>Nebius uses binary units. For example, a <i>gibibyte</i> (GiB) is 2<sup>30</sup> (1024<sup>3</sup>) bytes.</>}>GiB</Tooltip> of RAM. Then, select an operating system for the nodes, for example, Ubuntu 24.04 LTS.
       4. On the **Storage** step, under **Node storage**, select the **SSD** disk type and set the size to 128 GiB.
       5. On the **Additional** step, keep the default settings.
       6. Click **Add node group**.

    5. Go to the **Review** step, check the cluster configuration and click **Create**.

    6. After the cluster is created, copy the cluster ID from its page and save the ID to an environment variable. You will need it to connect to the cluster:

       ```bash theme={null}
       export CLUSTER_ID=<cluster_ID>
       ```
  </Tab>

  <Tab title="CLI">
    1. Your cluster's control plane and nodes use private IP addresses from the default subnet. Get its ID:

       ```bash theme={null}
       export SUBNET_ID=$(nebius vpc subnet list \
         --format json \
         | jq -r '.items[0].metadata.id')
       ```

    2. Create a cluster with a public endpoint allocated to its control plane, and get the cluster ID:

       ```bash theme={null}
       export CLUSTER_ID=$(nebius mk8s cluster create \
         --name quickstart-mk8s-cluster \
         --control-plane-subnet-id $SUBNET_ID \
         --control-plane-endpoints-public-endpoint=true \
         --format json | jq -r '.metadata.id')
       ```

       The cluster's control plane runs Kubernetes version 1.34, which is the default [version](/kubernetes/versions) for Managed Kubernetes clusters.

    3. Create a node group and add it to the cluster:

       ```bash theme={null}
       nebius mk8s node-group create \
         --name quickstart-mk8s-nodes \
         --parent-id $CLUSTER_ID \
         --fixed-node-count 2 \
         --template-resources-platform "cpu-e2" \
         --template-resources-preset "2vcpu-8gb" \
         --template-boot-disk-type network_ssd \
         --template-boot-disk-size-bytes 137438953472 \
         --template-network-interfaces "[{\"subnet_id\": \"$SUBNET_ID\"}]"
       ```

       The command creates a group of 2 nodes. Each node is a non-GPU (`--template-resources-platform "cpu-e2"`) virtual machine that has 2 vCPUs, 8 <Tooltip tip={<>Nebius uses binary units. For example, a <i>gibibyte</i> (GiB) is 2<sup>30</sup> (1024<sup>3</sup>) bytes.</>}>GiB</Tooltip> of RAM, and a 128 GiB Network SSD boot disk.
  </Tab>
</Tabs>

### Connect to the cluster

1. Create a kubeconfig file containing the cluster details for kubectl:

   ```bash theme={null}
   nebius mk8s cluster get-credentials \
     --id $CLUSTER_ID --external
   ```

2. Check that the cluster is accessible. For example:

   * Get addresses of the control plane and cluster services:

     ```bash theme={null}
     kubectl cluster-info
     ```

   * Get the list of Pods:

     ```bash theme={null}
     kubectl get pods -A
     ```

## What's next

* [How to create and modify Managed Service for Kubernetes® clusters](/kubernetes/clusters/manage)
* [Creating and modifying Managed Service for Kubernetes® node groups](/kubernetes/node-groups/manage)
