Elastic container instances run as pods on virtual nodes with full Kubernetes configuration support.
Virtual nodes power this model. Built on Virtual Kubelet, they let elastic container instances appear as standard pods in your cluster, supporting all pod configuration options: specs, images, storage, and networking.
On this page: Basic configurations | Lifecycle | Limitations | Pod orchestration | Extended features
Basic configurations
Specifications
Specify CPU and memory when creating a pod, or choose an Elastic Compute Service (ECS) instance type for specific hardware requirements — GPU-accelerated inference or local disk access, for example. Billing varies by specification type. See Billing of elastic container instances.
Images
A pod supports up to 20 containers. Before deployment, prepare a container image bundling your application's programs, libraries, and configuration.
Pulling images
On startup, containerd pulls container images from a remote repository. Public pulls require Internet access — configure a public NAT gateway for the Virtual Private Cloud (VPC), or associate an Elastic IP Address (EIP) with the instance.
Store images in Container Registry for faster private-network pulls without a Kubernetes Secret. See Pull images from a Container Registry instance without using a Secret and Use managed-aliyun-acr-credential-helper to pull images without using a secret.
Image cache
Image cache creates a snapshot from a container image. Subsequent instances use that snapshot instead of re-downloading layers, accelerating startup. The ImageCache CustomResourceDefinition (CRD) is enabled by default in ACK Serverless clusters. See Use ImageCache to accelerate the creation of elastic container instances.
Storage
Temporary storage
Each pod gets 30 GiB of free temporary storage by default for container images at startup. See Scale up the temporary storage space if your workload needs more.
Persistent storage
Mount volumes to share or retain data across pod restarts. In ACK Serverless clusters, use the Container Storage Interface (CSI) plug-in to mount Alibaba Cloud storage: disks, File Storage NAS (NAS) file systems, and Object Storage Service (OSS) buckets. See CSI overview.
See Storage for all configuration options.
Networks
Private IP address
Each pod gets an elastic network interface (ENI) from a vSwitch in its VPC, with a private IP address assigned from that vSwitch. The vSwitch selection order is: k8s.aliyun.com/eci-vswitch annotation → PodNetworking → eci-profile configuration. To pin a private IP address, see Specify a private IP address for a pod and Configure a fixed IP address for a pod.
Internet access
Pods have internal IP addresses only by default. For Internet access — pulling public images, for example — associate an EIP or add a NAT gateway. See Enable Internet access for pods.
IPv6
Elastic Container Instance supports IPv6 for a larger address pool. See Assign an IPv6 address to an Elastic Container Instance-based pod.
See Network for all configuration options.
Containers
Configure startup commands, liveness and readiness probes, and security contexts — standard Kubernetes patterns apply. See Container configurations.
Lifecycle
Pods move through distinct states during their lifecycle. See Lifecycle of a pod for the ECI-to-Kubernetes state mapping.
Limitations
Elastic Container Instance does not support certain Kubernetes features due to Alibaba Cloud public cloud security constraints and virtual node restrictions.
| Unsupported feature | Description | Recommended alternative |
|---|---|---|
| hostPath | Mount files from on-premises hosts to containers | Use emptyDir volumes, disks, or File Storage NAS (NAS) file systems |
| hostNetwork | Map a host port to a container | Create a Service of the LoadBalancer type |
| DaemonSet | Deploy a static pod on a container host | Deploy multiple images in a pod using sidecar containers |
| Service of the NodePort type | Map a host port to a container | Create a Service of the LoadBalancer type |
See Limits for the complete list.
Pod orchestration
To reduce changes to pod YAML, use eci-profile, which provides a cluster-wide view of ECI resources and orchestrates pods by label selector. See Configure eci-profile.
Extended features
Data cache
Cache large datasets — model training data, for example — so pods mount the data immediately at startup without repeated downloads, reducing both time and cost. See Data cache overview.
ECI pod annotations
Add annotations to pods on elastic container instances to enable ECI-specific features. Add them manually at pod creation, or use eci-profile to apply them automatically by label. See ECI pod annotation for the full list.