Costs
The tutorial includes the following chargeable resources:- Compute shared filesystem
- Compute virtual machines that make up a node group
Prerequisites
-
Make sure you are in a group that has at least the
editorrole within your tenant; for example, the defaulteditorsgroup. You can check this in the Administration → IAM section of the web console. - Install and configure the Nebius AI Cloud CLI. The CLI commands in this article assume that the CLI is properly configured. For example, they omit the ID of the parent project, as it is assumed to be set in the CLI profile.
- Install kubectl and Helm.
-
Install
jq: -
Create a Managed Service for Kubernetes cluster or choose an existing one, and save its ID to the
NB_K8S_CLUSTER_IDenvironment variable:
Steps
Create a shared filesystem
This command creates an 256 GiB SSD shared filesystem:size-gibibytes), make sure it is enough for all your pods to store their data.
Create a node group and mount the filesystem to nodes
-
Create the cloud-init user data that will mount the shared filesystem to nodes:
This will mount the filesystem to nodes at
/mnt/dataascsi-storage. To use another mount point or mount tag, modify the variables.Do not omitnofail. If it is not specified and a node cannot find the filesystem on restart (for example, it has been deleted), the node will not boot. -
Create the partial specification of the node template (other template fields will be set as the Nebius AI Cloud CLI parameters):
-
Create the node group:
Install the CSI driver
-
Pull the driver’s Helm chart:
-
Install the chart:
Mount the filesystem to pods
Here is an example of aPersistentVolumeClaim that claims space on the shared filesystem, and a pod that mounts the filesystem at /data through the PersistentVolumeClaim:
How to delete the created resources
Some of the created resources are chargeable. If you do not need them, delete these resources, so Nebius AI Cloud does not charge for them:-
Delete the node group:
- Web console
- CLI
- In the sidebar, go to
Compute → Kubernetes.
- Open the page of the required cluster and then go to the Node groups tab.
- In the row of the required node group, click
→ Delete.
- Confirm the node group deletion.
-
Delete the Compute shared filesystem:
- Web console
- CLI
- In the sidebar, go to
Storage → Shared filesystems.
- Next to the filesystem’s name, click
→ Delete.
- Enter the filesystem’s name and confirm deletion.