All Products
Search
Document Center

Container Service for Kubernetes:Create an elastic container instance

Last Updated:Oct 14, 2024

This topic describes the methods available for creating an elastic container instance. You can select an appropriate method to create a pod that meets specification requirements, maximizes creation success rates, and minimizes resource usage costs.

Overview

You can use different methods to create pods based on your business and usage scenarios. These methods correspond to different billing modes. For more information, see Billing of elastic container instances.

Creation method

Billing basis

Description

References

Specify the number of vCPUs and memory size

Based on the vCPU and memory specifications

You are charged for pods based on the vCPU and memory specifications that you specify when you create the pods. You can also specify a compute category based on your cost and performance requirements. For vCPU and memory specifications that are not supported, the system adjusts the instance specifications and charges you based on the new specifications.

Specify an ECS instance type

Based on the ECS instance type

You are charged for pods based on the ECS instance types that you specify when you create the pods. You can specify an ECS instance type as the underlying support of your Elastic Container Instance pod based on your business requirements. This way, the pod can obtain the specific capabilities of the ECS instance type. For example, if you specify the ecs.gn6i-c4g1.xlarge instance type, the pod can obtain the GPU-accelerated capabilities.

Set ECS instance families or instance family generations for filtering while you specify specifications of vCPU and memory

Based on the ECS instance type

The system automatically selects a suitable ECS instance type based on the specifications of vCPU and memory and the filter conditions for ECS instance families or instance family generations that you specify when you create the pod. You are charged based on the actually used ECS instance type.

Important

Optimize usage costs

You can use pay-as-you-go elastic container instances together with preemptible elastic container instances, reserved instances, and savings plans to reduce costs based on your business requirements.

  • Preemptible elastic container instances can be used for stateless and fault-tolerant workloads. For more information, see Create a preemptible elastic container instance.

  • For long-term stable workloads, we recommend that you use reserved instances or savings plans to offset the bills of pods. The following methods can be used to offset your bills based on the billing basis of pods:

    • Pods for which you are charged based on the number of vCPUs and memory size: General-purpose savings plans can be used.

    • Pods for which you are charged based on the ECS instance types: General-purpose savings plans, ECS compute savings plans, and reserved instances can be used.

    You can select an offset method based on your elastic container instances. For more information, see Use reserved instances and Use savings plans.

Solutions to insufficient resources

Elastic Container Instance provides cloud resources for containers. When you create a large number of pods, some resources in the specified region and zone may be insufficient. To ensure that the pods can be created, we recommend that you specify multiple pod specifications and multiple vSwitches that are deployed in different zones. For more information, see the following topics: