[Yandex Cloud documentation](../../index.md) > [Yandex Compute Cloud](../index.md) > [Getting started](index.md) > Creating an instance group

# Creating an instance group

Create an instance group using [Instance Groups](../concepts/instance-groups/index.md) in the Yandex Cloud management console.

## Getting started {#before-you-begin}

1. Log in to the [management console](https://console.yandex.cloud) or sign up. If you have not signed up yet, navigate to the management console and follow the instructions.
1. On the [**Yandex Cloud Billing**](https://center.yandex.cloud/billing/accounts) page, make sure you have a [billing account](../../billing/concepts/billing-account.md) linked and its status is `ACTIVE` or `TRIAL_ACTIVE`. If you do not have a billing account yet, [create one](../../billing/quickstart/index.md#create_billing_account).
1. If you do not have a [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) yet, [create one](../../resource-manager/operations/folder/create.md).

## Creating an instance group {#create-ig}

You can create an autoscaling instance group or group with a fixed number of VM instances. For more information, see [Scaling types](../concepts/instance-groups/scale.md).

{% note alert %}

When creating instance groups, keep the [limits](../concepts/limits.md) in mind. Not to disrupt the component Instance Groups, do not update or delete manually created resources: [target group](../../network-load-balancer/concepts/target-resources.md) Network Load Balancer, VMs, and disks. Instead of this, change or delete the entire group.

{% endnote %}

To create an instance group:
1. In the [management console](https://console.yandex.cloud), select the folder you want to create your instance group in.
1. Navigate to **Compute Cloud**.
1. In the left-hand panel, select ![image](../../_assets/console-icons/layers-3-diagonal.svg) **Instance groups**.
1. Click **Create group of virtual machines**.
1. Under **Basic parameters**:
    * Enter a name and description for your instance group. Follow these naming requirements:

      * Length: between 3 and 63 characters.
      * It can only contain lowercase Latin letters, numbers, and hyphens.
      * It must start with a letter and cannot end with a hyphen.

      {% note info %}
      
      The VM name is used to generate an [internal FQDN](../concepts/network.md#hostname), which is set only once, when you create the VM. If the internal FQDN is important to you, make sure to choose an appropriate name for your VM.
      
      {% endnote %}

    * Select the [service account](../../iam/concepts/users/service-accounts.md) from the list or create a new one. To be able to create, update, and delete VM instances in the instance group, assign the `editor` [role](../../iam/concepts/access-control/roles.md) to the service account. By default, all operations in Instance Groups are performed on behalf of a service account.

      You cannot delete a service account while it is linked to an instance group.

1. Under **Allocation**, select the [availability zones](../../overview/concepts/geo-scope.md). Instances of a group may reside in different availability zones.
1. Under **Instance template**, click **Define** to configure a basic instance:
   * Under **General information**, enter a description for the basic instance.
   * Under **Boot disk image**, select the public image.
   * Under **Disks and file storages**:
     * Select the [disk type](../concepts/disk.md#disks_types).
     * Specify the disk size.
     * Optionally, click **Add disk** to add more disks.
   * Under **Computing resources**:
     * Select a [platform](../concepts/vm-platforms.md).
     * Specify the [guaranteed performance](../concepts/performance-levels.md) and required number of vCPUs, as well as RAM size.
     * Optionally, make the VM instance [preemptible](../concepts/preemptible-vm.md) by checking the relevant box.
   * Under **Network settings**:
     * Select a [cloud network](../concepts/vm.md#network) and [subnet](../concepts/network.md#subnet). If your network has no subnets, create one:
       * Click **Create subnet**.
       * Enter a name and a description for the new subnet. Specify availability zone and CIDR.
       * Click **Create subnet**.
     * In the **Public address** field, select the IP address assignment method:
       * `Auto`: To assign a random IP address from the Yandex Cloud IP address pool.
       * `No address`: Do not assign a public IP address.
     * Optionally, select a [security group](../../vpc/concepts/security-groups.md). If there is no security group, create one:
       * Click ![image](../../_assets/console-icons/plus.svg) **Add security group**.
       * Enter a name and description for the security group. You can add rules for the security group later in **Virtual Private Cloud**.
       * Click **Create**.
   * Under **Access**:
     * Select the [service account](../../iam/concepts/users/service-accounts.md) from the list or create a new one.
     * If you selected a Linux-based public image:
       * In the **Login** field, enter the username.
       * In the **SSH key** field, paste the contents of the public key file. You need to [create](../operations/vm-connect/ssh.md#creating-ssh-keys) a key pair for the SSH connection on your own.
     * If you selected a Windows-based public image:
       * In the **Password** field, set a password for the `Administrator` user. A user named `Administrator` is created automatically.
     * Click **Add**.
     * Enable [serial console](../concepts/serial-console.md) access, if required.
   * Click **Save**.
1. Under **Changes during creation and updates**, specify:
   * **Add above target value**: Maximum number of instances the group size can be scaled up by.

       When bringing the number of VMs in the group to the target value, VMs created in excess of the target under the `max_expansion` quota can remain in the group, while those that existed in the group before may be deleted.
   * **Reduce below target value**: Maximum number of instances the group size can be scaled down by.
   * **Create simultaneously**: Maximum number of instances that can be created at the same time.
   * **Startup duration**: Period after which the instance will start receiving traffic.
   * **Stop simultaneously**: Maximum number of instances that can be stopped at the same time.
   * **Stop VMs by strategy**: Instance shut-down strategy, `Proactive` or `Opportunistic`.

      For more information, see [Deployment policy](../concepts/instance-groups/policies/deploy-policy.md).
1. Under **Scaling**:
   * Select the [scaling type](../concepts/instance-groups/scale.md).
   * If you selected `Fixed`, specify the group size.
   * If you selected `Automatic`, specify:
     * Minimum number of VM instances per availability zone.
     * Maximum group size.
     * Utilization measurement period: Period used to average utilization measurements for each VM instance in a group.
     * Instance warmup period: Period during which a new VM instance is ignored when measuring the group's average load.
     * Stabilization period: Period during which the target number of VM instances in the group cannot be reduced.
     * Initial group size: Number of VM instances created along with the group.
   * If you selected `Fixed with automatic dry-run`, specify the group size and autoscaling parameters. For this type, autoscaling works in test mode.
1. If you previously selected `Automatic` as your scaling type, under **Metrics**, specify the target CPU utilization as a percentage.
1. Under **Integration with Network Load Balancer**:
   * Optionally, enable **Create target group**. [Target groups](../../network-load-balancer/concepts/target-resources.md) enable the [network load balancer](../../network-load-balancer/concepts/index.md) to distribute traffic effectively.
     * Enter a name and description for the target group.
1. Under **Health checks**:
   * Optionally, enable **Activate**.
     * Select either `HTTP` or `TCP` for the check type.
     * Specify the path for the checks.
     * Specify a port number between 1 and 32767.
     * Specify the response timeout in seconds.
     * Specify the interval, in seconds, for sending health check requests.
     * Specify the healthy threshold, which is the number of successful checks required to consider the VM instance ready to receive traffic.
     * Specify the unhealthy threshold, which is the number of failed checks after which no traffic will be routed to the VM.
1. Click **Create**.

The instance group will appear in the list.

## What's next {#what-is-next}

* Check out [tutorials for creating web services in Yandex Cloud](../../tutorials/applied/index.md#web).
* Learn [how to use instance groups](../operations/index.md).
* Read [answers to FAQs](../qa/general.md).