Creating instance groups
Create an instance group using the Instance Groups component in the Yandex Cloud management console.
Before you begin
- Log in to or register in the management console. If you aren't registered, go to the management console and follow the instructions.
- On the billing page, make sure you linked a billing account and it has the
ACTIVE
orTRIAL_ACTIVE
status. If you don't have a billing account, create one.
- On the billing page, make sure you linked a billing account and it has the
- If you don't have a folder, 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 a folder to create your instance group in.
-
In the list of services, select Compute Cloud.
-
On the left-hand panel, select Instance groups.
-
Click Create group.
-
Under Basic parameters:
-
Enter a name and description of the instance group. Naming requirements:
- The length can be from 3 to 63 characters.
- It may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't 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 group instances, assign the
editor
role to the service account. All operations in Instance Groups are performed on behalf of the service account.
-
-
In the Allocation section, select the desired availability zones. Group instances may reside in different availability zones and regions. More about the geo scope of Yandex Cloud.
-
In the Instance template section, click Define to set the base instance configuration:
- Under Basic parameters:
- Enter a description for the basic instance.
- Select a public image.
- In the Disks section:
- 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 the required number of vCPUs, as well as the amount of RAM.
- (optional) Specify that the instance 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.
- In the Public IP field, choose a method for assigning an IP address:
- Auto: Assign a random IP address from the Yandex Cloud IP pool.
- No address: Don't 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.
- 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:
- Enter the username in the Login field.
- In the SSH key field, paste the contents of the public key file. You need to create a key pair for SSH connection yourself.
- If you selected a Windows-based public image:
- In the Password field, set a password for the
Administrator
user. TheAdministrator
user 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 Basic parameters:
-
Under Allow when creating and updating, specify:
-
The number of instances that can exceed the group size.
-
The number of instances the group size can be reduced by.
-
The number of instances that can be created simultaneously.
-
Initialization interval following which the virtual machine will begin to handle load.
-
The number of instances that you can stop simultaneously.
-
Instance shut-down strategy:
Hard
orSoft
.For more information, see Deployment policy.
-
-
In the Scalability section:
- 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 Constant with autoscaling test, enter group size and autoscaling parameters. For this type, autoscaling works in test mode.
-
If you previously selected Auto as your scaling type, under Metrics, specify the target CPU load as a percentage.
-
Under Integration with 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 or TCP.
- 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.
- Set the healthy threshold, which is the number of successful checks required in order to consider the VM ready to receive traffic.
- Set the unhealthy threshold, which is the number of failed checks after which no traffic will be routed to the VM.
- (optional) Click the Activate toggle.
-
Click Create.
The instance group appears in the list.