> ## 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 use a non-default subnet for Managed Service for Kubernetes® clusters and node groups

By default, when you create a Managed Service for Kubernetes cluster, its control plane uses the [default subnet of the default network](../../vpc/overview#default-virtual-networks-resources) 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](../../vpc/networking/isolation), [allocate custom private IP addresses](../../vpc/addressing/custom-private-addresses) to nodes or [disable public IP addresses](../../vpc/addressing/disable-public-addresses) for them.

<Note>
  To ensure connectivity, the control plane subnet and the node group subnet must belong to the same [network](../../vpc/overview#network). Their [CIDR blocks](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing), however, can be different.
</Note>

## A non-default network for clusters

To use a custom subnet for a cluster, [get its ID](../../vpc/networking/resources) and pass it to the `--control-plane-subnet-id` parameter when [creating the cluster](../clusters/manage#how-to-create-clusters):

```bash theme={null}
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](../../vpc/networking/resources) and pass it in one of the following ways:

* Add the subnet ID to the [node group creation command](../node-groups/manage#how-to-create-node-groups) by using the `--template-network-interfaces` CLI parameter:

  ```bash theme={null}
  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](../node-groups/manage#node-group-cli-parameters).

For more details, see [How to create node groups](../node-groups/manage#how-to-create-node-groups) and [Node group CLI parameters](../node-groups/manage#node-group-cli-parameters).
