Creating an instance group
Create an instance group using Instance Groups in the Yandex Cloud management console.
Getting started
- Log in to the management console
or sign up. If not signed up yet, navigate to the management console and follow the on-screen instructions. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and its status isACTIVEorTRIAL_ACTIVE. If you do not have a billing account yet, create one. - If you do not have a folder yet, create one.
Creating an instance group
You can create an autoscaling instance group or group with a fixed number of VM instances. For more information, see Scaling types.
Alert
When creating instance groups, keep the limits in mind. Not to disrupt the component Instance Groups, do not update or delete manually created resources: target group Network Load Balancer, VMs, and disks. Instead of this, change or delete the entire group.
To create an instance group:
-
In the management console
, select the folder you want to create your instance group in. -
From the list of services, select Compute Cloud.
-
In the left-hand panel, select
Instance groups. -
Click Create group of virtual machines.
-
Under Basic parameters:
-
Enter a name and description for your instance group. Follow these naming requirements:
- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
Note
The VM name is used to generate an internal FQDN, 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.
-
Select the service account from the list or create a new one. To be able to create, update, and delete VM instances in the instance group, assign the
editorrole 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.
-
-
Under Allocation, select the availability zones. Instances of a group may reside in different availability zones.
-
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.
- Specify the disk size.
- Optionally, click Add disk to add more disks.
- Under Computing resources:
- Select a platform.
- Specify the guaranteed performance and required number of vCPUs, as well as RAM size.
- Optionally, make the VM instance preemptible by checking the relevant box.
- Under Network settings:
- Select a cloud network and 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 an IP address assignment method:
Auto: To assign a random IP address from the Yandex Cloud IP address pool.No address: Not to assign a public IP address.
- Optionally, select a security group. If there is no security group, create one:
- Click
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.
- Click
- Select a cloud network and subnet. If your network has no subnets, create one:
- Under Access:
- Select the service account 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](../../compute/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
Administratoruser. A user namedAdministratoris created automatically.
- In the Password field, set a password for the
- Click Add.
- Enable serial console access, if required.
- Click Save.
-
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_expansionquota 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,
ProactiveorOpportunistic.For more information, see Deployment policy.
-
-
Under Scaling:
- Select the scaling type.
- 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.
-
If you previously selected
Automaticas your scaling type, under Metrics, specify the target CPU utilization as a percentage. -
Under Integration with Network Load Balancer:
- Optionally, enable Create target group. Target groups enable the network load balancer to distribute traffic effectively.
- Enter a name and description for the target group.
- Optionally, enable Create target group. Target groups enable the network load balancer to distribute traffic effectively.
-
Under Health checks:
- Optionally, enable Activate.
- Select either
HTTPorTCPfor 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.
- Select either
- Optionally, enable Activate.
-
Click Create.
The instance group will appear in the list.
What's next
- Check out tutorials for creating web services in Yandex Cloud.
- Learn how to use instance groups.
- Read answers to FAQs.