All Products
Search
Document Center

Auto Scaling:Create a scaling configuration of the Elastic Container Instance type

Last Updated:Feb 23, 2024

If your scaling group is of the Elastic Container Instance type, you can refer to this topic to create scaling configurations in the scaling group. A scaling configuration is a template based on which elastic container instances are created during scale-outs. After a scale-out is triggered, Auto Scaling uses a scaling configuration as the template to create elastic container instances. This simplifies instance creation and management and improves the success rate of scale-outs.

Prerequisites

  • A scaling group of the Elastic Container Instance type is created. For more information, see Manage scaling groups.

  • A security group is created. If the network type of the scaling group is virtual private cloud (VPC), make sure that the security group and the scaling group reside in the same VPC. For more information, see Create a security group.

Procedure

  1. Log on to the Auto Scaling console.

  2. In the left-side navigation pane, click Scaling Groups.

  3. In the top navigation bar, select the region where Auto Scaling is activated.

  4. 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.

  5. In the upper part of the scaling group details page, click the Instance Configuration Sources tab.

  6. On the Scaling Configurations tab, click Create Scaling Configuration.

  7. In the Basic Configurations step, configure parameters as required 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 for only 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 of and demand for 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

    The region, VPC, and vSwitches of the elastic container instances created based on the scaling configuration. The configuration information is automatically populated. The elastic container instances and the scaling group to which the instances belong must be in the same region and VPC and use the same vSwitch.

    N/A

    Security Group

    A security group is a virtual firewall that is used to manage access to elastic container instances.

    Assign security groups to an elastic container instance

    Container Group Configurations

    A container group is a group of containers that can be scheduled to the same host. A container group is an elastic container instance. 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.

    In the Container Group Configurations section, you can enable or disable Cost Optimization, specify the number of vCPUs and memory size for the container group, and select or clear Automatically Match Image Cache.

    Container Configurations

    The image and startup command of the container.

    Note

    A container is a lightweight and executable standalone software package that serves as the running entity of an image.

  8. Configure other parameters based on your business requirements 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 for elastic container instances

    Credential

    If your container uses private images, such as non-Alibaba Cloud Container Registry images and non-Docker Hub images, you must configure this parameter. This parameter allows the system to pull images from the image repository.

    N/A

    RAM Role

    You can bind RAM roles to elastic container instances. Then, you can use Security Token Service (STS) tokens to call API operations of other Alibaba Cloud services. This way, you can ensure the security of your AccessKey pair and perform fine-grained permission control by using the RAM roles.

    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 to resource groups by purpose. Then, you can grant RAM users the permissions to perform fine-grained control on the elastic container instances in the resource groups.

    Use resource groups to control 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.

    N/A

  9. Confirm the configurations and click Confirm Configuration.

  10. Click Enable.

References