Creating an instance group
Create an instance group using the Instance Groups component in the Yandex Cloud management console.
Getting started
- Log in or sign up to the management console
. If not signed up yet, navigate to the management console and follow the instructions. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it is inACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account yet, create one. - If you do not have a folder yet, create one.
Create an instance group
You can create an automatically scaled group or a group with a fixed number of 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 to create your instance group in. -
In 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 of the instance group. The naming requirements are as follows:
- The name must be from 3 to 63 characters long.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter and the last character cannot be a hyphen.
Note
The VM name is used to generate an internal FQDN only once: when creating a VM. If the internal FQDN is important to you, choose an appropriate name for the VM at the creation stage.
-
Select a 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
editor
role 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.
-
-
In the Allocation section, select the desired 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 base instance.
- Under Boot disk image, select a public image.
- Under Disks and file storages:
- Select the disk type.
- Specify the disk size.
- (Optional) Click Add disk to add more disks.
- Under Computing resources:
- Choose a platform.
- Specify the guaranteed share and required number of vCPUs, as well as RAM size.
- (Optional) Specify that the VM must be preemptible.
- Under Network settings:
- Select a cloud network and subnet. If there is no subnet, create one:
- Click Create subnet.
- Enter a name and a description for the new subnet. Specify an availability zone and a CIDR.
- Click Create subnet.
- In the Public address field, choose a method for assigning an IP address:
Auto
: Assign a random IP address from the Yandex Cloud IP address pool.No address
: Not to assign a public IP address.
- (Optional) 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 will be able to add rules to the security group at a later stage using Virtual Private Cloud.
- Click Create.
- Click
- Select a cloud network and subnet. If there is no subnet, create one:
- Under Access:
- Select a service account from the list or create a new one.
- If you selected a Linux-based public image:
- Under Login, enter the username.
- In the SSH key field, paste the contents of the public key file. You need to create a key pair for the SSH connection yourself.
- If you selected a Windows-based public image:
- In the Password field, set a password for the
Administrator
user. A user namedAdministrator
is created automatically.
- In the Password field, set a password for the
- Click Add.
- If required, grant access to the serial console.
- Click Save.
-
Under Allow when creating and updating, specify:
-
Add above target value: Number of instances by which you can exceed the group size.
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: Number of instances by which you can reduce the group size.
-
Create simultaneously: Number of instances that can be created simultaneously.
-
Startup duration: Initialization interval after which the instance will begin to receive load.
-
Stop simultaneously: Number of instances you can stop simultaneously.
-
Stop VMs by strategy: Instance shut-down strategy,
Proactive
orOpportunistic
.For more information, see Deployment policy.
-
-
Under Scaling:
- Select the scaling type.
- If you selected the
Fixed
type, specify the size of the group. - If you selected
Automatic
, specify:- The minimum number of instances per availability zone.
- Maximum group size.
- Utilization measurement period: The period for which utilization measurements should be averaged for each instance in the group.
- Instance warmup period: The period during which the created instance is not taken into account when measuring the average load on the group.
- Stabilization period: The interval during which the required number of instances in the group can't be reduced.
- Initial group size: The number of instances created with the group.
- If you selected
Fixed with automatic dry-run
, enter group size and autoscaling parameters. For this type, autoscaling works in test mode.
-
If you previously selected
Automatic
as your scaling type, under Metrics, specify the target CPU load as a percentage. -
Under Integration with Network Load Balancer:
- (Optional) Click the Create target group toggle. Target groups are required for the network load balancer to perform its function.
- Enter a name and description for the target group.
- (Optional) Click the Create target group toggle. Target groups are required for the network load balancer to perform its function.
-
Under Health checks:
- (Optional) Click the Activate toggle.
- Select the check type:
HTTP
orTCP
. - Specify the path for the checks.
- Specify a port number from the range 1-32767.
- Specify the response timeout in seconds.
- Specify the interval, in seconds, for sending health check requests.
- Specify the healthy threshold: number of successful checks required to consider the VM ready to receive traffic.
- Specify the unhealthy threshold: number of failed checks after which no traffic will be routed to the VM.
- Select the check type:
- (Optional) Click the Activate toggle.
-
Click Create.
The instance group will appear in the list.