[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for Kubernetes](../../index.md) > [Concepts](../index.md) > Node group > Reserved instance pools for node groups

# Reserved instance pools for Yandex Managed Service for Kubernetes node groups

{% note warning %}

Reserved instance pools are billable: you pay for the whole unused volume of reserved computing resources of VMs, GPU clusters, and software accelerated networks according to the [Yandex Compute Cloud pricing policy](../../../compute/pricing.md). For more information, see [Using reserved instance pools](../../../compute/pricing.md#pool).

{% endnote %}

_The reserved instance pool feature is at the [Preview stage](../../../overview/concepts/launch-stages.md)._

A _reserved instance pool_ is the total of computing resources reserved by the user in a given [availability zone](../../../overview/concepts/geo-scope.md) to secure their guaranteed availability to the user for the purpose of creating [VMs](../../../compute/concepts/vm.md) of a particular [configuration](../../../compute/concepts/performance-levels.md#available-configurations) in this availability zone.

For more information, see [Reserved instance pools in Compute Cloud](../../../compute/concepts/reserved-pools.md).

In Managed Service for Kubernetes, you can use reserved instance pools for fixed-size [node groups](../index.md#node-group). This ensures resource availability for cluster nodes.

In Managed Service for Kubernetes, you can use reserved instance pools via the [CLI](../../cli-ref/node-group/create.md), [Terraform](../../../terraform/resources/kubernetes_node_group.md), and [API](../../managed-kubernetes/api-ref/NodeGroup/create.md).

{% note tip %}

Reserved instance pools are created in a specific availability zone. To automate the distribution of multi-zone group nodes across reserved instance pools of a specific availability zone, use the [node template variables](variables-in-the-template.md). 

{% endnote %}

## Limits {#restrictions}

Reserved instance pools _are not supported_ for node groups with the following properties:
* [Autoscaling](cluster-autoscaler.md)
* [vCPU performance levels below 100%](../../../compute/concepts/performance-levels.md)
* [Preemptible VMs](../../../compute/concepts/preemptible-vm.md)
* [VM placement groups](../../../compute/concepts/placement-groups.md)

{% note info %}

Make sure the following properties are identical in the node group and reserved instance pool configurations:
* [Platform](../../../compute/concepts/vm-platforms.md)
* Number of vCPUs
* Amount of RAM
* [Availability zone](../../../overview/concepts/geo-scope.md)

The number of group nodes in each availability zone must not exceed the size of the reserved instance pools in those zones.

{% endnote %}

## Examples {#examples}

In this example, we will create a node group in one availability zone with two nodes from that zone's reserved instance pool.

{% list tabs group=instructions %}

- CLI {#cli}

  ```bash
  yc managed-kubernetes node-group create \
    --name k8s-reserved-ng \
    --cluster-id <cluster_ID> \
    --platform-id standard-v4a \
    --cores 4 \
    --memory 8 \
    --disk-size 64 \
    --disk-type network-ssd \
    --fixed-size 2 \
    --location zone=ru-central1-a,subnet-id=<subnet_ID> \
    --network-interface security-group-ids=[<security_group_IDs>] \
    --reserved-instance-pool-id <reserved_instance_pool_ID>
  ```
  
  Where:
  * `--cluster-id`: [Cluster ID](../../operations/kubernetes-cluster/kubernetes-cluster-list.md).
  * `--location`: Availability zone and subnet [ID](../../../vpc/operations/subnet-get-info.md).
  * `--network-interface security-group-ids`: Security group [IDs](../../../vpc/operations/security-group-get-info.md).
  * `--reserved-instance-pool-id`: Reserved instance pool [ID](../../../compute/cli-ref/reserved-instance-pool/list.md).

- Terraform {#tf}

  ```hcl
  resource "yandex_kubernetes_node_group" "k8s-reserved-ng" {
    cluster_id = "<cluster_ID>"
    name       = "k8s-reserved-ng"
  
    instance_template {
      platform_id = "standard-v4a"
      reserved_instance_pool_id = "<reserved_instance_pool_ID>"
  
      resources {
        cores  = 4
        memory = 8
      }
  
      boot_disk {
        size = 64
        type = "network-ssd"
      }
  
      network_interface {
        subnet_ids = ["<subnet_ID>"]
        security_group_ids = ["<security_group_IDs>"]
        nat        = true
      }
    }
  
    scale_policy {
      fixed_scale {
        size = 2
      }
    }
  
    allocation_policy {
      location {
        zone = "ru-central1-a"
      }
    }
  }
  ```
  
  Where:
  * `cluster_id`: [Cluster ID](../../operations/kubernetes-cluster/kubernetes-cluster-list.md).
  * `subnet_ids`: [Subnet](../../../vpc/operations/subnet-get-info.md) ID.
  * `security_group_ids`: Security group [IDs](../../../vpc/operations/security-group-get-info.md).
  * `reserved_instance_pool_id`: Reserved instance pool [ID](../../../compute/cli-ref/reserved-instance-pool/list.md).

{% endlist %}

Examples for a multi-zone group with nodes from a reserved instance pool using variables are provided on the [Node template variables](variables-in-the-template.md#examples) page.

### Useful links {#see-also}

* [Reserved instance pools in Compute Cloud](../../../compute/concepts/reserved-pools.md)
* [Working with reserved instance pools](../../../compute/operations/index.md#reserved-pools)
* [Variables in a Yandex Managed Service for Kubernetes node template](variables-in-the-template.md)
* [Creating a group with nodes from a Yandex Compute Cloud reserved instance pool](../../operations/node-group/node-group-create-in-instance-pool.md)