This topic describes how to create a scaling configuration for a scaling group that contains elastic container instances. After Auto Scaling triggers scale-out activities based on your configurations, such as scheduled tasks, Auto Scaling uses the scaling configuration as a template to automatically create elastic container instances in a scaling group.
Prerequisites
- A scaling group that contains elastic container instances is created. For more information, see Manage scaling groups.
- A security group is created. For more information, see Create a security group.
Procedure
- Log on to the Auto Scaling console.
- In the left-side navigation pane, click Scaling Groups.
- In the top navigation bar, select the region where Auto Scaling is activated.
- Find a scaling group and use one of the following methods to go to the scaling group details page:
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the page, click the Instance Configuration Sources tab.
- Click the Scaling Configurations tab.
- Click Create Scaling Configuration.
- In the Basic Configurations step, configure the parameters and click Next: Other Settings. The following table describes the parameters.
Parameter Description References Billing Method - Pay-as-you-go: Auto Scaling allocates and releases resources on demand. You are charged only for the resources that you use. You do not need to purchase resources in advance.
- Preemptible Instance: The market price of a preemptible instance fluctuates based on the supply and demand of the instance type. Preemptible instances can be more cost-effective than pay-as-you-go instances. However, preemptible instances may be automatically reclaimed. You can use preemptible instances to reduce costs in specific business scenarios.
Configuration Information This parameter specifies the region, virtual private cloud (VPC), and vSwitch of the elastic container instance. The configuration information is automatically populated. The elastic container instance and the scaling group to which the instance belongs must be in the same region, VPC, and vSwitch. None Security Group A security group is a virtual firewall that manages access to elastic container instances. Configure a security group Container Group Configurations A container group is a group of containers that can be scheduled to the same host. The lifecycle of a container group varies based on the containers in the group. The containers share the network and storage resources of the container group. You can use a container group in the same manner that you use a pod in Kubernetes. In the Container Group Configurations section, you can enable or disable the cost optimization feature, specify whether to automatically match image caches, and configure the number of vCPUs and the memory size.
Container Configuration A container is a lightweight and executable standalone software package. A container is also the running entity of an image. - Configure the parameters and click Confirm Configuration. The following table describes the parameters.
Parameter Description References EIP Elastic IP addresses (EIPs) are public IP addresses that you can purchase and manage based on your business requirements. You can enable Internet access for an elastic container instance by associating an EIP with the instance. Enable Internet access Credential If your container uses private images, such as non-Alibaba Cloud Container Registry images and non-Docker Hub images, this parameter is required. This parameter allows the system to pull images from the image repository. None Tag A tag is a key-value pair that you can use to identify elastic container instances. You can use tags to manage elastic container instances by group and perform searches and batch operations. Use tags to manage elastic container instances Resource Group You can add elastic container instances that are used for different purposes to specific resource groups. Then, you can grant RAM users the permissions to perform fine-grained control on the resources in the resource groups. Use resource groups to manage the permissions of a RAM user Scaling Configuration Name The name of the scaling configuration. If you do not configure this parameter, the scaling configuration ID is used. None - Check your configurations and click Create.
- In the Created dialog box, click Enable Configuration.