Skip to main content
By default, when you create a Managed Service for Kubernetes cluster, its control plane uses the default subnet of the default network in your project. Node groups inherit the control plane’s subnet. You might want to use custom subnets that you created, for example, to ensure resource isolation, allocate custom private IP addresses to nodes or disable public IP addresses for them.
To ensure connectivity, the control plane subnet and the node group subnet must belong to the same network. Their CIDR blocks, however, can be different.

A non-default network for clusters

To use a custom subnet for a cluster, get its ID and pass it to the --control-plane-subnet-id parameter when creating the cluster:
nebius mk8s cluster create \
  ... \
  --control-plane-subnet-id <subnet_ID>

A non-default network for node groups

To use a custom subnet for a node group, get its ID and pass it in one of the following ways:
  • Add the subnet ID to the node group creation command by using the --template-network-interfaces CLI parameter:
    nebius mk8s node-group create \
      ... \
      --template-network-interfaces '[{"public_ip_address": {}, "subnet_id": "<subnet_ID>"}]'
    
  • Pass the subnet ID to the spec.template.network_interfaces.subnet_id field of the node group configuration.
For more details, see How to create node groups and Node group CLI parameters.