This topic describes how to specify Elastic Compute Service (ECS) instance types of the x86 architecture to create an Elastic Container Instance (ECI) pod.
Instance types
ECS instance types of the x86 architecture fall into two categories based on whether they are suitable for enterprise scenarios: enterprise-level families and shared families.
Note
Some of the preceding instance families use local disks, such as i2 and d1ne. To mount local disks, you must configure a volume. For more information, see ECS instance types that use a local disk.
For more information about ECS instance types, see the following topics:
Configurations
You can specify ECS instance types by adding the k8s.aliyun.com/eci-use-specs annotation to the pod metadata. The following is a YAML example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
labels:
app: test
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
name: nginx-test
labels:
app: nginx
alibabacloud.com/eci: "true"
annotations:
k8s.aliyun.com/eci-use-specs: ecs.c6.large,ecs.c5.large # Specify up to five ECS instance types as needed.
spec:
containers:
- name: nginx
image: registry.cn-shanghai.aliyuncs.com/eci_open/nginx:1.14.2
ports:
- containerPort: 80