Creating a Kubernetes cluster
Create a Kubernetes cluster and then create a node group.
Before you begin
To create a Kubernetes cluster:
-
Log in to the management console
. If you aren't registered, go to the management console and follow the instructions. -
Install kubectl
and configure it to work with the created cluster. -
Make sure you have enough resources available in the cloud.
-
Review the recommendations for using Managed Service for Kubernetes.
Create a Kubernetes cluster
-
In the management console
, select the folder where you want to create a clusterKubernetes. -
Select Managed Service for Kubernetes.
-
Click Create cluster.
-
Enter a name and description for the Kubernetes cluster. The cluster name must be unique within Nebius AI.
-
Under Master configuration:
-
In the Kubernetes version field, select the Kubernetes version to be installed on the master and nodes.
-
In the Public IP field, choose a method for assigning an IP address:
- Auto: Assign a random IP address from the Nebius AI IP pool.
- No address: Don't assign a public IP address.
-
In the Master type field, select the type of master:
- Single: A master created in one subnet.
- Highly available: A master distributed between three subnets in one availability zone.
-
Select security groups to control the cluster's network traffic.
-
-
Under Maintenance window settings:
- In the Maintenance frequency field, configure the maintenance window:
- Anytime: Maintenance is allowed at any time.
- Daily: Maintenance is performed in the time interval specified in the Time (UTC) and duration field.
- On selected days: Maintenance is performed in the time interval specified in the Weekly schedule field.
- In the Maintenance frequency field, configure the maintenance window:
-
Under Cluster network settings:
- Specify the cluster CIDR, which is a range of IP addresses for allocating pod addresses.
- Specify the service CIDR, which is a range of IP addresses for allocating service addresses.
-
Click Create cluster.
-
If you don't have the Nebius AI command line interface yet, install and initialize it.
-
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Specify the cluster parameters in the create command (only some of the supported parameters are given in the example):
ncp managed-kubernetes cluster create \ --name test-k8s \ --network-name default \ --etcd-cluster-size 1 \ --master-location zone=eu-north1-c,subnet-id=subnet-id-c,subnet-name=default-c \ --public-ip \ --version 1.26 \ --cluster-ipv4-range 10.1.0.0/16 \ --service-ipv4-range 10.2.0.0/16 \ --security-group-ids enpe5sdn7vs5mu6udl7i,enpj6c5ifh755o6evmu4 \ --daily-maintenance-window start=22:00,duration=10h
Where:
-
--name
: The Kubernetes cluster name. -
--network-name
: The name of the network. -
--etcd-cluster-size
: The cluster creation scheme, possible values:1
for single master or3
for highly available master. -
--master-location
: The master node zone and subnet location. Number of themaster-location
flags should correspond to theetcd-cluster-size
value.zone
: Availability zone.subnet-id
: Subnet ID.subnet-name
: Name of the subnet.
-
--public-ip
: Flag indicating that the Kubernetes cluster needs a public IP address. -
--version
: The Kubernetes version. -
--cluster-ipv4-range
: The range of IP addresses for allocating pod addresses. -
--service-ipv4-range
: The range of IP addresses for allocating service addresses. -
--security-group-ids
: List of cluster security group IDs. -
--daily-maintenance-window
: Maintenance window settings.
Command result:
done (5m47s) id: f2mhn0s6qo********** folder_id: b1g66jflru0ek1omtsu0 ...
-